summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/omapdrm/omap_drv.h
diff options
context:
space:
mode:
authorBenoit Parrot <bparrot@ti.com>2021-11-17 17:19:26 +0300
committerTomi Valkeinen <tomi.valkeinen@ideasonboard.com>2021-12-08 11:04:47 +0300
commit2e54ff0e5430883f2040450e9297ebad9f56f846 (patch)
treed52a4b8164cad5be78cad055cf5109e8cb337408 /drivers/gpu/drm/omapdrm/omap_drv.h
parent6e42201b0ed5d3af66c107144fcd96c17afbc6f1 (diff)
downloadlinux-2e54ff0e5430883f2040450e9297ebad9f56f846.tar.xz
drm/omap: dynamically assign hw overlays to planes
(re)assign the hw overlays to planes based on required caps, and to handle situations where we could not modify an in-use plane. This means all planes advertise the superset of formats and properties. Userspace must (as always) use atomic TEST_ONLY step for atomic updates, as not all planes may be available for use on every frame. The mapping of hwoverlays to plane is stored in omap_global_state, so that state updates are atomically committed in the same way that plane/etc state updates are managed. This is needed because the omap_plane_state keeps a pointer to the hwoverlay, and we don't want global state to become out of sync with the plane state if an atomic update fails, we hit deadlock/ backoff scenario, etc. The use of global_state_lock keeps multiple parallel updates which both re-assign hwoverlays properly serialized. 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-8-narmstrong@baylibre.com
Diffstat (limited to 'drivers/gpu/drm/omapdrm/omap_drv.h')
-rw-r--r--drivers/gpu/drm/omapdrm/omap_drv.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_drv.h b/drivers/gpu/drm/omapdrm/omap_drv.h
index a3079aad7ae3..825960fd3ea9 100644
--- a/drivers/gpu/drm/omapdrm/omap_drv.h
+++ b/drivers/gpu/drm/omapdrm/omap_drv.h
@@ -50,6 +50,9 @@ struct omap_drm_pipeline {
struct omap_global_state {
struct drm_private_state base;
+
+ /* global atomic state of assignment between overlays and planes */
+ struct drm_plane *hwoverlay_to_plane[8];
};
struct omap_drm_private {