From patchwork Wed Jul 22 22:42:08 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shuah Khan X-Patchwork-Id: 6847501 Return-Path: X-Original-To: patchwork-linux-samsung-soc@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 8C4509F1D4 for ; Wed, 22 Jul 2015 22:42:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BF6062066E for ; Wed, 22 Jul 2015 22:42:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DF44320670 for ; Wed, 22 Jul 2015 22:42:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752665AbbGVWmq (ORCPT ); Wed, 22 Jul 2015 18:42:46 -0400 Received: from resqmta-po-11v.sys.comcast.net ([96.114.154.170]:57667 "EHLO resqmta-po-11v.sys.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752586AbbGVWmp (ORCPT ); Wed, 22 Jul 2015 18:42:45 -0400 Received: from resomta-po-04v.sys.comcast.net ([96.114.154.228]) by resqmta-po-11v.sys.comcast.net with comcast id vaik1q0074vw8ds01aikbP; Wed, 22 Jul 2015 22:42:44 +0000 Received: from mail.gonehiking.org ([73.181.52.62]) by resomta-po-04v.sys.comcast.net with comcast id vaii1q00W1LXgTt01aijdU; Wed, 22 Jul 2015 22:42:44 +0000 Received: from lorien.internal (lorien-wl.internal [192.168.1.40]) by mail.gonehiking.org (Postfix) with ESMTP id 6166B12041B; Wed, 22 Jul 2015 16:42:42 -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 Cc: Shuah Khan , linux-media@vger.kernel.org, alsa-devel@alsa-project.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devel@driverdev.osuosl.org Subject: [PATCH v2 07/19] media: platform omap3isp: Update graph_mutex to graph_lock spinlock Date: Wed, 22 Jul 2015 16:42:08 -0600 Message-Id: <37d1b3c4cfa07bd17daa30e649c500671153280a.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=1437604964; bh=BbEBdfXJ4xqQDPY08K84sqdedJG2DhMJm2FsV6OUrO4=; h=Received:Received:Received:From:To:Subject:Date:Message-Id; b=bc771noYf4ZaF9njC0G9vewIHoHUJpQRpcwYX5/jy9Ep1t5V4UppJhVcx2sOxp+E9 qd9m4uyJ6Ya2G1he38gbi/hkWptl0bLA88LrpBfJuD2uZ+AAidMwAAMu5eLYZTfZ9x f89MowLhQUh73mjJ2a7186BaiL48VuAXOpOgVieYzP/w5Dn+bcq6fgwdrtNCLHsQn5 mzmJw9xPtYQF//Bi4Ht1T/ErIEe+akpEjxQ5hO+meNSgUY2BICv8oslmPJYo1e514Q eNbOmJQCuJpkeomTpFBA2q31ZmxhhSs61feO7ujiEWwxDvt9zv+qpZh1Fbmsqe1twl WB4+lTvbqWdXg== Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-8.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.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/media/platform/omap3isp/isp.c | 4 ++-- drivers/media/platform/omap3isp/ispvideo.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/media/platform/omap3isp/isp.c b/drivers/media/platform/omap3isp/isp.c index 18d0a87..a6e7f92 100644 --- a/drivers/media/platform/omap3isp/isp.c +++ b/drivers/media/platform/omap3isp/isp.c @@ -789,7 +789,7 @@ int omap3isp_pipeline_pm_use(struct media_entity *entity, int use) int change = use ? 1 : -1; int ret; - mutex_lock(&entity->parent->graph_mutex); + spin_lock(&entity->parent->graph_lock); /* Apply use count to node. */ entity->use_count += change; @@ -800,7 +800,7 @@ int omap3isp_pipeline_pm_use(struct media_entity *entity, int use) if (ret < 0) entity->use_count -= change; - mutex_unlock(&entity->parent->graph_mutex); + spin_unlock(&entity->parent->graph_lock); return ret; } diff --git a/drivers/media/platform/omap3isp/ispvideo.c b/drivers/media/platform/omap3isp/ispvideo.c index d285af1..9ec3bb7 100644 --- a/drivers/media/platform/omap3isp/ispvideo.c +++ b/drivers/media/platform/omap3isp/ispvideo.c @@ -229,7 +229,7 @@ static int isp_video_get_graph_data(struct isp_video *video, struct media_device *mdev = entity->parent; struct isp_video *far_end = NULL; - 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))) { @@ -251,7 +251,7 @@ static int isp_video_get_graph_data(struct isp_video *video, far_end = __video; } - mutex_unlock(&mdev->graph_mutex); + spin_unlock(&mdev->graph_lock); if (video->type == V4L2_BUF_TYPE_VIDEO_CAPTURE) { pipe->input = far_end;