drm/amdgpu: fix incorrect enum type
authorArnd Bergmann <arnd@arndb.de>
Mon, 26 Oct 2020 21:00:30 +0000 (22:00 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 30 Oct 2020 05:03:05 +0000 (01:03 -0400)
core_link_write_dpcd() returns enum dc_status, not ddc_result:

display/dc/core/dc_link_dp.c: In function 'dp_set_panel_mode':
display/dc/core/dc_link_dp.c:4237:11: warning: implicit conversion from 'enum dc_status' to 'enum ddc_result'
[-Wenum-conversion]

Avoid the warning by using the correct enum in the caller.

Fixes: 0b226322434c ("drm/amd/display: Synchronous DisplayPort Link Training")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c

index 2114c280895a11aeb9218cd75b45eb608776649e..86d1800c046d2d21906a9d4643a5e8eca877fa59 100644 (file)
@@ -4230,7 +4230,7 @@ void dp_set_panel_mode(struct dc_link *link, enum dp_panel_mode panel_mode)
 
                if (edp_config_set.bits.PANEL_MODE_EDP
                        != panel_mode_edp) {
-                       enum ddc_result result = DDC_RESULT_UNKNOWN;
+                       enum dc_status result = DC_ERROR_UNEXPECTED;
 
                        edp_config_set.bits.PANEL_MODE_EDP =
                        panel_mode_edp;
@@ -4240,7 +4240,7 @@ void dp_set_panel_mode(struct dc_link *link, enum dp_panel_mode panel_mode)
                                &edp_config_set.raw,
                                sizeof(edp_config_set.raw));
 
-                       ASSERT(result == DDC_RESULT_SUCESSFULL);
+                       ASSERT(result == DC_OK);
                }
        }
        DC_LOG_DETECTION_DP_CAPS("Link: %d eDP panel mode supported: %d "