]> git.baikalelectronics.ru Git - kernel.git/commit
drm/vc4: Use drm_atomic_helper_check_plane_state() to simplify the logic
authorBoris Brezillon <boris.brezillon@bootlin.com>
Fri, 3 Aug 2018 09:22:29 +0000 (11:22 +0200)
committerBoris Brezillon <boris.brezillon@bootlin.com>
Wed, 24 Oct 2018 16:05:21 +0000 (18:05 +0200)
commitc6d31a7c33d948c27848c67566b2dc3fe8ae95fe
tree93bbb20d6871968d25a3f9906f12c939feb8b98c
parentc5a7a7008b8e5ca5a89af91045698cdb28434a58
drm/vc4: Use drm_atomic_helper_check_plane_state() to simplify the logic

drm_atomic_helper_check_plane_state() takes care of checking the
scaling capabilities and calculating the clipped X/Y offsets for us.

Rely on this function instead of open-coding the logic.

Incidentally, it seems to fix a problem we had with negative X/Y
positioning of YUV planes.

Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Link: https://patchwork.freedesktop.org/patch/msgid/20180803092231.26446-3-boris.brezillon@bootlin.com
drivers/gpu/drm/vc4/vc4_plane.c