[PATCH 01/13] drm/amd/display: Reset link encoder assignments in atomic check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Stylon Wang <stylon.wang@xxxxxxx>

[Why]
The link encoder assignments must be "invalid" before commencing
on the reassignment operation in DC. A failing atomic check from
interruption of a signal could often leave the assignment change
in place and trigger the assertion.

[How]
As a work-around the link encoder assignments are always reset
before going into DC validation in DM atomic check.


Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@xxxxxxx>
Acked-by: Wayne Lin <wayne.lin@xxxxxxx>
Signed-off-by: Stylon Wang <stylon.wang@xxxxxxx>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index a22c25c707b1..17fd37ee6251 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -11227,6 +11227,18 @@ static int amdgpu_dm_atomic_check(struct drm_device *dev,
 			DRM_DEBUG_DRIVER("drm_dp_mst_atomic_check() failed\n");
 			goto fail;
 		}
+
+		/*
+		 * A previously failing atomic check, for example due to a
+		 * interruption from signal, could have changed the
+		 * link encoder assignments in the DC state.
+		 *
+		 * DC expects that link encoder assignments are *not* valid
+		 * when committing a state, so as a workaround it needs to be
+		 * cleared here.
+		 */
+		link_enc_cfg_init(dc, dm_state->context);
+
 		status = dc_validate_global_state(dc, dm_state->context, true);
 		if (status != DC_OK) {
 			DRM_DEBUG_DRIVER("DC global validation failure: %s (%d)",
-- 
2.25.1




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux