diff options
author | Boris Brezillon <boris.brezillon@bootlin.com> | 2018-12-06 15:24:38 +0100 |
---|---|---|
committer | Boris Brezillon <boris.brezillon@bootlin.com> | 2018-12-19 14:47:58 +0100 |
commit | 666e73587f90f42d90385c1bea1009a650bf73f4 (patch) | |
tree | cb6b1c0d554880ae33f1d782a36537bca0609a35 /drivers/gpu/drm/vc4/vc4_drv.h | |
parent | 6c4f52dca36f5e3e2354c30591d38e92f4657ed9 (diff) | |
download | linux-666e73587f90f42d90385c1bea1009a650bf73f4.tar.bz2 |
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
Diffstat (limited to 'drivers/gpu/drm/vc4/vc4_drv.h')
-rw-r--r-- | drivers/gpu/drm/vc4/vc4_drv.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/vc4/vc4_drv.h b/drivers/gpu/drm/vc4/vc4_drv.h index 4f87b03f837d..c24b078f0593 100644 --- a/drivers/gpu/drm/vc4/vc4_drv.h +++ b/drivers/gpu/drm/vc4/vc4_drv.h @@ -707,6 +707,9 @@ bool vc4_crtc_get_scanoutpos(struct drm_device *dev, unsigned int crtc_id, const struct drm_display_mode *mode); void vc4_crtc_handle_vblank(struct vc4_crtc *crtc); void vc4_crtc_txp_armed(struct drm_crtc_state *state); +void vc4_crtc_get_margins(struct drm_crtc_state *state, + unsigned int *right, unsigned int *left, + unsigned int *top, unsigned int *bottom); /* vc4_debugfs.c */ int vc4_debugfs_init(struct drm_minor *minor); |