提交 715bfff3 编写于 作者: S Stylon Wang 提交者: Alex Deucher

drm/amd/display: Revert "Guard ASSR with internal display flag"

This reverts commit 9127daa0.

[Why]
1. Previous patch regresses on some embedded panels.
2. Project coreboot doesn't support passing of internal display flag.

[How]
This reverts "Guard ASSR with internal display flag" commit.

Fixes: 9127daa0 ("drm/amd/display: Guard ASSR with internal display flag")
Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1620Signed-off-by: NStylon Wang <stylon.wang@amd.com>
Reviewed-by: NWesley Chalmers <Wesley.Chalmers@amd.com>
Acked-by: NBindu Ramamurthy <bindu.r@amd.com>
Tested-by: NDaniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
上级 eeb90e26
......@@ -1760,42 +1760,6 @@ enum link_training_result dc_link_dp_perform_link_training(
return status;
}
static enum dp_panel_mode try_enable_assr(struct dc_stream_state *stream)
{
struct dc_link *link = stream->link;
enum dp_panel_mode panel_mode = dp_get_panel_mode(link);
#ifdef CONFIG_DRM_AMD_DC_HDCP
struct cp_psp *cp_psp = &stream->ctx->cp_psp;
#endif
/* ASSR must be supported on the panel */
if (panel_mode == DP_PANEL_MODE_DEFAULT)
return panel_mode;
/* eDP or internal DP only */
if (link->connector_signal != SIGNAL_TYPE_EDP &&
!(link->connector_signal == SIGNAL_TYPE_DISPLAY_PORT &&
link->is_internal_display))
return DP_PANEL_MODE_DEFAULT;
#ifdef CONFIG_DRM_AMD_DC_HDCP
if (cp_psp && cp_psp->funcs.enable_assr) {
if (!cp_psp->funcs.enable_assr(cp_psp->handle, link)) {
/* since eDP implies ASSR on, change panel
* mode to disable ASSR
*/
panel_mode = DP_PANEL_MODE_DEFAULT;
}
} else
panel_mode = DP_PANEL_MODE_DEFAULT;
#else
/* turn off ASSR if the implementation is not compiled in */
panel_mode = DP_PANEL_MODE_DEFAULT;
#endif
return panel_mode;
}
bool perform_link_training_with_retries(
const struct dc_link_settings *link_setting,
bool skip_video_pattern,
......@@ -1808,7 +1772,7 @@ bool perform_link_training_with_retries(
uint8_t delay_between_attempts = LINK_TRAINING_RETRY_DELAY;
struct dc_stream_state *stream = pipe_ctx->stream;
struct dc_link *link = stream->link;
enum dp_panel_mode panel_mode;
enum dp_panel_mode panel_mode = dp_get_panel_mode(link);
struct link_encoder *link_enc;
enum link_training_result status = LINK_TRAINING_CR_FAIL_LANE0;
struct dc_link_settings current_setting = *link_setting;
......@@ -1845,11 +1809,23 @@ bool perform_link_training_with_retries(
msleep(delay_dp_power_up_in_ms);
}
panel_mode = try_enable_assr(stream);
#ifdef CONFIG_DRM_AMD_DC_HDCP
if (panel_mode == DP_PANEL_MODE_EDP) {
struct cp_psp *cp_psp = &stream->ctx->cp_psp;
if (cp_psp && cp_psp->funcs.enable_assr) {
if (!cp_psp->funcs.enable_assr(cp_psp->handle, link)) {
/* since eDP implies ASSR on, change panel
* mode to disable ASSR
*/
panel_mode = DP_PANEL_MODE_DEFAULT;
}
} else
panel_mode = DP_PANEL_MODE_DEFAULT;
}
#endif
dp_set_panel_mode(link, panel_mode);
DC_LOG_DETECTION_DP_CAPS("Link: %d ASSR enabled: %d\n",
link->link_index,
panel_mode != DP_PANEL_MODE_DEFAULT);
if (link->aux_access_disabled) {
dc_link_dp_perform_link_training_skip_aux(link, &current_setting);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册