]> git.baikalelectronics.ru Git - kernel.git/commit
drm/mali-dp: Add writeback support for DP500.
authorLiviu Dudau <Liviu.Dudau@arm.com>
Tue, 10 Apr 2018 16:25:57 +0000 (17:25 +0100)
committerLiviu Dudau <Liviu.Dudau@arm.com>
Thu, 5 Jul 2018 14:19:02 +0000 (15:19 +0100)
commit970a1337a114718232ca6992599f93e25591fc80
tree66c86e357ecfc2146a374c0104e60b61e7cdebc2
parentf27e904de0fb26c161b8c99e746134c0f4019219
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>
drivers/gpu/drm/arm/malidp_drv.c
drivers/gpu/drm/arm/malidp_drv.h
drivers/gpu/drm/arm/malidp_hw.c
drivers/gpu/drm/arm/malidp_hw.h
drivers/gpu/drm/arm/malidp_regs.h