Commit ac0bb08d authored by Leo Li's avatar Leo Li Committed by Alex Deucher
Browse files

drm/amd/display: Fail atomic_check early on normalize_zpos error



[Why]

drm_atomic_normalize_zpos() can return an error code when there's
modeset lock contention. This was being ignored.

[How]

Bail out of atomic check if normalize_zpos() returns an error.

Fixes: b2615099 ("drm/amd/display: Fix double cursor on non-video RGB MPO")
Signed-off-by: default avatarLeo Li <sunpeng.li@amd.com>
Tested-by: default avatarMikhail Gavrilov <mikhail.v.gavrilov@gmail.com>
Reviewed-by: default avatarHamza Mahfooz <hamza.mahfooz@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent f989fa29
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -9951,7 +9951,11 @@ static int amdgpu_dm_atomic_check(struct drm_device *dev,
	 * `dcn10_can_pipe_disable_cursor`). By now, all modified planes are in
	 * atomic state, so call drm helper to normalize zpos.
	 */
	drm_atomic_normalize_zpos(dev, state);
	ret = drm_atomic_normalize_zpos(dev, state);
	if (ret) {
		drm_dbg(dev, "drm_atomic_normalize_zpos() failed\n");
		goto fail;
	}

	/* Remove exiting planes if they are modified */
	for_each_oldnew_plane_in_state_reverse(state, plane, old_plane_state, new_plane_state, i) {