drm/amd/display: drop cursor position check in atomic test
authorSimon Ser <contact@emersion.fr>
Sat, 23 May 2020 11:53:41 +0000 (11:53 +0000)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 27 May 2020 22:42:10 +0000 (18:42 -0400)
get_cursor_position already handles the case where the cursor has
negative off-screen coordinates by not setting
dc_cursor_position.enabled.

Signed-off-by: Simon Ser <contact@emersion.fr>
Fixes: 626bf90fe03f ("drm/amd/display: add basic atomic check for cursor plane")
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

index 1499acb..d53c60b 100644 (file)
@@ -8136,13 +8136,6 @@ static int dm_update_plane_state(struct dc *dc,
                        return -EINVAL;
                }
 
-               if (new_plane_state->crtc_x <= -new_acrtc->max_cursor_width ||
-                       new_plane_state->crtc_y <= -new_acrtc->max_cursor_height) {
-                       DRM_DEBUG_ATOMIC("Bad cursor position %d, %d\n",
-                                                        new_plane_state->crtc_x, new_plane_state->crtc_y);
-                       return -EINVAL;
-               }
-
                return 0;
        }