Skip to content

Commit 715bfff

Browse files
Stylon Wangalexdeucher
authored andcommitted
drm/amd/display: Revert "Guard ASSR with internal display flag"
This reverts commit 9127daa. [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: 9127daa ("drm/amd/display: Guard ASSR with internal display flag") Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1620 Signed-off-by: Stylon Wang <stylon.wang@amd.com> Reviewed-by: Wesley Chalmers <Wesley.Chalmers@amd.com> Acked-by: Bindu Ramamurthy <bindu.r@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
1 parent eeb90e2 commit 715bfff

1 file changed

Lines changed: 17 additions & 41 deletions

File tree

drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c

Lines changed: 17 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1760,42 +1760,6 @@ enum link_training_result dc_link_dp_perform_link_training(
17601760
return status;
17611761
}
17621762

1763-
static enum dp_panel_mode try_enable_assr(struct dc_stream_state *stream)
1764-
{
1765-
struct dc_link *link = stream->link;
1766-
enum dp_panel_mode panel_mode = dp_get_panel_mode(link);
1767-
#ifdef CONFIG_DRM_AMD_DC_HDCP
1768-
struct cp_psp *cp_psp = &stream->ctx->cp_psp;
1769-
#endif
1770-
1771-
/* ASSR must be supported on the panel */
1772-
if (panel_mode == DP_PANEL_MODE_DEFAULT)
1773-
return panel_mode;
1774-
1775-
/* eDP or internal DP only */
1776-
if (link->connector_signal != SIGNAL_TYPE_EDP &&
1777-
!(link->connector_signal == SIGNAL_TYPE_DISPLAY_PORT &&
1778-
link->is_internal_display))
1779-
return DP_PANEL_MODE_DEFAULT;
1780-
1781-
#ifdef CONFIG_DRM_AMD_DC_HDCP
1782-
if (cp_psp && cp_psp->funcs.enable_assr) {
1783-
if (!cp_psp->funcs.enable_assr(cp_psp->handle, link)) {
1784-
/* since eDP implies ASSR on, change panel
1785-
* mode to disable ASSR
1786-
*/
1787-
panel_mode = DP_PANEL_MODE_DEFAULT;
1788-
}
1789-
} else
1790-
panel_mode = DP_PANEL_MODE_DEFAULT;
1791-
1792-
#else
1793-
/* turn off ASSR if the implementation is not compiled in */
1794-
panel_mode = DP_PANEL_MODE_DEFAULT;
1795-
#endif
1796-
return panel_mode;
1797-
}
1798-
17991763
bool perform_link_training_with_retries(
18001764
const struct dc_link_settings *link_setting,
18011765
bool skip_video_pattern,
@@ -1808,7 +1772,7 @@ bool perform_link_training_with_retries(
18081772
uint8_t delay_between_attempts = LINK_TRAINING_RETRY_DELAY;
18091773
struct dc_stream_state *stream = pipe_ctx->stream;
18101774
struct dc_link *link = stream->link;
1811-
enum dp_panel_mode panel_mode;
1775+
enum dp_panel_mode panel_mode = dp_get_panel_mode(link);
18121776
struct link_encoder *link_enc;
18131777
enum link_training_result status = LINK_TRAINING_CR_FAIL_LANE0;
18141778
struct dc_link_settings current_setting = *link_setting;
@@ -1845,11 +1809,23 @@ bool perform_link_training_with_retries(
18451809
msleep(delay_dp_power_up_in_ms);
18461810
}
18471811

1848-
panel_mode = try_enable_assr(stream);
1812+
#ifdef CONFIG_DRM_AMD_DC_HDCP
1813+
if (panel_mode == DP_PANEL_MODE_EDP) {
1814+
struct cp_psp *cp_psp = &stream->ctx->cp_psp;
1815+
1816+
if (cp_psp && cp_psp->funcs.enable_assr) {
1817+
if (!cp_psp->funcs.enable_assr(cp_psp->handle, link)) {
1818+
/* since eDP implies ASSR on, change panel
1819+
* mode to disable ASSR
1820+
*/
1821+
panel_mode = DP_PANEL_MODE_DEFAULT;
1822+
}
1823+
} else
1824+
panel_mode = DP_PANEL_MODE_DEFAULT;
1825+
}
1826+
#endif
1827+
18491828
dp_set_panel_mode(link, panel_mode);
1850-
DC_LOG_DETECTION_DP_CAPS("Link: %d ASSR enabled: %d\n",
1851-
link->link_index,
1852-
panel_mode != DP_PANEL_MODE_DEFAULT);
18531829

18541830
if (link->aux_access_disabled) {
18551831
dc_link_dp_perform_link_training_skip_aux(link, &current_setting);

0 commit comments

Comments
 (0)