Skip to content

Commit 2a00299

Browse files
leo-sunli1alexdeucher
authored andcommitted
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: b261509 ("drm/amd/display: Fix double cursor on non-video RGB MPO") Signed-off-by: Leo Li <[email protected]> Tested-by: Mikhail Gavrilov <[email protected]> Reviewed-by: Hamza Mahfooz <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
1 parent 8f32378 commit 2a00299

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9658,7 +9658,11 @@ static int amdgpu_dm_atomic_check(struct drm_device *dev,
96589658
* `dcn10_can_pipe_disable_cursor`). By now, all modified planes are in
96599659
* atomic state, so call drm helper to normalize zpos.
96609660
*/
9661-
drm_atomic_normalize_zpos(dev, state);
9661+
ret = drm_atomic_normalize_zpos(dev, state);
9662+
if (ret) {
9663+
drm_dbg(dev, "drm_atomic_normalize_zpos() failed\n");
9664+
goto fail;
9665+
}
96629666

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

0 commit comments

Comments
 (0)