From patchwork Fri Sep 15 21:11:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Fricke X-Patchwork-Id: 13387709 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A4577CD37AF for ; Fri, 15 Sep 2023 21:12:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=3Jnq+PbKl6cIJp0vK1+CsqjHnhiWRt8Ygnf+UX+tz0U=; b=YsxVwokx9YMMvE 4Jpeknhl8dTZdlqIY8b2Eb5Ef1EK08kcewbJlExJvNG+A3cHQU1Nv5ssB9vSnYA7hOLBzd6+qfnDP 81xOWoZCwY9vtV7irXMr3HOhSkKXa+NPOXGaqBDpu+30POKxsPpAvATdv0X+GixkAwMGB9zr4ap2j ac2KRekHfc9/zeDSfl8+WSTQjUZDfjZ8qEvc11Rtxla2STp+DXV+tJ/ws91AXu5lbcs3meTrvXlqj 6/S5NvX5DNs9KZemdH5B8UprsQCCP8GvYqJN4as5CVD2H/UBVWc/6KYNybgIr+p6WlKPJyAWY52KT cRCeO2LFNMB9wKATN7sg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qhG6f-00BPFn-2v; Fri, 15 Sep 2023 21:12:05 +0000 Received: from madras.collabora.co.uk ([46.235.227.172]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qhG6W-00BP9Y-1l for linux-arm-kernel@lists.infradead.org; Fri, 15 Sep 2023 21:11:57 +0000 Received: from localhost (89-26-75-29.dyn.cablelink.at [89.26.75.29]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: sebastianfricke) by madras.collabora.co.uk (Postfix) with ESMTPSA id EC5DD660731C; Fri, 15 Sep 2023 22:11:54 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1694812315; bh=10L+mW/hGohZLpaKH+R8m7hSr+3EWsY0PRUN1tnoT/c=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=luJd27SFRJewaQNV4dtRjlYcK3YYG0+yrP7S3Ejo+aHUzl6PYjmX1iLhRIMibyAI0 LEw3K2Nob6R45JR9IcjkofDvbUI84oQQ7bkXyqxXzkybxqluoOK3ReU+npZTh2mba1 BAq5lGgRyWRWq4qHOeKom5WKhlTB3AfDLrH+LaSyD90Ea0XCzXZoqH/xcvtOPLBqF+ WesNW0bkB8TO3jxxVJI93Co7qhRb86cGtwy7oD/WWojCA80YAhyQA/UstsmU5on9DJ MfSwpeFLMtrwUbFPlHOgwaK+nzbPiXhWg8yVPmDgtu2Jy6gERBfKUj7S9jSCqrXdao mypczTAlLEo5A== From: Sebastian Fricke Date: Fri, 15 Sep 2023 23:11:31 +0200 Subject: [PATCH v12 2/7] media: v4l2: Allow M2M job queuing w/o streaming CAP queue MIME-Version: 1.0 Message-Id: <20230915-wave5_v12_on_media_master-v12-2-92fc66cd685d@collabora.com> References: <20230915-wave5_v12_on_media_master-v12-0-92fc66cd685d@collabora.com> In-Reply-To: <20230915-wave5_v12_on_media_master-v12-0-92fc66cd685d@collabora.com> To: Mauro Carvalho Chehab , Nas Chung , Sascha Hauer , Fabio Estevam , Rob Herring , Shawn Guo , Philipp Zabel , Jackson Lee , Krzysztof Kozlowski , NXP Linux Team , Hans Verkuil , Conor Dooley , Pengutronix Kernel Team Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Sebastian Fricke , Robert Beckett , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@collabora.com, Nicolas Dufresne X-Mailer: b4 0.11.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1694812307; l=1354; i=sebastian.fricke@collabora.com; s=linux-media; h=from:subject:message-id; bh=10L+mW/hGohZLpaKH+R8m7hSr+3EWsY0PRUN1tnoT/c=; b=WsenXnltqRAyMoRQG6+C77rrc/du2DWnzPMg8BN3t0PH7d0f1LxxPeOZkqgpxEGWILK3t6f7o3q4 FVh3ZxNUBWlHE+gFBsaJr3cRFKWABwn6t4/AtcDRc4Bx2Ph82omb X-Developer-Key: i=sebastian.fricke@collabora.com; a=ed25519; pk=pYXedPwrTtErcj7ERYeo/IpTrpe4QbJuEzSB52fslBg= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230915_141156_713049_E3E5F162 X-CRM114-Status: GOOD ( 12.35 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Allow decoder drivers to enable set the ignore_streaming flag on their CAPTURE queue, to allow queuing jobs to the M2M ready queue and perform firmware sequence analysis with just a streaming OUTPUT queue and available bitstream data. Signed-off-by: Sebastian Fricke Signed-off-by: Nicolas Dufresne --- drivers/media/v4l2-core/v4l2-mem2mem.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/media/v4l2-core/v4l2-mem2mem.c b/drivers/media/v4l2-core/v4l2-mem2mem.c index 0cc30397fbad..2dbbe93be257 100644 --- a/drivers/media/v4l2-core/v4l2-mem2mem.c +++ b/drivers/media/v4l2-core/v4l2-mem2mem.c @@ -301,9 +301,12 @@ static void __v4l2_m2m_try_queue(struct v4l2_m2m_dev *m2m_dev, dprintk("Trying to schedule a job for m2m_ctx: %p\n", m2m_ctx); - if (!m2m_ctx->out_q_ctx.q.streaming - || !m2m_ctx->cap_q_ctx.q.streaming) { - dprintk("Streaming needs to be on for both queues\n"); + if (!m2m_ctx->out_q_ctx.q.streaming || + (!m2m_ctx->cap_q_ctx.q.streaming && !m2m_ctx->cap_q_ctx.ignore_streaming)) { + if (!m2m_ctx->cap_q_ctx.ignore_streaming) + dprintk("Streaming needs to be on for both queues\n"); + else + dprintk("Streaming needs to be on for the OUTPUT queue\n"); return; }