[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <530d-654e9b80-9-557cd880@203483206>
Date: Fri, 10 Nov 2023 21:07:46 +0000
From: "Daniel Almeida" <daniel.almeida@...labora.com>
To: "Paul Kocialkowski" <paul.kocialkowski@...tlin.com>
Cc: linux-media@...r.kernel.org, linux-rockchip@...ts.infradead.org,
linux-kernel@...r.kernel.org, linux-staging@...ts.linux.dev,
"Ezequiel Garcia" <ezequiel@...guardiasur.com.ar>,
"Philipp Zabel" <p.zabel@...gutronix.de>,
"Mauro Carvalho Chehab" <mchehab@...nel.org>,
"Hans Verkuil" <hverkuil-cisco@...all.nl>,
"Greg Kroah-Hartman" <gregkh@...uxfoundation.org>,
"Nicolas Dufresne" <nicolas.dufresne@...labora.com>,
"Sebastian Fricke" <sebastian.fricke@...labora.com>,
"Thomas Petazzoni" <thomas.petazzoni@...tlin.com>
Subject: Re: [PATCH 3/4] media: verisilicon: Hook the (TRY_)DECODER_CMD
stateless ioctls
On Thursday, November 09, 2023 17:16 -03, Paul Kocialkowski <paul.kocialkowski@...tlin.com> wrote:
> The (TRY_)DECODER_CMD ioctls are used to support flushing when holding capture
> buffers is supported. This is the case of this driver but the ioctls were never
> hooked to the ioctl ops.
>
> Add them to correctly support flushing.
>
> Fixes: 340ce50f75a6 ("media: hantro: Enable HOLD_CAPTURE_BUF for H.264")
> Signed-off-by: Paul Kocialkowski <paul.kocialkowski@...tlin.com>
> ---
> drivers/media/platform/verisilicon/hantro_drv.c | 2 ++
> drivers/media/platform/verisilicon/hantro_v4l2.c | 3 +++
> 2 files changed, 5 insertions(+)
>
> diff --git a/drivers/media/platform/verisilicon/hantro_drv.c b/drivers/media/platform/verisilicon/hantro_drv.c
> index a9fa05ac56a9..3a2a0f28cbfe 100644
> --- a/drivers/media/platform/verisilicon/hantro_drv.c
> +++ b/drivers/media/platform/verisilicon/hantro_drv.c
> @@ -905,6 +905,8 @@ static int hantro_add_func(struct hantro_dev *vpu, unsigned int funcid)
>
> if (funcid == MEDIA_ENT_F_PROC_VIDEO_ENCODER) {
> vpu->encoder = func;
> + v4l2_disable_ioctl(vfd, VIDIOC_TRY_DECODER_CMD);
> + v4l2_disable_ioctl(vfd, VIDIOC_DECODER_CMD);
> } else {
> vpu->decoder = func;
> v4l2_disable_ioctl(vfd, VIDIOC_TRY_ENCODER_CMD);
> diff --git a/drivers/media/platform/verisilicon/hantro_v4l2.c b/drivers/media/platform/verisilicon/hantro_v4l2.c
> index b3ae037a50f6..db145519fc5d 100644
> --- a/drivers/media/platform/verisilicon/hantro_v4l2.c
> +++ b/drivers/media/platform/verisilicon/hantro_v4l2.c
> @@ -785,6 +785,9 @@ const struct v4l2_ioctl_ops hantro_ioctl_ops = {
> .vidioc_g_selection = vidioc_g_selection,
> .vidioc_s_selection = vidioc_s_selection,
>
> + .vidioc_decoder_cmd = v4l2_m2m_ioctl_stateless_decoder_cmd,
> + .vidioc_try_decoder_cmd = v4l2_m2m_ioctl_stateless_try_decoder_cmd,
> +
> .vidioc_try_encoder_cmd = v4l2_m2m_ioctl_try_encoder_cmd,
> .vidioc_encoder_cmd = vidioc_encoder_cmd,
> };
> --
> 2.42.1
>
>
> _______________________________________________
> Linux-rockchip mailing list
> Linux-rockchip@...ts.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-rockchip
Reviewed-by: Daniel Almeida <daniel.almeida@...labora.com>
Powered by blists - more mailing lists