Skip to content

Commit

Permalink
drm/amdgpu: fix incorrect enum type
Browse files Browse the repository at this point in the history
[ Upstream commit a110f37 ]

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: 0b22632 ("drm/amd/display: Synchronous DisplayPort Link Training")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
arndb authored and gregkh committed Dec 30, 2020
1 parent 52f525f commit b9b8429
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
Expand Up @@ -3378,7 +3378,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;
Expand All @@ -3388,7 +3388,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 "
Expand Down

0 comments on commit b9b8429

Please sign in to comment.