summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/omapdrm/omap_overlay.h
diff options
context:
space:
mode:
authorBenoit Parrot <bparrot@ti.com>2021-11-17 17:19:23 +0300
committerTomi Valkeinen <tomi.valkeinen@ideasonboard.com>2021-12-08 11:04:40 +0300
commitc8fa1e733c597a7b11a22a3e49de5ea1362e9a7a (patch)
tree5529c56c32e3f18a956b3f4714e4c481da4858ec /drivers/gpu/drm/omapdrm/omap_overlay.h
parent0b0f7282f0c81fcbbf300079eaeabd4dcef63c11 (diff)
downloadlinux-c8fa1e733c597a7b11a22a3e49de5ea1362e9a7a.tar.xz
drm/omap: introduce omap_hw_overlay
Split out the hardware overlay specifics from omap_plane. To start, the hw overlays are statically assigned to planes. The goal is to eventually assign hw overlays dynamically to planes during plane->atomic_check() based on requested caps (scaling, YUV, etc). And then perform hw overlay re-assignment if required. 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-5-narmstrong@baylibre.com
Diffstat (limited to 'drivers/gpu/drm/omapdrm/omap_overlay.h')
-rw-r--r--drivers/gpu/drm/omapdrm/omap_overlay.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_overlay.h b/drivers/gpu/drm/omapdrm/omap_overlay.h
new file mode 100644
index 000000000000..51d26aebf77d
--- /dev/null
+++ b/drivers/gpu/drm/omapdrm/omap_overlay.h
@@ -0,0 +1,30 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Copyright (C) 2018 Texas Instruments Incorporated - http://www.ti.com/
+ * Author: Benoit Parrot <bparrot@ti.com>
+ */
+
+#ifndef __OMAPDRM_OVERLAY_H__
+#define __OMAPDRM_OVERLAY_H__
+
+#include <linux/types.h>
+
+enum drm_plane_type;
+
+struct drm_device;
+struct drm_mode_object;
+struct drm_plane;
+
+/* Used to associate a HW overlay/plane to a plane */
+struct omap_hw_overlay {
+ unsigned int idx;
+
+ const char *name;
+ enum omap_plane_id id;
+
+ enum omap_overlay_caps caps;
+};
+
+int omap_hwoverlays_init(struct omap_drm_private *priv);
+void omap_hwoverlays_destroy(struct omap_drm_private *priv);
+#endif /* __OMAPDRM_OVERLAY_H__ */