summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/arm/hdlcd_drv.h
diff options
context:
space:
mode:
authorLiviu Dudau2015-04-02 20:48:39 +0200
committerLiviu Dudau2016-02-10 14:44:16 +0100
commit8e22d79240d95c92b6cbc4c4e4139848de458927 (patch)
tree2cf63bcf6d7efeffb09ecda8ac0cd9f85ec83dae /drivers/gpu/drm/arm/hdlcd_drv.h
parentdrm/tegra: drop unused variable. (diff)
downloadkernel-qcow2-linux-8e22d79240d95c92b6cbc4c4e4139848de458927.tar.gz
kernel-qcow2-linux-8e22d79240d95c92b6cbc4c4e4139848de458927.tar.xz
kernel-qcow2-linux-8e22d79240d95c92b6cbc4c4e4139848de458927.zip
drm: Add support for ARM's HDLCD controller.
The HDLCD controller is a display controller that supports resolutions up to 4096x4096 pixels. It is present on various development boards produced by ARM Ltd and emulated by the latest Fast Models from the company. Cc: David Airlie <airlied@linux.ie> Cc: Robin Murphy <robin.murphy@arm.com> Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com> [Kconfig cleanup and !CONFIG_PM fixes] Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/arm/hdlcd_drv.h')
-rw-r--r--drivers/gpu/drm/arm/hdlcd_drv.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/drivers/gpu/drm/arm/hdlcd_drv.h b/drivers/gpu/drm/arm/hdlcd_drv.h
new file mode 100644
index 000000000000..aa234784f053
--- /dev/null
+++ b/drivers/gpu/drm/arm/hdlcd_drv.h
@@ -0,0 +1,42 @@
+/*
+ * ARM HDLCD Controller register definition
+ */
+
+#ifndef __HDLCD_DRV_H__
+#define __HDLCD_DRV_H__
+
+struct hdlcd_drm_private {
+ void __iomem *mmio;
+ struct clk *clk;
+ struct drm_fbdev_cma *fbdev;
+ struct drm_framebuffer *fb;
+ struct list_head event_list;
+ struct drm_crtc crtc;
+ struct drm_plane *plane;
+#ifdef CONFIG_DEBUG_FS
+ atomic_t buffer_underrun_count;
+ atomic_t bus_error_count;
+ atomic_t vsync_count;
+ atomic_t dma_end_count;
+#endif
+};
+
+#define crtc_to_hdlcd_priv(x) container_of(x, struct hdlcd_drm_private, crtc)
+
+static inline void hdlcd_write(struct hdlcd_drm_private *hdlcd,
+ unsigned int reg, u32 value)
+{
+ writel(value, hdlcd->mmio + reg);
+}
+
+static inline u32 hdlcd_read(struct hdlcd_drm_private *hdlcd, unsigned int reg)
+{
+ return readl(hdlcd->mmio + reg);
+}
+
+int hdlcd_setup_crtc(struct drm_device *dev);
+void hdlcd_set_scanout(struct hdlcd_drm_private *hdlcd);
+void hdlcd_crtc_suspend(struct drm_crtc *crtc);
+void hdlcd_crtc_resume(struct drm_crtc *crtc);
+
+#endif /* __HDLCD_DRV_H__ */