aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStylon Wang <[email protected]>2021-02-23 18:32:09 +0800
committerAlex Deucher <[email protected]>2021-02-24 09:28:55 -0500
commit4588f7b7dd5f09e70b6e223490a0d054c3d64071 (patch)
tree29c37ffac63692f956d34e723134b9aff93b8b28
parentf8f70c1371d304f42d4a1242d8abcbda807d0bed (diff)
drm/amd/display: Enable ASSR in DM
This patch enables ASSR if display declares such support in DPCD. Signed-off-by: Stylon Wang <[email protected]> Reviewed-by: Rodrigo Siqueira <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
-rw-r--r--drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
index c1391bfb7a9b..099f43709060 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
@@ -1669,6 +1669,22 @@ bool perform_link_training_with_retries(
msleep(delay_dp_power_up_in_ms);
}
+#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);
if (link->aux_access_disabled) {