From patchwork Sun Mar 23 06:37:24 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lad, Prabhakar" X-Patchwork-Id: 3878871 Return-Path: X-Original-To: patchwork-davinci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 9CB22BF540 for ; Sun, 23 Mar 2014 06:39:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AA2D8201F4 for ; Sun, 23 Mar 2014 06:39:00 +0000 (UTC) Received: from comal.ext.ti.com (comal.ext.ti.com [198.47.26.152]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9E4C520179 for ; Sun, 23 Mar 2014 06:38:59 +0000 (UTC) Received: from dflxv15.itg.ti.com ([128.247.5.124]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id s2N6bssi007975; Sun, 23 Mar 2014 01:37:54 -0500 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id s2N6brgM023511; Sun, 23 Mar 2014 01:37:53 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.3.174.1; Sun, 23 Mar 2014 01:37:53 -0500 Received: from linux.omap.com (dlelxs01.itg.ti.com [157.170.227.31]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id s2N6br4f026325; Sun, 23 Mar 2014 01:37:53 -0500 Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id 8C71480627; Sun, 23 Mar 2014 00:37:53 -0600 (CST) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dlelxv84.itg.ti.com (dlelxv84.itg.ti.com [172.17.0.246]) by linux.omap.com (Postfix) with ESMTP id BFA8F80626 for ; Sun, 23 Mar 2014 00:37:51 -0600 (CST) Received: from medina.ext.ti.com (medina.ext.ti.com [192.91.81.31]) by dlelxv84.itg.ti.com (8.14.3/8.13.8) with ESMTP id s2N6bp8f001328 for ; Sun, 23 Mar 2014 01:37:51 -0500 Received: from mail6.bemta12.messagelabs.com (mail6.bemta12.messagelabs.com [216.82.250.247]) by medina.ext.ti.com (8.13.7/8.13.7) with ESMTP id s2N6bpR5011631 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 23 Mar 2014 01:37:51 -0500 Received: from [216.82.250.99:52884] by server-8.bemta-12.messagelabs.com id 44/8B-22246-F318E235; Sun, 23 Mar 2014 06:37:51 +0000 X-Env-Sender: prabhakar.csengg@gmail.com X-Msg-Ref: server-4.tower-126.messagelabs.com!1395556669!5942852!1 X-Originating-IP: [209.85.220.45] X-SpamReason: No, hits=0.0 required=7.0 tests=ML_RADAR_SPEW_LINKS_14, spamassassin: X-StarScan-Received: X-StarScan-Version: 6.11.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 4817 invoked from network); 23 Mar 2014 06:37:50 -0000 Received: from mail-pa0-f45.google.com (HELO mail-pa0-f45.google.com) (209.85.220.45) by server-4.tower-126.messagelabs.com with RC4-SHA encrypted SMTP; 23 Mar 2014 06:37:50 -0000 Received: by mail-pa0-f45.google.com with SMTP id kl14so4112708pab.4 for ; Sat, 22 Mar 2014 23:37:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=8J3Ik1QeT1wjsshGTJXasbwpZiYC0AL7zf2BOXEJurE=; b=c1bXhk3ojPhIxjBrvKgPl8EOee0lZateVGJJfdOoqmvPgYLV5/H7/BaTjzpF0qa+mx yYuCfe9qT/RlARLuYfXoy/rFy9oZAZuOfoVe4Gv3Zu2uRWnJmlvxz5d85PBdBixur7qj JZZeVqXEOWbkBjQtrGr7BNTKf496cpFIc955eEltbNHXGBPy3eJUYmN/NeOlxlDpzlAe vm5/RPWCq2hijMiHbhtjhotsvO53y87AyfvtF8OKr7WArjzPmWTmfLut6KEIjoKjkiRu aDpZeLVbBudsccMHrs06/7t3PnYKX0p0F/HDQ20F2HNB1c/argia0qI0PEo5spG+AsV0 wZuw== X-Received: by 10.68.190.163 with SMTP id gr3mr64413569pbc.103.1395556669014; Sat, 22 Mar 2014 23:37:49 -0700 (PDT) Received: from localhost.localdomain ([49.201.250.179]) by mx.google.com with ESMTPSA id qw8sm19388994pbb.27.2014.03.22.23.37.44 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 22 Mar 2014 23:37:48 -0700 (PDT) From: "Lad, Prabhakar" To: LMML Subject: [PATCH 1/2] staging: media: davinci: vpfe: use v4l2_fh for priority handling Date: Sun, 23 Mar 2014 12:07:24 +0530 Message-ID: <1395556645-1207-2-git-send-email-prabhakar.csengg@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1395556645-1207-1-git-send-email-prabhakar.csengg@gmail.com> References: <1395556645-1207-1-git-send-email-prabhakar.csengg@gmail.com> CC: , DLOS , Greg Kroah-Hartman , LKML , Mauro Carvalho Chehab X-BeenThere: davinci-linux-open-source@linux.davincidsp.com X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: Errors-To: davinci-linux-open-source-bounces@linux.davincidsp.com X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham 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 From: "Lad, Prabhakar" Signed-off-by: Lad, Prabhakar --- .../staging/media/davinci_vpfe/vpfe_mc_capture.h | 2 -- drivers/staging/media/davinci_vpfe/vpfe_video.c | 8 +++----- drivers/staging/media/davinci_vpfe/vpfe_video.h | 2 -- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/drivers/staging/media/davinci_vpfe/vpfe_mc_capture.h b/drivers/staging/media/davinci_vpfe/vpfe_mc_capture.h index 68f6fe4..2632a80 100644 --- a/drivers/staging/media/davinci_vpfe/vpfe_mc_capture.h +++ b/drivers/staging/media/davinci_vpfe/vpfe_mc_capture.h @@ -87,8 +87,6 @@ struct vpfe_fh { struct vpfe_video_device *video; /* Indicates whether this file handle is doing IO */ u8 io_allowed; - /* Used to keep track priority of this instance */ - enum v4l2_priority prio; }; void mbus_to_pix(const struct v4l2_mbus_framefmt *mbus, diff --git a/drivers/staging/media/davinci_vpfe/vpfe_video.c b/drivers/staging/media/davinci_vpfe/vpfe_video.c index acc8184..c86ab84 100644 --- a/drivers/staging/media/davinci_vpfe/vpfe_video.c +++ b/drivers/staging/media/davinci_vpfe/vpfe_video.c @@ -415,7 +415,6 @@ static int vpfe_open(struct file *file) video->usrs++; /* Set io_allowed member to false */ handle->io_allowed = 0; - v4l2_prio_open(&video->prio, &handle->prio); handle->video = video; file->private_data = &handle->vfh; mutex_unlock(&video->lock); @@ -532,8 +531,8 @@ static int vpfe_release(struct file *file) } /* Decrement device users counter */ video->usrs--; - /* Close the priority */ - v4l2_prio_close(&video->prio, fh->prio); + v4l2_fh_del(&fh->vfh); + v4l2_fh_exit(&fh->vfh); /* If this is the last file handle */ if (!video->usrs) video->initialized = 0; @@ -1590,8 +1589,6 @@ int vpfe_video_init(struct vpfe_video_device *video, const char *name) snprintf(video->video_dev.name, sizeof(video->video_dev.name), "DAVINCI VIDEO %s %s", name, direction); - /* Initialize prio member of device object */ - v4l2_prio_init(&video->prio); spin_lock_init(&video->irqlock); spin_lock_init(&video->dma_queue_lock); mutex_init(&video->lock); @@ -1600,6 +1597,7 @@ int vpfe_video_init(struct vpfe_video_device *video, const char *name) if (ret < 0) return ret; + set_bit(V4L2_FL_USE_FH_PRIO, &video->video_dev.flags); video_set_drvdata(&video->video_dev, video); return 0; diff --git a/drivers/staging/media/davinci_vpfe/vpfe_video.h b/drivers/staging/media/davinci_vpfe/vpfe_video.h index df0aeec..eed0864 100644 --- a/drivers/staging/media/davinci_vpfe/vpfe_video.h +++ b/drivers/staging/media/davinci_vpfe/vpfe_video.h @@ -102,8 +102,6 @@ struct vpfe_video_device { * user has selected */ enum v4l2_memory memory; - /* Used to keep track of state of the priority */ - struct v4l2_prio_state prio; /* number of open instances of the channel */ u32 usrs; /* flag to indicate whether decoder is initialized */