summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/arm/malidp_drv.h
diff options
context:
space:
mode:
authorLiviu Dudau <Liviu.Dudau@arm.com>2018-04-10 17:25:57 +0100
committerLiviu Dudau <Liviu.Dudau@arm.com>2018-07-05 15:19:02 +0100
commit1cb3cbe732d9bedd4046bbeb2726d1699cdfabce (patch)
tree66c86e357ecfc2146a374c0104e60b61e7cdebc2 /drivers/gpu/drm/arm/malidp_drv.h
parenta67bbbe225c281f441533d55cd9dce5c2ae207a5 (diff)
downloadlinux-stable-1cb3cbe732d9bedd4046bbeb2726d1699cdfabce.tar.gz
linux-stable-1cb3cbe732d9bedd4046bbeb2726d1699cdfabce.tar.bz2
linux-stable-1cb3cbe732d9bedd4046bbeb2726d1699cdfabce.zip
drm/mali-dp: Add writeback support for DP500.
Mali DP500 behaves differently from the rest of the Mali DP IP, in that it does not have a one-shot mode and keeps writing the content of the current frame to the provided memory area until stopped. As a way of emulating the one-shot behaviour, we are going to use the CVAL interrupt that is being raised at the start of each frame, during prefetch phase, to act as End-of-Write signal, but with a twist: we are going to disable the memory write engine right after we're notified that it has been enabled, using the knowledge that the bit controlling the enabling will only be acted upon on the next vblank/prefetch. CVAL interrupt will fire durint the next prefetch phase every time the global CVAL bit gets set, so we need a state byte to track the memory write enabling. We also need to pay attention during the disabling of the memory write engine as that requires the CVAL bit to be set in the control register, but we don't want to do that during an atomic commit, as it will write into the hardware a partial state. Reviewed-by: Brian Starkey <brian.starkey@arm.com> Signed-off-by: Liviu Dudau <liviu.dudau@arm.com>
Diffstat (limited to 'drivers/gpu/drm/arm/malidp_drv.h')
-rw-r--r--drivers/gpu/drm/arm/malidp_drv.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/arm/malidp_drv.h b/drivers/gpu/drm/arm/malidp_drv.h
index c70989b93387..e8c41cf1b5bd 100644
--- a/drivers/gpu/drm/arm/malidp_drv.h
+++ b/drivers/gpu/drm/arm/malidp_drv.h
@@ -18,6 +18,10 @@
#include <drm/drmP.h>
#include "malidp_hw.h"
+#define MALIDP_CONFIG_VALID_INIT 0
+#define MALIDP_CONFIG_VALID_DONE 1
+#define MALIDP_CONFIG_START 0xd0
+
struct malidp_drm {
struct malidp_hw_device *dev;
struct drm_crtc crtc;