Message ID | 20230914133323.198857-17-benjamin.gaignard@collabora.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp481555vqi; Thu, 14 Sep 2023 09:45:49 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHg2v06vPXDKZAikHmvGzkFC+NJjyckcvg2lSYFimTOqKXBOo5IZhQjKVDmZ+LM5Hlj/BXP X-Received: by 2002:a05:6a21:78a5:b0:148:656b:9a1f with SMTP id bf37-20020a056a2178a500b00148656b9a1fmr7257357pzc.20.1694709948837; Thu, 14 Sep 2023 09:45:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694709948; cv=none; d=google.com; s=arc-20160816; b=f3QXsKO4lzIcfAFQnwdXWpPFH9N9VtQexDtSWtj9EPb/hVC4uiTeAGPjq2w3m3UgzY Tlf1AgHNvNW8blKVHckvxM3qKvZtr5xfFFbGYwFV9DhWa4LAcQiMjpIu0ToYvZal+2wI LghyKVrso3Q2E5SDmcHUxBv7iihQo5sbjUm4e7KJULtIwNRf5DC036UdcP2Q7yVFQlAy Gb0GgytT3IsXl0SjN11/lS+tw+iwu1ZV6htEB2Ju++URn7nd/AYZxJmgBhPTRKFohI8F SQ+BhZ8Z4LUpRtXxN3oMfUV/5TT/WF+iYEt0BMyt9AcKHwsY6MS71Sqae2VuBvXxPbWZ wSsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=+motrr8z22DTdb1iWQP1XzvpLQL/6rTJbpaD47ZsBhs=; fh=ceA81l8d2hZW6pWH7VE5TwJxtgXUzAubfWIMcikPA1M=; b=VwUTB1s6LFDbs44Eu7rRZGnUEjGoFyG/fb9437JODYRGdJeFYDyUzUlsJJJjE56Pdi GVhU4IxV7ar8aHPpUjpTyqRy+a3LGBgz5fW+bCWZl+DcHFA+XNHCaBmG8bE/gRwx+k2m F7Ip9cx7IsdrZNTzxekM9/jOa8H7vD+HiBYiT4CGxlNkfLGWJwuTuVrRfSWMRKELUtn7 zfS/v7/jQ4Te5tzWEDbf7EULKyw+T0uq1t7TIvub5h6ndTGjjqWwliOezbmK8/QdgzXI a3AQXTw7I+a/MgKghHgDYBqBaThjT6GDt7KUisN6ekiKnzeUPOQf+ZlJjIKni+BAjWlo 32CQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b="JzNs/qqs"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 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 fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id ct24-20020a056a000f9800b0068fb4842092si1864400pfb.183.2023.09.14.09.45.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Sep 2023 09:45:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b="JzNs/qqs"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 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 fry.vger.email (Postfix) with ESMTP id 7C0AA823CA21; Thu, 14 Sep 2023 06:35:33 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239510AbjINNeU (ORCPT <rfc822;chrisfriedt@gmail.com> + 35 others); Thu, 14 Sep 2023 09:34:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54352 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239217AbjINNdx (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 14 Sep 2023 09:33:53 -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 0187C1FEC; Thu, 14 Sep 2023 06:33:41 -0700 (PDT) Received: from benjamin-XPS-13-9310.. (unknown [IPv6:2a01:e0a:120:3210:36f2:37bd:ccbb:373f]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 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 741D26607356; Thu, 14 Sep 2023 14:33:39 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1694698419; bh=jUystvUPhotVsWFQwzoEvrV6ekQradIDM/On3bu5eyU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JzNs/qqsuOQni5rFNh5FnwVhEdW6UACA0W7zv6lpXOMRQg1Zjd1cRRAJpq34lYOc3 HBwKx3EUT+Bku/VNGm5d7cI3oyJ2ymko6e5D+6mQYlsoALF715+ubY8rEz9dDvu6uI I4Kp0rZeMokBVw7fljsaXntHXQSXmvwVqKvcLhkMRk9J7PMtkCqd8x1ue/wiiWwjIn TKIVhVLQozr7frLJfPYZJyvVkG+mao4mrnKv4hmzhotqb+dRKrArJiTe5FAS0nDveN x9oVlJ1k4DtFsJV4VCLA4SWpRxqhTKKTZA+jp1fiE7aNYwj+TwYIDsMzlERoLEjZwG o6qPTSg3GjcQA== From: Benjamin Gaignard <benjamin.gaignard@collabora.com> To: 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, hverkuil-cisco@xs4all.nl, 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, Benjamin Gaignard <benjamin.gaignard@collabora.com> Subject: [PATCH v7 16/49] media: verisilicon: postproc: Fix down scale test Date: Thu, 14 Sep 2023 15:32:50 +0200 Message-Id: <20230914133323.198857-17-benjamin.gaignard@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230914133323.198857-1-benjamin.gaignard@collabora.com> References: <20230914133323.198857-1-benjamin.gaignard@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Thu, 14 Sep 2023 06:35:33 -0700 (PDT) X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, 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 fry.vger.email X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777032179319917260 X-GMAIL-MSGID: 1777032179319917260 |
Series |
Add DELETE_BUF ioctl
|
|
Commit Message
Benjamin Gaignard
Sept. 14, 2023, 1:32 p.m. UTC
Do not allow down scaling if the source buffer resolution is
smaller than destination one.
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
Fixes: fbb6c848dd89 ("media: destage Hantro VPU driver")
---
drivers/media/platform/verisilicon/hantro_postproc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
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 <benjamin.gaignard@collabora.com> > 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. 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);
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 <benjamin.gaignard@collabora.com> >> 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); >
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);