drm/imx/dcss: fix rotations for Vivante tiled formats
authorLaurentiu Palcu <laurentiu.palcu@oss.nxp.com>
Thu, 5 Nov 2020 14:01:25 +0000 (16:01 +0200)
committerLucas Stach <l.stach@pengutronix.de>
Thu, 26 Nov 2020 10:29:18 +0000 (11:29 +0100)
commit59cb403f38099506ddbe05fd09126f3f0890860b
tree73191c6fd038f97afc0e56138d066f703636434e
parentab43108d0dd48d287e1b5bb9cd4a969457ed9b0e
drm/imx/dcss: fix rotations for Vivante tiled formats

DCSS supports 90/180/270 degree rotations for Vivante tiled and super-tiled
formats. Unfortunately, with the current code, they didn't work properly.

This simple patch makes the rotations work by fixing the way the scaler is set
up for 90/270 degree rotations. In this particular case, the source width and
height need to be swapped since DPR is sending the buffer to scaler already
rotated.

Also, make sure to allow full rotations for DRM_FORMAT_MOD_VIVANTE_SUPER_TILED.

Fixes: 9021c317b770 ("drm/imx: Add initial support for DCSS on iMX8MQ")
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20201105140127.25249-2-laurentiu.palcu@oss.nxp.com
drivers/gpu/drm/imx/dcss/dcss-plane.c