From patchwork Thu Oct 12 11:01:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Fricke X-Patchwork-Id: 13418869 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 89402CDB484 for ; Thu, 12 Oct 2023 11:03:12 +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=+fXrHiZnru4rIlvmHcjdTItBDNgmuQsXRvzBQHhx210=; b=Vpfc0vWoeZtoAr jb/YidqFoxEl3n/hPGXEsennN009rlVyWn9k/qW4rG235YHeElmRlSqEF2FDsG+8gi7BhrDZUgNFy NdGW3uDvq9Qp155DNsnp6WsD/LZXKVaYtmkNLQEgKVpckMpAHEsHYKjPjNU7hPdVOv3abQ0FWDFLo ae9fxeVPMRiIxQcZmvNnONh3UrKyopS/IY9Vs7OFt4z4fbAHFAITkdbBUTwQC+FBqOTtdiafXsSbc U9GPBSm8XHNfS77H6U6t/PB5v4vtTQrQFP15XuLblTVpm7hCTpGB1FkR+xD4uwTkNjDQqkdn8Zkc9 qhbqbRPDE+limBu9mK7w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qqtSk-000jG6-2U; Thu, 12 Oct 2023 11:02:42 +0000 Received: from madras.collabora.co.uk ([2a00:1098:0:82:1000:25:2eeb:e5ab]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qqtSa-000j9I-2H for linux-arm-kernel@lists.infradead.org; Thu, 12 Oct 2023 11:02:34 +0000 Received: from localhost (dynamic-002-247-255-251.2.247.pool.telefonica.de [2.247.255.251]) (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 262F56607342; Thu, 12 Oct 2023 12:02:31 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1697108551; bh=gZD8FwPRmycZ5AwP7wqTItCK+pu51d1GjKx5r6xw4DU=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=QlVXQA/VADtK//yFCrY4S4jYyc8cPBxsyIZ7podteN1bH4OkNph6n7cPMdpufj74h TeEMmj0Hn6mWM3jFcIUsA3nsP+xNy3mugsLmI0wuDbKJWEBra4tD1Ei/jq+oi8RQXc vb9sW8snw2SxS/eoThKgb0U+vH9ab2SmG7W1GA/K19CqCkqnq2r6mEcQZlYdaFY7qU lyorzqxzjt3LBIl/QlXFuO07mseoWfqFHChPHlOWXWruHDPhOBteWBQGm6+Dg+8q58 E69wzEZZAYbBtpkv9vp2ezcuJPxfkzLQiKcpezYBdTponeAHkTZe1IFryXw52pPKc2 h78VAp+wDNJGQ== From: Sebastian Fricke Date: Thu, 12 Oct 2023 13:01:00 +0200 Subject: [PATCH v13 2/8] media: v4l2: Allow M2M job queuing w/o streaming CAP queue MIME-Version: 1.0 Message-Id: <20230929-wave5_v13_media_master-v13-2-5ac60ccbf2ce@collabora.com> References: <20230929-wave5_v13_media_master-v13-0-5ac60ccbf2ce@collabora.com> In-Reply-To: <20230929-wave5_v13_media_master-v13-0-5ac60ccbf2ce@collabora.com> To: Krzysztof Kozlowski , NXP Linux Team , Conor Dooley , Mauro Carvalho Chehab , Jackson Lee , Hans Verkuil , Sascha Hauer , Rob Herring , Pengutronix Kernel Team , Shawn Guo , Philipp Zabel , Nas Chung , Fabio Estevam Cc: linux-media@vger.kernel.org, Tomasz Figa , linux-kernel@vger.kernel.org, Sebastian Fricke , Nicolas Dufresne , kernel@collabora.com, Robert Beckett , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Darren Etheridge X-Mailer: b4 0.11.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1697108536; l=1378; i=sebastian.fricke@collabora.com; s=linux-media; h=from:subject:message-id; bh=gZD8FwPRmycZ5AwP7wqTItCK+pu51d1GjKx5r6xw4DU=; b=GSWYtrUVYuT1Pr7eKW2BjF17Vp02rE0VkumlNl3Sr/FOBnN6NinB5OalP/F6rXux/kLWAohpAjRY 3zCiiLndDVg1pOQpMyC0tX5gh5ZWJRWeIyHbF2NdQH7QE8OFnMIf 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-20231012_040232_870917_1C69883B X-CRM114-Status: GOOD ( 11.86 ) 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 set the ignore_cap_streaming flag 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 Signed-off-by: Deborah Brouwer --- 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..9e983176542b 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->ignore_cap_streaming)) { + if (!m2m_ctx->ignore_cap_streaming) + dprintk("Streaming needs to be on for both queues\n"); + else + dprintk("Streaming needs to be on for the OUTPUT queue\n"); return; }