drm/vc4: Take margin setup into account when updating planes
authorBoris Brezillon <boris.brezillon@bootlin.com>
Thu, 6 Dec 2018 14:24:38 +0000 (15:24 +0100)
committerBoris Brezillon <boris.brezillon@bootlin.com>
Wed, 19 Dec 2018 13:47:58 +0000 (14:47 +0100)
commit666e73587f90f42d90385c1bea1009a650bf73f4
treecb6b1c0d554880ae33f1d782a36537bca0609a35
parent6c4f52dca36f5e3e2354c30591d38e92f4657ed9
drm/vc4: Take margin setup into account when updating planes

Applyin margins is just a matter of scaling all planes appropriately
and adjusting the CRTC X/Y offset to account for the
left/right/top/bottom borders.

Create a vc4_plane_margins_adj() function doing that and call it from
vc4_plane_setup_clipping_and_scaling() so that we are ready to attach
margins properties to the HDMI connector.

Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20181206142439.10441-5-boris.brezillon@bootlin.com
drivers/gpu/drm/vc4/vc4_crtc.c
drivers/gpu/drm/vc4/vc4_drv.h
drivers/gpu/drm/vc4/vc4_plane.c