Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp223706rdg; Thu, 12 Oct 2023 04:02:49 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG/SnEH56mugvokgDgvMcPruOe3a+Re7au59UCbgyzwRCyy7yC0ME0qiAaT8+erZnz1yvrv X-Received: by 2002:a05:6a20:8f01:b0:152:6b63:f1e7 with SMTP id b1-20020a056a208f0100b001526b63f1e7mr27003391pzk.1.1697108569691; Thu, 12 Oct 2023 04:02:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697108569; cv=none; d=google.com; s=arc-20160816; b=yDeQ4E5LMY6tQPr9UjcT1pN1PMmFy7QAiNosazW4y0GTqo4nhbuhyB5iV2mv4H5qX8 bdIgyn/vD+Ad+AlUcqzFgB+Nln53nZ/JZnW0BUldGQQMoXP1gXP3xy2DA2fiBLE+sTiz NgYNt+Dtt8yIorK9VQHJnL8Xc/TJ9ePHOSYJgnTJpa/Xnxmq/0gP5KHVZt4fnvD7g0Wt KCAmvYIN/MtUBViLD6zseqW1CObgxAXLo1gwtSZQmQcHKyeVr3VmOxcE+zqwQsUKOCjh rmi7sdeIKHYGuN1xl9qJ4XKSM1xEoe1oV34ecuvA3dFHXsZtTCFxAWdykMgINO5ju59x 10vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=+H2jRdjGlgwn9ctHVieg/iu0NPbiFsDMNWPhoVoLjdU=; fh=qZWcwDViA/Gn9saButuIWDMNSOcTSe9IQ9H9DIcte8c=; b=GId2eNGc4s8eO/vVnPAm6yt/ZMbSJWwdUJpPMGDowP/GgbKQ/awqEwKQ+j3/F2zMYh SLdB9PywTzVAOJIOFNy0Mzju4s5ONU2uCzUlmoOGbTnuupV4sxLqZV7h2lXkLJ/7zHEU yIfhj60+m/kZRQ8ZeAn5o/O/GHgajeAVBrJzQxS+r6AOjimlk6uT12JcjQmPRjFTVc0T Lryj1eGfv/xvAE/asErFzJBe1GXy7PP6Gmn1aACHAaW+fNW4MM40Q6vkOdNBRJJYgSx4 uhM3EX50bVbbQZdyixMIsURCNoKXfGJun4b8Vvp/nTg/j3KnP0/6Alp/99Q47gljEKeB 8fQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b="QlVXQA/V"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id f2-20020a631002000000b0057771e49c25si1973399pgl.693.2023.10.12.04.02.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Oct 2023 04:02:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b="QlVXQA/V"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id A1D8482224E6; Thu, 12 Oct 2023 04:02:46 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347165AbjJLLCk (ORCPT + 99 others); Thu, 12 Oct 2023 07:02:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42076 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378036AbjJLLCd (ORCPT ); Thu, 12 Oct 2023 07:02:33 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A9A4C91; Thu, 12 Oct 2023 04:02:32 -0700 (PDT) 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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit 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-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 12 Oct 2023 04:02:46 -0700 (PDT) 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; } -- 2.25.1