summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/armada/armada_overlay.c
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@armlinux.org.uk>2017-07-08 10:16:48 +0100
committerRussell King <rmk+kernel@armlinux.org.uk>2017-12-08 12:18:46 +0000
commita3f6a18f9a74b64209f8ab957dd94ade8bf5a7b2 (patch)
tree3b864dcbd95f86aed5103a5819f30bc9c5fbe960 /drivers/gpu/drm/armada/armada_overlay.c
parentd76dcc7236b8b1b8c2c61b380e7d803d47b20ffa (diff)
downloadlinux-a3f6a18f9a74b64209f8ab957dd94ade8bf5a7b2.tar.bz2
drm/armada: move overlay plane work out from under spinlock
Move the overlay plane work out from under the spinlock so that both the primary and overlay planes run their work in the same context. This is necessary so that we can use frame works with the overlay plane. However, we must update the CRTC registers under the spinlock, so fix up the overlay code for that. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Diffstat (limited to 'drivers/gpu/drm/armada/armada_overlay.c')
-rw-r--r--drivers/gpu/drm/armada/armada_overlay.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/armada/armada_overlay.c b/drivers/gpu/drm/armada/armada_overlay.c
index 995463cd542d..04746ade74e6 100644
--- a/drivers/gpu/drm/armada/armada_overlay.c
+++ b/drivers/gpu/drm/armada/armada_overlay.c
@@ -84,10 +84,14 @@ static void armada_ovl_plane_work(struct armada_crtc *dcrtc,
{
struct armada_ovl_plane *dplane = container_of(work->plane,
struct armada_ovl_plane, base.base);
+ unsigned long flags;
trace_armada_ovl_plane_work(&dcrtc->crtc, work->plane);
+ spin_lock_irqsave(&dcrtc->irq_lock, flags);
armada_drm_crtc_update_regs(dcrtc, dplane->vbl.regs);
+ spin_unlock_irqrestore(&dcrtc->irq_lock, flags);
+
armada_ovl_retire_fb(dplane, NULL);
}