From patchwork Wed Jul 22 22:42:12 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shuah Khan X-Patchwork-Id: 6851341 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 021309F1D4 for ; Thu, 23 Jul 2015 06:19:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 302BA204C9 for ; Thu, 23 Jul 2015 06:19:50 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 05DFB2043C for ; Thu, 23 Jul 2015 06:19:49 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 1C2C526606C; Thu, 23 Jul 2015 08:19:48 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_NONE, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id A9181265856; Thu, 23 Jul 2015 08:08:55 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 167DB2656F0; Thu, 23 Jul 2015 00:43:11 +0200 (CEST) Received: from resqmta-po-07v.sys.comcast.net (resqmta-po-07v.sys.comcast.net [96.114.154.166]) by alsa0.perex.cz (Postfix) with ESMTP id 01B3A26070F for ; Thu, 23 Jul 2015 00:42:51 +0200 (CEST) Received: from resomta-po-18v.sys.comcast.net ([96.114.154.242]) by resqmta-po-07v.sys.comcast.net with comcast id vair1q0035E3ZMc01air5Q; Wed, 22 Jul 2015 22:42:51 +0000 Received: from mail.gonehiking.org ([73.181.52.62]) by resomta-po-18v.sys.comcast.net with comcast id vaip1q0071LXgTt01aipQL; Wed, 22 Jul 2015 22:42:50 +0000 Received: from lorien.internal (lorien-wl.internal [192.168.1.40]) by mail.gonehiking.org (Postfix) with ESMTP id D5C61120447; Wed, 22 Jul 2015 16:42:48 -0600 (MDT) From: Shuah Khan To: mchehab@osg.samsung.com, hans.verkuil@cisco.com, laurent.pinchart@ideasonboard.com, tiwai@suse.de, sakari.ailus@linux.intel.com, perex@perex.cz, crope@iki.fi, arnd@arndb.de, stefanr@s5r6.in-berlin.de, ruchandani.tina@gmail.com, chehabrafael@gmail.com, dan.carpenter@oracle.com, prabhakar.csengg@gmail.com, chris.j.arges@canonical.com, agoode@google.com, pierre-louis.bossart@linux.intel.com, gtmkramer@xs4all.nl, clemens@ladisch.de, daniel@zonque.org, vladcatoi@gmail.com, misterpib@gmail.com, damien@zamaudio.com, pmatilai@laiskiainen.org, takamichiho@gmail.com, normalperson@yhbt.net, bugzilla.frnkcg@spamgourmet.com, joe@oampo.co.uk, calcprogrammer1@gmail.com, jussi@sonarnerd.net, kyungmin.park@samsung.com, s.nawrocki@samsung.com, kgene@kernel.org, hyun.kwon@xilinx.com, michal.simek@xilinx.com, soren.brinkmann@xilinx.com, pawel@osciak.com, m.szyprowski@samsung.com, gregkh@linuxfoundation.org, skd08@gmail.com, nsekhar@ti.com, boris.brezillon@free-electrons.com, Julia.Lawall@lip6.fr, elfring@users.sourceforge.net, p.zabel@pengutronix.de, ricardo.ribalda@gmail.com Date: Wed, 22 Jul 2015 16:42:12 -0600 Message-Id: <8e4896bee216cc4aa30a16d799b6ea896e99c919.1437599281.git.shuahkh@osg.samsung.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: References: In-Reply-To: References: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20140121; t=1437604971; bh=mooJG1Nhjgmns+yHbuQnGL6Ht45kOAWh4GP7fzPGiZg=; h=Received:Received:Received:From:To:Subject:Date:Message-Id; b=JyVOAqBTpBXl8p4c0LVLkI0O41ne8gaHMIgCCvF77yhawCywTJhUvUrniLaMJ3Re2 R4Ee4KbRE5UkNAdQ3vT25SRhb3KYDSBQEtT9ctC8Av+wA1ymnj3wr4zN/SUJovhHkB VRTnKHsTu6VCWRZ4GjRPIZHr7iZPBmsmstee6XamMMIi64sFBhTAV4CNaacPLsuab0 PY/XcdN2Yx/vHqU37TAaOwxGj+Zp7b1Q2UGBWgrKBY8+oabXVCNYsavRP75yXntGmj logwA1gR94kGV1bMg3f4WcGAt9K7/IpR7/elCrssoHmDbyLxpgpulsfU5gU4eIcEgf iVIUAtubU25Mg== X-Mailman-Approved-At: Thu, 23 Jul 2015 08:08:34 +0200 Cc: devel@driverdev.osuosl.org, alsa-devel@alsa-project.org, linux-samsung-soc@vger.kernel.org, Shuah Khan , linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org Subject: [alsa-devel] [PATCH v2 11/19] staging media: davinci_vpfe: Update graph_mutex to graph_lock spinlock X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP Update graph_mutex to graph_lock spinlock to be in sync with the Media Conttroller change for the same. Signed-off-by: Shuah Khan --- drivers/staging/media/davinci_vpfe/vpfe_video.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/media/davinci_vpfe/vpfe_video.c b/drivers/staging/media/davinci_vpfe/vpfe_video.c index 87048a1..2511614 100644 --- a/drivers/staging/media/davinci_vpfe/vpfe_video.c +++ b/drivers/staging/media/davinci_vpfe/vpfe_video.c @@ -143,7 +143,7 @@ static void vpfe_prepare_pipeline(struct vpfe_video_device *video) else pipe->outputs[pipe->output_num++] = video; - mutex_lock(&mdev->graph_mutex); + spin_lock(&mdev->graph_lock); media_entity_graph_walk_start(&graph, entity); while ((entity = media_entity_graph_walk_next(&graph))) { if (entity == &video->video_dev.entity) @@ -156,7 +156,7 @@ static void vpfe_prepare_pipeline(struct vpfe_video_device *video) else pipe->outputs[pipe->output_num++] = far_end; } - mutex_unlock(&mdev->graph_mutex); + spin_unlock(&mdev->graph_lock); } /* update pipe state selected by user */ @@ -289,7 +289,7 @@ static int vpfe_pipeline_enable(struct vpfe_pipeline *pipe) entity = &pipe->inputs[0]->video_dev.entity; mdev = entity->parent; - mutex_lock(&mdev->graph_mutex); + spin_lock(&mdev->graph_lock); media_entity_graph_walk_start(&graph, entity); while ((entity = media_entity_graph_walk_next(&graph))) { @@ -300,7 +300,7 @@ static int vpfe_pipeline_enable(struct vpfe_pipeline *pipe) if (ret < 0 && ret != -ENOIOCTLCMD) break; } - mutex_unlock(&mdev->graph_mutex); + spin_unlock(&mdev->graph_lock); return ret; } @@ -329,7 +329,7 @@ static int vpfe_pipeline_disable(struct vpfe_pipeline *pipe) entity = &pipe->inputs[0]->video_dev.entity; mdev = entity->parent; - mutex_lock(&mdev->graph_mutex); + spin_lock(&mdev->graph_lock); media_entity_graph_walk_start(&graph, entity); while ((entity = media_entity_graph_walk_next(&graph))) { @@ -341,7 +341,7 @@ static int vpfe_pipeline_disable(struct vpfe_pipeline *pipe) if (ret < 0 && ret != -ENOIOCTLCMD) break; } - mutex_unlock(&mdev->graph_mutex); + spin_unlock(&mdev->graph_lock); return ret ? -ETIMEDOUT : 0; }