From patchwork Thu Jun 15 08:24:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 9788347 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 DF8E26038E for ; Thu, 15 Jun 2017 08:24:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CF06526E55 for ; Thu, 15 Jun 2017 08:24:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C3C35284B5; Thu, 15 Jun 2017 08:24:00 +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 833D726E55 for ; Thu, 15 Jun 2017 08:24:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751620AbdFOIX7 (ORCPT ); Thu, 15 Jun 2017 04:23:59 -0400 Received: from galahad.ideasonboard.com ([185.26.127.97]:35691 "EHLO galahad.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751908AbdFOIX6 (ORCPT ); Thu, 15 Jun 2017 04:23:58 -0400 Received: from avalon.ideasonboard.com (unknown [IPv6:2001:268:c037:db14:f920:322a:1f4a:5bdb]) by galahad.ideasonboard.com (Postfix) with ESMTPSA id 53921201F5; Thu, 15 Jun 2017 10:23:33 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1497515014; bh=I8d8ZW0ZuVIDgmNpjCT5UqcNzcMX7JBF4FEZqz0qYUk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Dx4ECsfJZUJaCcVO9pVRFKx+P4ExstHRHGBmxrdMnFPkGNwTmnWhUEl63657rIWMY /Min8ky7mX4TaUNHCw8WRPhAfu/AQcz4VNxzNyGfj5xxakt5YSviARIQng0fyaMDgx 1sR+CfFiHU5tmRIjxN+1dYruhNQfADc9MxkzGkho= From: Laurent Pinchart To: linux-media@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org Subject: [PATCH 5/6] v4l: vsp1: Fill display list headers without holding dlm spinlock Date: Thu, 15 Jun 2017 11:24:08 +0300 Message-Id: <20170615082409.9523-6-laurent.pinchart+renesas@ideasonboard.com> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170615082409.9523-1-laurent.pinchart+renesas@ideasonboard.com> References: <20170615082409.9523-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 --- 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 7d8f37772b56..534100581404 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.