summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/omapdrm/omap_dmm_priv.h
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2018-09-26 12:11:30 +0300
committerTomi Valkeinen <tomi.valkeinen@ti.com>2018-10-02 09:36:56 +0300
commitf5b9930b85dc6319fd6bcc259e447eff62fc691c (patch)
tree374c62c7c7f398320ab64be23983b0290e483ba6 /drivers/gpu/drm/omapdrm/omap_dmm_priv.h
parent176c866d40551565e78893fc0cb2bc8eed7b3c80 (diff)
downloadlinux-f5b9930b85dc6319fd6bcc259e447eff62fc691c.tar.xz
drm/omap: partial workaround for DRA7xx DMM errata i878
Errata i878 says that MPU should not be used to access RAM and DMM at the same time. As it's not possible to prevent MPU accessing RAM, we need to access DMM via a proxy. This patch changes DMM driver to access DMM registers via sDMA. Instead of doing a normal readl/writel call to read/write a register, we use sDMA to copy 4 bytes from/to the DMM registers. This patch provides only a partial workaround for i878, as not only DMM register reads/writes are affected, but also accesses to the DMM mapped buffers (framebuffers, usually). Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Diffstat (limited to 'drivers/gpu/drm/omapdrm/omap_dmm_priv.h')
-rw-r--r--drivers/gpu/drm/omapdrm/omap_dmm_priv.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_dmm_priv.h b/drivers/gpu/drm/omapdrm/omap_dmm_priv.h
index c2785cc98dc9..60bb3f9297bc 100644
--- a/drivers/gpu/drm/omapdrm/omap_dmm_priv.h
+++ b/drivers/gpu/drm/omapdrm/omap_dmm_priv.h
@@ -159,6 +159,7 @@ struct dmm_platform_data {
struct dmm {
struct device *dev;
+ dma_addr_t phys_base;
void __iomem *base;
int irq;
@@ -189,6 +190,12 @@ struct dmm {
struct list_head alloc_head;
const struct dmm_platform_data *plat_data;
+
+ bool dmm_workaround;
+ spinlock_t wa_lock;
+ u32 *wa_dma_data;
+ dma_addr_t wa_dma_handle;
+ struct dma_chan *wa_dma_chan;
};
#endif