Skip to content

Commit 307696d

Browse files
committed
drm/client: Restrict the rotation check to the rotation itself
The drm_client_rotation has a check on the rotation value, but the reflections are also stored in the same variable, and the check doesn't take this into account. Therefore, even though we might have a valid rotation, if we're also using a reflection parameter, the test will fail for no particular reason. Reviewed-by: Noralf Trønnes <[email protected]> Signed-off-by: Maxime Ripard <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/cf4de0cdef20aac6c654b7b73c2ab3e317c46803.1560783090.git-series.maxime.ripard@bootlin.com
1 parent 46cc2d7 commit 307696d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/gpu/drm/drm_client_modeset.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -845,7 +845,8 @@ bool drm_client_panel_rotation(struct drm_mode_set *modeset, unsigned int *rotat
845845
* depending on the hardware this may require the framebuffer
846846
* to be in a specific tiling format.
847847
*/
848-
if (*rotation != DRM_MODE_ROTATE_180 || !plane->rotation_property)
848+
if ((*rotation & DRM_MODE_ROTATE_MASK) != DRM_MODE_ROTATE_180 ||
849+
!plane->rotation_property)
849850
return false;
850851

851852
for (i = 0; i < plane->rotation_property->num_values; i++)

0 commit comments

Comments
 (0)