aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/gpu/drm/omapdrm/omap_fb.h
diff options
context:
space:
mode:
authorBenoit Parrot <bparrot@ti.com>2021-11-17 15:19:28 +0100
committerTomi Valkeinen <tomi.valkeinen@ideasonboard.com>2021-12-08 10:04:54 +0200
commite02b5cc9e898ad6f223a69df63397beae60390ff (patch)
tree83f9766045d8c1b955f031e264d5b6be112b5685 /drivers/gpu/drm/omapdrm/omap_fb.h
parentdrm/omap: add plane_atomic_print_state support (diff)
downloadwireguard-linux-e02b5cc9e898ad6f223a69df63397beae60390ff.tar.xz
wireguard-linux-e02b5cc9e898ad6f223a69df63397beae60390ff.zip
drm/omap: Add a 'right overlay' to plane state
If the drm_plane has a source width that's greater than the max width supported by a single hw overlay, then we assign a 'r_overlay' to it in omap_plane_atomic_check(). Both overlays should have the capabilities required to handle the source framebuffer. The only parameters that vary between the left and right hwoverlays are the src_w, crtc_w, src_x and crtc_x as we just even chop the fb into left and right halves. We also take care of not creating odd width size when dealing with YUV formats. Since both halves need to be 'appear' side by side the zpos is recalculated when dealing with dual overlay cases so that the other planes zpos is consistent. Depending on user space usage it is possible that on occasion the number of requested planes exceeds the numbers of overlays required to display them. In that case a failure would be returned for the plane that cannot be handled at that time. It is up to user space to make sure the H/W resource are not over-subscribed. Signed-off-by: Benoit Parrot <bparrot@ti.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Link: https://patchwork.freedesktop.org/patch/msgid/20211117141928.771082-10-narmstrong@baylibre.com
Diffstat (limited to 'drivers/gpu/drm/omapdrm/omap_fb.h')
-rw-r--r--drivers/gpu/drm/omapdrm/omap_fb.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_fb.h b/drivers/gpu/drm/omapdrm/omap_fb.h
index c0e19aed8220..b75f0b5ef1d8 100644
--- a/drivers/gpu/drm/omapdrm/omap_fb.h
+++ b/drivers/gpu/drm/omapdrm/omap_fb.h
@@ -26,7 +26,9 @@ struct drm_framebuffer *omap_framebuffer_init(struct drm_device *dev,
int omap_framebuffer_pin(struct drm_framebuffer *fb);
void omap_framebuffer_unpin(struct drm_framebuffer *fb);
void omap_framebuffer_update_scanout(struct drm_framebuffer *fb,
- struct drm_plane_state *state, struct omap_overlay_info *info);
+ struct drm_plane_state *state,
+ struct omap_overlay_info *info,
+ struct omap_overlay_info *r_info);
bool omap_framebuffer_supports_rotation(struct drm_framebuffer *fb);
void omap_framebuffer_describe(struct drm_framebuffer *fb, struct seq_file *m);