Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Nicolas Dufresne <nicolas.dufresne@collabora.com>
To: Benjamin Gaignard <benjamin.gaignard@collabora.com>,
	 p.zabel@pengutronix.de, mchehab@kernel.org, heiko@sntech.de
Cc: linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org,
	 linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,  kernel@collabora.com
Subject: Re: [PATCH] media: verisilicon: AV1: Discard none supported profiles
Date: Wed, 25 Mar 2026 14:46:49 -0400	[thread overview]
Message-ID: <a9931f6b0568fa8c21b53a5c8ca93a9a90fed25d.camel@collabora.com> (raw)
In-Reply-To: <20260325131956.18075-1-benjamin.gaignard@collabora.com>

[-- Attachment #1: Type: text/plain, Size: 1415 bytes --]

Le mercredi 25 mars 2026 à 14:19 +0100, Benjamin Gaignard a écrit :
> AV1 hardware can only decode YUV420 pixel format. That means
> that only profile 0 is supported. Discard all other profiles
> when receiving AV1 sequence control.
> 
> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
> ---
>  drivers/media/platform/verisilicon/hantro_drv.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/media/platform/verisilicon/hantro_drv.c b/drivers/media/platform/verisilicon/hantro_drv.c
> index 2e81877f640f..12f98e7e7994 100644
> --- a/drivers/media/platform/verisilicon/hantro_drv.c
> +++ b/drivers/media/platform/verisilicon/hantro_drv.c
> @@ -283,6 +283,8 @@ static int hantro_try_ctrl(struct v4l2_ctrl *ctrl)
>  
>  		if (sequence->bit_depth != 8 && sequence->bit_depth != 10)
>  			return -EINVAL;
> +		if (sequence->seq_profile != 0)
> +			return -EINVAL;

You should also add the missing control to better tell userspace what it can and
cannot do. Check MTK driver for reference, I think the same config can be used:

drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_stateless.c
...
		.cfg = {
			.id = V4L2_CID_MPEG_VIDEO_AV1_PROFILE,
			.min = V4L2_MPEG_VIDEO_AV1_PROFILE_MAIN,
			.def = V4L2_MPEG_VIDEO_AV1_PROFILE_MAIN,
			.max = V4L2_MPEG_VIDEO_AV1_PROFILE_MAIN,
		},
...

Nicolas

>  	}
>  
>  	return 0;

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

      reply	other threads:[~2026-03-25 18:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-25 13:19 [PATCH] media: verisilicon: AV1: Discard none supported profiles Benjamin Gaignard
2026-03-25 18:46 ` Nicolas Dufresne [this message]

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=a9931f6b0568fa8c21b53a5c8ca93a9a90fed25d.camel@collabora.com \
    --to=nicolas.dufresne@collabora.com \
    --cc=benjamin.gaignard@collabora.com \
    --cc=heiko@sntech.de \
    --cc=kernel@collabora.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=mchehab@kernel.org \
    --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