summaryrefslogtreecommitdiffstats
path: root/drivers/staging/imx-drm/ipuv3-plane.h
diff options
context:
space:
mode:
authorPhilipp Zabel <p.zabel@pengutronix.de>2013-10-10 16:18:45 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-10-11 15:30:33 -0700
commitb8d181e408af6a017da8143eccae9ce8f2157d2f (patch)
treea9c9e8c7b4c81ce98473bbf131789dc0f96ac56f /drivers/staging/imx-drm/ipuv3-plane.h
parent6ee4d7fe1b5f8c9c32410ddf1f1aa84bdeaed6b9 (diff)
downloadop-kernel-dev-b8d181e408af6a017da8143eccae9ce8f2157d2f.zip
op-kernel-dev-b8d181e408af6a017da8143eccae9ce8f2157d2f.tar.gz
staging: drm/imx: add drm plane support
This patch adds support for a drm overlay plane on DI0 using the DP. In principle, the overlay plane could also be used on DI1, but to switch the overlay plane between display interfaces, the base planes would have to be exchanged transparently while both display interfaces are inactive. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/imx-drm/ipuv3-plane.h')
-rw-r--r--drivers/staging/imx-drm/ipuv3-plane.h55
1 files changed, 55 insertions, 0 deletions
diff --git a/drivers/staging/imx-drm/ipuv3-plane.h b/drivers/staging/imx-drm/ipuv3-plane.h
new file mode 100644
index 0000000..c0aae5b
--- /dev/null
+++ b/drivers/staging/imx-drm/ipuv3-plane.h
@@ -0,0 +1,55 @@
+#ifndef __IPUV3_PLANE_H__
+#define __IPUV3_PLANE_H__
+
+#include <drm/drm_crtc.h> /* drm_plane */
+
+struct drm_plane;
+struct drm_device;
+struct ipu_soc;
+struct drm_crtc;
+struct drm_framebuffer;
+
+struct ipuv3_channel;
+struct dmfc_channel;
+struct ipu_dp;
+
+struct ipu_plane {
+ struct drm_plane base;
+
+ struct ipu_soc *ipu;
+ struct ipuv3_channel *ipu_ch;
+ struct dmfc_channel *dmfc;
+ struct ipu_dp *dp;
+
+ int dma;
+ int dp_flow;
+
+ int x;
+ int y;
+
+ bool enabled;
+};
+
+struct ipu_plane *ipu_plane_init(struct drm_device *dev, struct ipu_soc *ipu,
+ int dma, int dp, unsigned int possible_crtcs,
+ bool priv);
+
+/* Init IDMAC, DMFC, DP */
+int ipu_plane_mode_set(struct ipu_plane *plane, struct drm_crtc *crtc,
+ struct drm_display_mode *mode,
+ struct drm_framebuffer *fb, int crtc_x, int crtc_y,
+ unsigned int crtc_w, unsigned int crtc_h,
+ uint32_t src_x, uint32_t src_y, uint32_t src_w,
+ uint32_t src_h);
+
+void ipu_plane_enable(struct ipu_plane *plane);
+void ipu_plane_disable(struct ipu_plane *plane);
+int ipu_plane_set_base(struct ipu_plane *plane, struct drm_framebuffer *fb,
+ int x, int y);
+
+int ipu_plane_get_resources(struct ipu_plane *plane);
+void ipu_plane_put_resources(struct ipu_plane *plane);
+
+int ipu_plane_irq(struct ipu_plane *plane);
+
+#endif
OpenPOWER on IntegriCloud