From patchwork Sun Oct 12 20:40:33 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Prabhakar X-Patchwork-Id: 5071851 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 23875C11AC for ; Sun, 12 Oct 2014 20:43:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5893520179 for ; Sun, 12 Oct 2014 20:43:50 +0000 (UTC) Received: from devils.ext.ti.com (devils.ext.ti.com [198.47.26.153]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5F8D520176 for ; Sun, 12 Oct 2014 20:43:49 +0000 (UTC) Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id s9CKgnsY009840; Sun, 12 Oct 2014 15:42:49 -0500 Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id s9CKgnMg030883; Sun, 12 Oct 2014 15:42:49 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DFLE73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.3.174.1; Sun, 12 Oct 2014 15:42:49 -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 s9CKgmR4001975; Sun, 12 Oct 2014 15:42:48 -0500 Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id 6B0D980627; Sun, 12 Oct 2014 15:42:48 -0500 (CDT) 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 BE5C98062E for ; Sun, 12 Oct 2014 15:40:58 -0500 (CDT) Received: from neches.ext.ti.com (neches.ext.ti.com [192.91.81.29]) by dlelxv84.itg.ti.com (8.14.3/8.13.8) with ESMTP id s9CKewd4026894 for ; Sun, 12 Oct 2014 15:40:58 -0500 Received: from mail6.bemta7.messagelabs.com (mail6.bemta7.messagelabs.com [216.82.255.55]) by neches.ext.ti.com (8.13.7/8.13.7) with ESMTP id s9CKewBH002737 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 12 Oct 2014 15:40:58 -0500 Received: from [216.82.253.67:49163] by server-8.bemta-7.messagelabs.com id C5/F4-02257-A57EA345; Sun, 12 Oct 2014 20:40:58 +0000 X-Env-Sender: prabhakar.csengg@gmail.com X-Msg-Ref: server-10.tower-158.messagelabs.com!1413146455!8643569!1 X-Originating-IP: [209.85.212.181] X-SpamReason: No, hits=0.2 required=7.0 tests=RCVD_ILLEGAL_IP X-StarScan-Received: X-StarScan-Version: 6.12.2; banners=-,-,- X-VirusChecked: Checked Received: (qmail 2697 invoked from network); 12 Oct 2014 20:40:57 -0000 Received: from mail-wi0-f181.google.com (HELO mail-wi0-f181.google.com) (209.85.212.181) by server-10.tower-158.messagelabs.com with RC4-SHA encrypted SMTP; 12 Oct 2014 20:40:57 -0000 Received: by mail-wi0-f181.google.com with SMTP id hi2so5921534wib.14 for ; Sun, 12 Oct 2014 13:40:55 -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=suLGLJZVLPuFmNn8zHcubMVNzNXWnzZsUHjqNdz/Bdk=; b=q59NmIU5z3vJgIVpV13kJ7AvV1PXLQWJwh3i/dvMvAgakTbTcq4Vf555onEUZxstEb gn/U1Yo0EjubxNwYlXh8nir58qPM2+qpFFgj8udzX65e3WEJDIt3O4nfO3wEQZ4kwK9b oaffV2BvqRuhWCofbJMoqlySlxPdRohDRGykR6bRQg2sfGCtKkgEQu3C3lAJb74CZzrx nvtCSEbssK0m0cWlI3mdonDFwaMOBaYJ+oq1WyvjLlDXeQHkso997xVIjqmSR8Rnfeip MxUWYqDlp8M5uj3LNA5h5LR1VA0yxVZ+btdJx8fryEuqOLmEwaQfCA1uWKVdpPhhaBxc qhpw== X-Received: by 10.180.10.162 with SMTP id j2mr16695692wib.72.1413146455664; Sun, 12 Oct 2014 13:40:55 -0700 (PDT) Received: from tango-charlie.Home ([2.127.193.40]) by mx.google.com with ESMTPSA id y5sm9970930wix.10.2014.10.12.13.40.54 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 12 Oct 2014 13:40:54 -0700 (PDT) From: "Lad, Prabhakar" To: LMML Subject: [PATCH 03/15] media: davinci: vpbe: use vb2_ops_wait_prepare/finish helper functions Date: Sun, 12 Oct 2014 21:40:33 +0100 Message-ID: <1413146445-7304-4-git-send-email-prabhakar.csengg@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1413146445-7304-1-git-send-email-prabhakar.csengg@gmail.com> References: <1413146445-7304-1-git-send-email-prabhakar.csengg@gmail.com> CC: DLOS , LKML 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=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 this patch makes use of vb2_ops_wait_prepare/finish helper functions. Signed-off-by: Lad, Prabhakar --- drivers/media/platform/davinci/vpbe_display.c | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/drivers/media/platform/davinci/vpbe_display.c b/drivers/media/platform/davinci/vpbe_display.c index e2bda17..6f9599d 100644 --- a/drivers/media/platform/davinci/vpbe_display.c +++ b/drivers/media/platform/davinci/vpbe_display.c @@ -308,20 +308,6 @@ static void vpbe_buf_cleanup(struct vb2_buffer *vb) spin_unlock_irqrestore(&layer->irqlock, flags); } -static void vpbe_wait_prepare(struct vb2_queue *vq) -{ - struct vpbe_layer *layer = vb2_get_drv_priv(vq); - - mutex_unlock(&layer->opslock); -} - -static void vpbe_wait_finish(struct vb2_queue *vq) -{ - struct vpbe_layer *layer = vb2_get_drv_priv(vq); - - mutex_lock(&layer->opslock); -} - static int vpbe_start_streaming(struct vb2_queue *vq, unsigned int count) { struct vpbe_layer *layer = vb2_get_drv_priv(vq); @@ -394,8 +380,8 @@ static void vpbe_stop_streaming(struct vb2_queue *vq) static struct vb2_ops video_qops = { .queue_setup = vpbe_buffer_queue_setup, - .wait_prepare = vpbe_wait_prepare, - .wait_finish = vpbe_wait_finish, + .wait_prepare = vb2_ops_wait_prepare, + .wait_finish = vb2_ops_wait_finish, .buf_prepare = vpbe_buffer_prepare, .start_streaming = vpbe_start_streaming, .stop_streaming = vpbe_stop_streaming, @@ -1749,7 +1735,7 @@ static int vpbe_display_probe(struct platform_device *pdev) q->buf_struct_size = sizeof(struct vpbe_disp_buffer); q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; q->min_buffers_needed = 1; - + q->lock = &disp_dev->dev[i]->opslock; err = vb2_queue_init(q); if (err) { v4l2_err(v4l2_dev, "vb2_queue_init() failed\n");