From b5a8b40ebbc0d2e4b8273e7e0ac38efae18e4e71 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Tue, 30 May 2017 03:40:35 +0300 Subject: [PATCH] v4l: vsp1: Fill display list headers without holding dlm spinlock The display list headers are filled using information from the display list only. Lower the display list manager spinlock contention by filling the headers without holding the lock. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham Acked-by: Mauro Carvalho Chehab --- drivers/media/platform/vsp1/vsp1_dl.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/vsp1/vsp1_dl.c b/drivers/media/platform/vsp1/vsp1_dl.c index aaf17b13fd787..dc47e236c780d 100644 --- a/drivers/media/platform/vsp1/vsp1_dl.c +++ b/drivers/media/platform/vsp1/vsp1_dl.c @@ -483,8 +483,6 @@ void vsp1_dl_list_commit(struct vsp1_dl_list *dl) unsigned long flags; bool update; - spin_lock_irqsave(&dlm->lock, flags); - if (dl->dlm->mode == VSP1_DL_MODE_HEADER) { struct vsp1_dl_list *dl_child; @@ -501,7 +499,11 @@ void vsp1_dl_list_commit(struct vsp1_dl_list *dl) vsp1_dl_list_fill_header(dl_child, last); } + } + spin_lock_irqsave(&dlm->lock, flags); + + if (dl->dlm->mode == VSP1_DL_MODE_HEADER) { /* * Commit the head display list to hardware. Chained headers * will auto-start. -- 2.39.5