Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp1890438rwn; Fri, 9 Sep 2022 05:46:58 -0700 (PDT) X-Google-Smtp-Source: AA6agR74R5hjQlcFv6kutgucyEOCROGjrFFAssVW4f34wRKn1M9neIIOGlg4dB6VUNiHyj9bH8Pg X-Received: by 2002:a05:6a02:205:b0:420:8b7e:3ff with SMTP id bh5-20020a056a02020500b004208b7e03ffmr11680988pgb.427.1662727617978; Fri, 09 Sep 2022 05:46:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662727617; cv=none; d=google.com; s=arc-20160816; b=eIgK63bqg5njLH6l2OTTlZnIePzk8z38iUE/81GGEylZ9df5AR1RiiwdfYt3RYkj4z C5UvuyupxrchKgfDFql/b4pX5u+A1ebyqBQSyxSlbFEoWNo1Ii5ESbfjEutmPPUCHz3D nLDTUuLiNva3aQxuh0h+y55EGlpsG1TkKVv/OjcH1c9B0zpkcQNKS4X1g6K8GIgpzeAI 3hoR3DqdVQwLU5VmqqCD1+7WcowXKXRKRcnldJLPnxCPjNXvEFTuRfeelHvU+aJiWr2v u3e7tjJe188IYdvmtR3pdYKN45xQAuTTFuk2Y5nrGhYDxnkpMS4zGAoSdrx5uJCKV577 Byvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=GQu9OOiSMsJHZGbcaTK0YT9iNdOPqIYT0kFiO4xh8G8=; b=h/pQ1h+IgYTMZ6u0LBdBwm7SOE/cbw8ooIj3BflYsGPXW+c3xb1Ev9Xsmnn2BolzTU eEKpCrsDjSlUxlKu0Nn726ZEhIpDLmjIDT2hagIMM+faPsU/C92xCi5Ru1HosN9g7Ytv U+AzyZ+lOpCH+Qi2bJh7pqw7L7GZzc4ut33r7b3TwvKyof33pq0i8F00Y9XIZv/GD4vm Ptx50tvsyNhrrj2YTpH18o0ZQuA4sPnv+qwzuJR/uHlVgOYaSmY9UzhPt5M3RLhDuVmH 1azN/TDDjYRL5onFaOKG/RGoNikzjbce4qN3LPlgF43e8CLr184ceXS0tZFHzgRoyNdq H10Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=xs4all.nl Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ch12-20020a056a00288c00b00537ee52f4e7si455211pfb.140.2022.09.09.05.46.46; Fri, 09 Sep 2022 05:46:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=xs4all.nl Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229881AbiIIMTq (ORCPT + 99 others); Fri, 9 Sep 2022 08:19:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41548 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229716AbiIIMTU (ORCPT ); Fri, 9 Sep 2022 08:19:20 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8EEF313FA64; Fri, 9 Sep 2022 05:16:52 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id D815961DF5; Fri, 9 Sep 2022 12:16:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 092BDC433C1; Fri, 9 Sep 2022 12:16:49 +0000 (UTC) Message-ID: <43a27419-1019-f0df-e9c5-6982bd2481c8@xs4all.nl> Date: Fri, 9 Sep 2022 14:16:48 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH] Allow S/G_PARM for stateful decoder Content-Language: en-US To: Dikshita Agarwal , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Cc: stanimir.varbanov@linaro.org, quic_vgarodia@quicinc.com, quic_majja@quicinc.com, quic_jdas@quicinc.com References: <1661759670-19902-1-git-send-email-quic_dikshita@quicinc.com> From: Hans Verkuil In-Reply-To: <1661759670-19902-1-git-send-email-quic_dikshita@quicinc.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-8.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,NICE_REPLY_A,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Hi Dikshita, First I'll comment on this patch, then at the end I have more high-level comments. On 29/08/2022 09:54, Dikshita Agarwal wrote: > Some stateful decoder supports S/G_PARM similar to a decoder -> decoders BTW, which decoder drivers support this in mainline? Or is this for out-of-tree drivers? > stateful encoder. S_PARM(OUTPUT) reserves hardware decoder > resources, and G_PARM(CAPTURE) returns the embedded > frame interval. Allow the same with this change. > > Signed-off-by: Dikshita Agarwal > --- > utils/v4l2-compliance/v4l2-test-formats.cpp | 4 ---- > 1 file changed, 4 deletions(-) > > diff --git a/utils/v4l2-compliance/v4l2-test-formats.cpp b/utils/v4l2-compliance/v4l2-test-formats.cpp > index 269a383..e996558 100644 > --- a/utils/v4l2-compliance/v4l2-test-formats.cpp > +++ b/utils/v4l2-compliance/v4l2-test-formats.cpp > @@ -64,8 +64,6 @@ static int testEnumFrameIntervals(struct node *node, __u32 pixfmt, > ret = doioctl(node, VIDIOC_ENUM_FRAMEINTERVALS, &frmival); > if (ret == ENOTTY) > return ret; > - // M2M devices don't support this, except for stateful encoders > - fail_on_test(node->is_m2m && !(node->codec_mask & STATEFUL_ENCODER)); M2M devices still don't support this, except for stateful codecs. So this test should still be there, just changed to: !(node->codec_mask & (STATEFUL_ENCODER | STATEFUL_DECODER)) > if (f == 0 && ret == EINVAL) { > if (type == V4L2_FRMSIZE_TYPE_DISCRETE) > warn("found framesize %dx%d, but no frame intervals\n", w, h); > @@ -1367,8 +1365,6 @@ static int testParmType(struct node *node, unsigned type) > } > if (ret == ENOTTY) > return ret; > - // M2M devices don't support this, except for stateful encoders > - fail_on_test(node->is_m2m && !is_stateful_enc); Similar. > if (ret == EINVAL) > return ENOTTY; > if (ret) But modifying the utility is something you only do if the spec has first been updated. So the stateful decoder chapter needs to be modified so it explains how G/S_PARM shall be used. And ideally have at least one driver that supports it. Regards, Hans