Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp1533382rdb; Wed, 20 Sep 2023 11:46:43 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGBUeOMcpAWmfUhfOyY3RCu2hjUAAcM3cmEVrnr9I9TzidUb2CCcZNbEgW31H2FWLlqSOvZ X-Received: by 2002:a17:902:da83:b0:1c3:885b:3f09 with SMTP id j3-20020a170902da8300b001c3885b3f09mr3717028plx.18.1695235602890; Wed, 20 Sep 2023 11:46:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695235602; cv=none; d=google.com; s=arc-20160816; b=zldl64QXg3JNP4cP6qJB5BlzQzzrj6zvxGjY4GhdEqJLGbfSMWGsEQvIGrIP4Qy9Fb 7y5reK8dF1/ureVjxJceNLBhL7pixANzc/1WorC3PFJ43WNOak/S9SCuu+PNTYk+1eQn Qb2p7KU+cWfN1qORkcqoldXFSnVa5ZgA8eNP2txaQWuJksbkBDUFUWF7tCv+RtOWQ8B6 bItulQaSlv+pkIMhGSQ0OdOC7weaIvugL2B2T1suc/ufXSe0w4RAR4EsKLGrBEXsyatm qEe2F3V4azWMS7id2hSTF0qKRbHj3LGNNEW+WryJbhtxvmxlvsRHrE2L5gy5dVgLFUyC eO+Q== 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 :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=klqsCD86XTvwWc9qHTqpSI+uHAcUnXRwyajeb6INonM=; fh=PsDgoNCuyRPntwiXqvcIYBGiNKDjm9QZ7pE8oDrSz70=; b=YZDg4ie+JwaxTugrRX/0k4WDr5FQ9WOEskV69m4pyUQIQsriEgsqtEXVWyzf3BYbZe /NM2j3NtAz4UpokZ3VNyrLDSVBBCLIZPa6vcT3IpjuNXaZcEGooEiJ+AURgLQW4W06G7 xcdFn/MF6ybo/tDFSnmGMdQzfYX5U6xKeCzVqoQwIgN/ClmTwp8Kn6qmHxkaBoXAuBFv u08YKqDnT51+zo1HmqBYW/dzeZSUxCOVB4WZU7SGwK5fI1jjqYMmTkDfGmufRpaHXCRM RH7Qll2SxWU1LTIgstK9THA6g+zIELoOzfu0zFsBJZW4562SZXv2k3LhNYA+IhYO/y6D FpkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=Xalbv7WF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 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 morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id d10-20020a170902654a00b001b9e36ed387si11723349pln.525.2023.09.20.11.46.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Sep 2023 11:46:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=Xalbv7WF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 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 morse.vger.email (Postfix) with ESMTP id CB49480E3410; Wed, 20 Sep 2023 00:44:27 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233925AbjITHoY (ORCPT + 99 others); Wed, 20 Sep 2023 03:44:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58846 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233894AbjITHoP (ORCPT ); Wed, 20 Sep 2023 03:44:15 -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 8F9CFD3; Wed, 20 Sep 2023 00:44:07 -0700 (PDT) Received: from [IPV6:2a01:e0a:120:3210:def9:8f6c:3807:7d89] (unknown [IPv6:2a01:e0a:120:3210:def9:8f6c:3807:7d89]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: benjamin.gaignard) by madras.collabora.co.uk (Postfix) with ESMTPSA id 47BA36602173; Wed, 20 Sep 2023 08:44:05 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1695195845; bh=eSYDs+qZU32e2E7cB12pTV5zRWbHto0dzuV5YKjfLWo=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=Xalbv7WF546UBvMJ/uGdPNld1qXxWIZmEZBQNskDrTzN3Kc+mJm2K9bvp4I5jtKtk xh/X+B7ucMdy42dseAz54rg4P7I9YJA/3FoQItb9vwQqHPyUNl7fc+dshVakekBHXb QcP1y4mgDUSV5tY2k7TpkbMndUSxWS785NAY9lNPZHJ6xrOwqoVA0akSgEhrXfyBKv Zwaxq58FH2PeIV5GsXJ0NbMHwbSwRC/aW/RyPQ+MIUv1c82tP51tb2XKxB3Y308Gqb 6NwPnaeD8HFNYScL6HU9hUz1inEGA8duZz+ac3Je4mIy3XMK6cx+laUynATVkjms8Q FvmXdUFWloOmA== Message-ID: Date: Wed, 20 Sep 2023 09:44:03 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [PATCH v7 16/49] media: verisilicon: postproc: Fix down scale test To: Hans Verkuil , mchehab@kernel.org, tfiga@chromium.org, m.szyprowski@samsung.com, ming.qian@nxp.com, ezequiel@vanguardiasur.com.ar, p.zabel@pengutronix.de, gregkh@linuxfoundation.org, nicolas.dufresne@collabora.com Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-staging@lists.linux.dev, kernel@collabora.com References: <20230914133323.198857-1-benjamin.gaignard@collabora.com> <20230914133323.198857-17-benjamin.gaignard@collabora.com> Content-Language: en-US From: Benjamin Gaignard In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email 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 (morse.vger.email [0.0.0.0]); Wed, 20 Sep 2023 00:44:28 -0700 (PDT) Le 19/09/2023 à 13:16, Hans Verkuil a écrit : > On 14/09/2023 15:32, Benjamin Gaignard wrote: >> Do not allow down scaling if the source buffer resolution is >> smaller than destination one. >> >> Signed-off-by: Benjamin Gaignard >> Fixes: fbb6c848dd89 ("media: destage Hantro VPU driver") > Is this really a fix? I gather that this relies on "VP9 resolution change without > doing stream off/on" support, and support for that is added by these patches. > > Adding the Fixes tag would cause stable maintainers to queue this patch up for > older kernels, but I don't think that is needed here at all. > > And related I also think that this really does not belong to this patch series. > > As I understand it, patch 13/49 extends the verisilicon driver to support more > than 32 buffers, so that one makes sense in the context of this series. > > But the other verisilicon patches appear to be unrelated and instead add a new > feature, and I don't believe it relates to this series at all. > > If I am right, then please post this as a separate series, possibly mentioning > that it sits on top of this series. Marek has send the same patch and got it merged in stage branch: https://patchwork.kernel.org/project/linux-media/patch/20230824013935.303132-1-marex@denx.de/ so I can skip it now. The other patches are needed to enable VP9 dynamic resolution change, which is the feature I target with this series. 2 patches fix chroma / motion vector offset issues. 1 allow to change the resolution while stream. Regards, Benjamin > > Regards, > > Hans > >> --- >> drivers/media/platform/verisilicon/hantro_postproc.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/media/platform/verisilicon/hantro_postproc.c b/drivers/media/platform/verisilicon/hantro_postproc.c >> index e624cd98f41b..77d8ecfbe12f 100644 >> --- a/drivers/media/platform/verisilicon/hantro_postproc.c >> +++ b/drivers/media/platform/verisilicon/hantro_postproc.c >> @@ -107,7 +107,7 @@ static void hantro_postproc_g1_enable(struct hantro_ctx *ctx) >> >> static int down_scale_factor(struct hantro_ctx *ctx) >> { >> - if (ctx->src_fmt.width == ctx->dst_fmt.width) >> + if (ctx->src_fmt.width <= ctx->dst_fmt.width) >> return 0; >> >> return DIV_ROUND_CLOSEST(ctx->src_fmt.width, ctx->dst_fmt.width); >