diff mbox series

[v2] media: amphion: fix decoder's interlaced field

Message ID 20220412110155.21427-1-ming.qian@nxp.com
State Superseded
Headers show
Series [v2] media: amphion: fix decoder's interlaced field | expand

Commit Message

Ming Qian April 12, 2022, 11:01 a.m. UTC
For interlaced frame, the amphion vpu will store the
two fields sequential into one buffer, top-bottom order
so the field should be set to V4L2_FIELD_SEQ_TB.
fix the previous bug that set it to V4L2_FIELD_SEQ_BT wrongly.

Signed-off-by: Ming Qian <ming.qian@nxp.com>
---
 drivers/media/platform/amphion/vdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Nicolas Dufresne April 13, 2022, 6:26 p.m. UTC | #1
Le mardi 12 avril 2022 à 19:01 +0800, Ming Qian a écrit :
> For interlaced frame, the amphion vpu will store the
> two fields sequential into one buffer, top-bottom order
> so the field should be set to V4L2_FIELD_SEQ_TB.
> fix the previous bug that set it to V4L2_FIELD_SEQ_BT wrongly.
> 
> Signed-off-by: Ming Qian <ming.qian@nxp.com>

Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>

> ---
>  drivers/media/platform/amphion/vdec.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/media/platform/amphion/vdec.c b/drivers/media/platform/amphion/vdec.c
> index 09628dd0c855..0a1976852b0d 100644
> --- a/drivers/media/platform/amphion/vdec.c
> +++ b/drivers/media/platform/amphion/vdec.c
> @@ -804,7 +804,7 @@ static void vdec_init_fmt(struct vpu_inst *inst)
>  	if (vdec->codec_info.progressive)
>  		inst->cap_format.field = V4L2_FIELD_NONE;
>  	else
> -		inst->cap_format.field = V4L2_FIELD_SEQ_BT;
> +		inst->cap_format.field = V4L2_FIELD_SEQ_TB;
>  	if (vdec->codec_info.color_primaries == V4L2_COLORSPACE_DEFAULT)
>  		vdec->codec_info.color_primaries = V4L2_COLORSPACE_REC709;
>  	if (vdec->codec_info.transfer_chars == V4L2_XFER_FUNC_DEFAULT)
Fabio Estevam April 13, 2022, 6:36 p.m. UTC | #2
Hi Ming,

On Tue, Apr 12, 2022 at 8:02 AM Ming Qian <ming.qian@nxp.com> wrote:
>
> For interlaced frame, the amphion vpu will store the
> two fields sequential into one buffer, top-bottom order
> so the field should be set to V4L2_FIELD_SEQ_TB.
> fix the previous bug that set it to V4L2_FIELD_SEQ_BT wrongly.
>
> Signed-off-by: Ming Qian <ming.qian@nxp.com>

Missing Fixes tag?
Ming Qian April 14, 2022, 1:52 a.m. UTC | #3
> From: Fabio Estevam [mailto:festevam@gmail.com]
> Sent: Thursday, April 14, 2022 2:36 AM
> To: Ming Qian <ming.qian@nxp.com>
> Cc: Mauro Carvalho Chehab <mchehab@kernel.org>; Shawn Guo
> <shawnguo@kernel.org>; Hans Verkuil <hverkuil-cisco@xs4all.nl>; Rob Herring
> <robh+dt@kernel.org>; Sascha Hauer <s.hauer@pengutronix.de>; Sascha
> Hauer <kernel@pengutronix.de>; dl-linux-imx <linux-imx@nxp.com>; Aisheng
> Dong <aisheng.dong@nxp.com>; linux-media <linux-media@vger.kernel.org>;
> linux-kernel <linux-kernel@vger.kernel.org>; moderated list:ARM/FREESCALE
> IMX / MXC ARM ARCHITECTURE <linux-arm-kernel@lists.infradead.org>
> Subject: [EXT] Re: [PATCH v2] media: amphion: fix decoder's interlaced field
> 
> Caution: EXT Email
> 
> Hi Ming,
> 
> On Tue, Apr 12, 2022 at 8:02 AM Ming Qian <ming.qian@nxp.com> wrote:
> >
> > For interlaced frame, the amphion vpu will store the two fields
> > sequential into one buffer, top-bottom order so the field should be
> > set to V4L2_FIELD_SEQ_TB.
> > fix the previous bug that set it to V4L2_FIELD_SEQ_BT wrongly.
> >
> > Signed-off-by: Ming Qian <ming.qian@nxp.com>
> 
> Missing Fixes tag?
Hi Fabio,
    I'm sorry I missed it, and would you please give an example of the fixes tag?
Ming
Fabio Estevam April 14, 2022, 2 a.m. UTC | #4
Hi Ming,

On Wed, Apr 13, 2022 at 10:52 PM Ming Qian <ming.qian@nxp.com> wrote:

> Hi Fabio,
>     I'm sorry I missed it, and would you please give an example of the fixes tag?

You should add the following line above your Signed-off-by line:

Fixes: 6de8d628df6e ("media: amphion: add v4l2 m2m vpu decoder stateful driver")
Signed-off-by: Ming Qian <ming.qian@nxp.com>

The Fixes line should be in a single line, not splitter in two lines.
diff mbox series

Patch

diff --git a/drivers/media/platform/amphion/vdec.c b/drivers/media/platform/amphion/vdec.c
index 09628dd0c855..0a1976852b0d 100644
--- a/drivers/media/platform/amphion/vdec.c
+++ b/drivers/media/platform/amphion/vdec.c
@@ -804,7 +804,7 @@  static void vdec_init_fmt(struct vpu_inst *inst)
 	if (vdec->codec_info.progressive)
 		inst->cap_format.field = V4L2_FIELD_NONE;
 	else
-		inst->cap_format.field = V4L2_FIELD_SEQ_BT;
+		inst->cap_format.field = V4L2_FIELD_SEQ_TB;
 	if (vdec->codec_info.color_primaries == V4L2_COLORSPACE_DEFAULT)
 		vdec->codec_info.color_primaries = V4L2_COLORSPACE_REC709;
 	if (vdec->codec_info.transfer_chars == V4L2_XFER_FUNC_DEFAULT)