From: Benjamin Gaignard <benjamin.gaignard@collabora.com>
To: nicolas.dufresne@collabora.com, p.zabel@pengutronix.de,
mchehab@kernel.org, hverkuil@kernel.org
Cc: linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org,
linux-kernel@vger.kernel.org, kernel@collabora.com,
Benjamin Gaignard <benjamin.gaignard@collabora.com>
Subject: [PATCH] media: verisilicon: Fix format enumeration when post-processor is mandatory
Date: Tue, 28 Apr 2026 10:37:23 +0200 [thread overview]
Message-ID: <20260428083723.54314-1-benjamin.gaignard@collabora.com> (raw)
When a post-processor pixel format is mandatory (i.e. when an AV1
bitstream use film grain feature) the driver must only enumerate
post-processed format.
Use the context format to know what is suppose to be enumerated.
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
Fixes: 80c7373a456e ("media: verisilicon: Conditionally ignore native formats")
---
drivers/media/platform/verisilicon/hantro_v4l2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/platform/verisilicon/hantro_v4l2.c b/drivers/media/platform/verisilicon/hantro_v4l2.c
index fcf3bd9bcda2..f538d4562744 100644
--- a/drivers/media/platform/verisilicon/hantro_v4l2.c
+++ b/drivers/media/platform/verisilicon/hantro_v4l2.c
@@ -242,7 +242,7 @@ static int vidioc_enum_fmt(struct file *file, void *priv,
*/
skip_mode_none = capture == ctx->is_encoder;
- formats = hantro_get_formats(ctx, &num_fmts, HANTRO_AUTO_POSTPROC);
+ formats = hantro_get_formats(ctx, &num_fmts, ctx->need_postproc);
for (i = 0; i < num_fmts; i++) {
bool mode_none = formats[i].codec_mode == HANTRO_MODE_NONE;
fmt = &formats[i];
--
2.43.0
next reply other threads:[~2026-04-28 8:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-28 8:37 Benjamin Gaignard [this message]
2026-04-28 14:30 ` [PATCH] media: verisilicon: Fix format enumeration when post-processor is mandatory Nicolas Dufresne
2026-04-29 18:05 ` Nicolas Dufresne
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260428083723.54314-1-benjamin.gaignard@collabora.com \
--to=benjamin.gaignard@collabora.com \
--cc=hverkuil@kernel.org \
--cc=kernel@collabora.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=mchehab@kernel.org \
--cc=nicolas.dufresne@collabora.com \
--cc=p.zabel@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox