From patchwork Mon Jun 26 18:12:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 9810231 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B1EB060209 for ; Mon, 26 Jun 2017 18:13:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B1ACD28520 for ; Mon, 26 Jun 2017 18:13:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A638E285ED; Mon, 26 Jun 2017 18:13:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 38DC228520 for ; Mon, 26 Jun 2017 18:13:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751439AbdFZSMa (ORCPT ); Mon, 26 Jun 2017 14:12:30 -0400 Received: from galahad.ideasonboard.com ([185.26.127.97]:56945 "EHLO galahad.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751403AbdFZSM3 (ORCPT ); Mon, 26 Jun 2017 14:12:29 -0400 Received: from avalon.bb.dnainternet.fi (dfj612ybrt5fhg77mgycy-3.rev.dnainternet.fi [IPv6:2001:14ba:21f5:5b00:2e86:4862:ef6a:2804]) by galahad.ideasonboard.com (Postfix) with ESMTPSA id 1941D204B8; Mon, 26 Jun 2017 20:12:21 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1498500741; bh=1GbiacKy8SMxiHD2JC4MDPEfwstnRq8oaz6pLMyc6K4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bmR3e2FI3B2fZDNe54UAds6E5ZPSVo9EskTExx5wmPWN/gBhl7eOi19EaiztX9YLU b3W3k4t3NW0NE/MbR7+cOEx+gzSIiV+EQXxflDu0+GYBjNd42L3K08w4NgwPLuwwLq LUbg54pQSDIxI4q0KjeAmIY/WPspp8XKRv8JMp5g= From: Laurent Pinchart To: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org Subject: [PATCH v2 01/14] v4l: vsp1: Fill display list headers without holding dlm spinlock Date: Mon, 26 Jun 2017 21:12:13 +0300 Message-Id: <20170626181226.29575-2-laurent.pinchart+renesas@ideasonboard.com> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170626181226.29575-1-laurent.pinchart+renesas@ideasonboard.com> References: <20170626181226.29575-1-laurent.pinchart+renesas@ideasonboard.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 aaf17b13fd78..dc47e236c780 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.