OSDN Git Service

drm/mali-dp: Fix malidp_atomic_commit_hw_done() for event sending.
authorLiviu Dudau <Liviu.Dudau@arm.com>
Thu, 1 Mar 2018 16:38:02 +0000 (16:38 +0000)
committerLiviu Dudau <Liviu.Dudau@arm.com>
Wed, 14 Mar 2018 11:38:02 +0000 (11:38 +0000)
commitd862b2d622530d14072f3ae417a0525fb7361410
tree6ce41110c918b40d2cfab3ee41310c126d14f6ad
parentf0437819ad82088d4a07732222912345b5b98767
drm/mali-dp: Fix malidp_atomic_commit_hw_done() for event sending.

Mali DP hardware has a 'go' bit (config_valid) for making the new scene
parameters active at the next page flip. The problem with the current
code is that the driver first sets this bit and then proceeds to wait
for confirmation from the hardware that the configuration has been
updated before arming the vblank event. As config_valid is actually
asserted by the hardware after the vblank event, during the prefetch
phase, when we get to arming the vblank event we are going to send it
at the next vblank, in effect halving the vblank rate from the userspace
perspective.

Fix it by sending the userspace event from the IRQ handler, when we
handle the config_valid interrupt, which syncs with the time when the
hardware is active with the new parameters.

Reported-by: Alexandru-Cosmin Gheorghe <alexandru-cosmin.gheorghe@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