Skip to content

Commit 020ecca

Browse files
leo-sunli1gregkh
authored andcommitted
drm/amd/display: Fail atomic_check early on normalize_zpos error
commit 2a00299 upstream. [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] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent dbe3529 commit 020ecca

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
@@ -9556,7 +9556,11 @@ static int amdgpu_dm_atomic_check(struct drm_device *dev,
95569556
* `dcn10_can_pipe_disable_cursor`). By now, all modified planes are in
95579557
* atomic state, so call drm helper to normalize zpos.
95589558
*/
9559-
drm_atomic_normalize_zpos(dev, state);
9559+
ret = drm_atomic_normalize_zpos(dev, state);
9560+
if (ret) {
9561+
drm_dbg(dev, "drm_atomic_normalize_zpos() failed\n");
9562+
goto fail;
9563+
}
95609564

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

0 commit comments

Comments
 (0)