From patchwork Fri Mar 9 10:09:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Kocialkowski X-Patchwork-Id: 10270309 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 62B1D60236 for ; Fri, 9 Mar 2018 10:11:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4ACCF29D82 for ; Fri, 9 Mar 2018 10:11:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3FA6F29D85; Fri, 9 Mar 2018 10:11:39 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable 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 C8D5629D82 for ; Fri, 9 Mar 2018 10:11:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751046AbeCIKKm (ORCPT ); Fri, 9 Mar 2018 05:10:42 -0500 Received: from mail.bootlin.com ([62.4.15.54]:49655 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750954AbeCIKKl (ORCPT ); Fri, 9 Mar 2018 05:10:41 -0500 Received: by mail.bootlin.com (Postfix, from userid 110) id 9345B20722; Fri, 9 Mar 2018 11:10:38 +0100 (CET) Received: from localhost.localdomain (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.bootlin.com (Postfix) with ESMTPSA id 0423420644; Fri, 9 Mar 2018 11:10:38 +0100 (CET) From: Paul Kocialkowski To: linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com Cc: Icenowy Zheng , Florent Revest , Alexandre Courbot , Hans Verkuil , Laurent Pinchart , Sakari Ailus , Maxime Ripard , Thomas van Kleef , "Signed-off-by : Bob Ham" , Thomas Petazzoni , Chen-Yu Tsai , Paul Kocialkowski Subject: [PATCH 1/9] media: vim2m: Try to schedule a m2m device run on request submission Date: Fri, 9 Mar 2018 11:09:25 +0100 Message-Id: <20180309100933.15922-2-paul.kocialkowski@bootlin.com> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180309100933.15922-1-paul.kocialkowski@bootlin.com> References: <20180309100933.15922-1-paul.kocialkowski@bootlin.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 In the most basic use scenario, where only one output and one capture buffers are queued and the request is submitted, there is no provision to try to schedule a m2m device run. This adds the appropriate call to the vim2m_request_submit so that it can start in that scenario. Signed-off-by: Paul Kocialkowski --- drivers/media/platform/vim2m.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/vim2m.c b/drivers/media/platform/vim2m.c index 02793dd9a330..578c9170083c 100644 --- a/drivers/media/platform/vim2m.c +++ b/drivers/media/platform/vim2m.c @@ -933,9 +933,20 @@ static int vim2m_request_submit(struct media_request *req, struct media_request_entity_data *_data) { struct v4l2_request_entity_data *data; + struct vim2m_ctx *ctx; + int rc; data = to_v4l2_entity_data(_data); - return vb2_request_submit(data); + + ctx = container_of(_data->entity, struct vim2m_ctx, req_entity.base); + + rc = vb2_request_submit(data); + if (rc) + return rc; + + v4l2_m2m_try_schedule(ctx->fh.m2m_ctx); + + return 0; } static const struct media_request_entity_ops vim2m_request_entity_ops = {