Commit ac30aeae authored by Nicholas Kazlauskas's avatar Nicholas Kazlauskas Committed by Alex Deucher

drm/amd/display: Use is_dig_enable function instead of dcn10 hardcode

[Why]
This can differ depending on ASIC and we can end up skipping all
transmitter control if we're relying on the wrong bit as a shortcut
for whether link is on/off.

[How]
The ASIC table itself provides the correct DIG check, use that instead
of the dcn10 hardcode.
Reviewed-by: default avatarSyed Hassan <syed.hassan@amd.com>
Acked-by: default avatarAlan Liu <haoping.liu@amd.com>
Signed-off-by: default avatarNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 1d96adb1
...@@ -1056,7 +1056,7 @@ void dcn10_link_encoder_disable_output( ...@@ -1056,7 +1056,7 @@ void dcn10_link_encoder_disable_output(
struct bp_transmitter_control cntl = { 0 }; struct bp_transmitter_control cntl = { 0 };
enum bp_result result; enum bp_result result;
if (!dcn10_is_dig_enabled(enc)) { if (enc->funcs->is_dig_enabled && !enc->funcs->is_dig_enabled(enc)) {
/* OF_SKIP_POWER_DOWN_INACTIVE_ENCODER */ /* OF_SKIP_POWER_DOWN_INACTIVE_ENCODER */
/*in DP_Alt_No_Connect case, we turn off the dig already, /*in DP_Alt_No_Connect case, we turn off the dig already,
after excuation the PHY w/a sequence, not allow touch PHY any more*/ after excuation the PHY w/a sequence, not allow touch PHY any more*/
......
...@@ -558,7 +558,7 @@ void dcn31_link_encoder_disable_output( ...@@ -558,7 +558,7 @@ void dcn31_link_encoder_disable_output(
struct dmub_cmd_dig_dpia_control_data dpia_control = { 0 }; struct dmub_cmd_dig_dpia_control_data dpia_control = { 0 };
struct dc_link *link; struct dc_link *link;
if (!dcn10_is_dig_enabled(enc)) if (enc->funcs->is_dig_enabled && !enc->funcs->is_dig_enabled(enc))
return; return;
link = link_enc_cfg_get_link_using_link_enc(enc->ctx->dc, enc->preferred_engine); link = link_enc_cfg_get_link_using_link_enc(enc->ctx->dc, enc->preferred_engine);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment