Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: b261509952bc ("drm/amd/display: Fix double cursor on non-video RGB MPO")
Signed-off-by: Leo Li <sunpeng.li@amd.com>
Tested-by: Mikhail Gavrilov <mikhail.v.gavrilov@gmail.com>
Reviewed-by: Hamza Mahfooz <hamza.mahfooz@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Leo Li and committed by
Alex Deucher
ac0bb08d f989fa29

+5 -1
+5 -1
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
··· 9951 9951 * `dcn10_can_pipe_disable_cursor`). By now, all modified planes are in 9952 9952 * atomic state, so call drm helper to normalize zpos. 9953 9953 */ 9954 - drm_atomic_normalize_zpos(dev, state); 9954 + ret = drm_atomic_normalize_zpos(dev, state); 9955 + if (ret) { 9956 + drm_dbg(dev, "drm_atomic_normalize_zpos() failed\n"); 9957 + goto fail; 9958 + } 9955 9959 9956 9960 /* Remove exiting planes if they are modified */ 9957 9961 for_each_oldnew_plane_in_state_reverse(state, plane, old_plane_state, new_plane_state, i) {