drm/amd/display: Use dc_is_hdmi_signal() instead of ENUM
authorEric Bernstein <eric.bernstein@amd.com>
Fri, 22 Feb 2019 16:11:07 +0000 (11:11 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 21 Mar 2019 04:39:48 +0000 (23:39 -0500)
Signed-off-by: Eric Bernstein <eric.bernstein@amd.com>
Reviewed-by: Nevenko Stupar <Nevenko.Stupar@amd.com>
Acked-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc_link.c
drivers/gpu/drm/amd/display/dc/inc/core_types.h

index f5f97af3b71524084d7edddfa75b18f0bde5e2cf..97bd1b411c01b462f66a888ad7a72eafc83766de 100644 (file)
@@ -1207,7 +1207,7 @@ static bool construct(
        link->link_enc = link->dc->res_pool->funcs->link_enc_create(
                                                                &enc_init_data);
 
-       iflink->link_enc == NULL) {
+       if (link->link_enc == NULL) {
                DC_ERROR("Failed to create link encoder!\n");
                goto link_enc_create_fail;
        }
@@ -1982,7 +1982,7 @@ static void enable_link_hdmi(struct pipe_ctx *pipe_ctx)
                        pipe_ctx->stream->signal,
                        stream->phy_pix_clk);
 
-       if (pipe_ctx->stream->signal == SIGNAL_TYPE_HDMI_TYPE_A)
+       if (dc_is_hdmi_signal(pipe_ctx->stream->signal))
                dal_ddc_service_read_scdc_data(link->ddc);
 }
 
index 5bfe20aac707a4dae40c7ea562baee9d6a3f1209..b986c67d5b4bb3e66a1777a5d3f25e85a7d124c3 100644 (file)
@@ -95,7 +95,6 @@ struct resource_funcs {
        void (*link_init)(struct dc_link *link);
        struct link_encoder *(*link_enc_create)(
                        const struct encoder_init_data *init);
-
        bool (*validate_bandwidth)(
                                        struct dc *dc,
                                        struct dc_state *context);