diff mbox series

[v4,02/10] media: staging: rkisp1: cap: remove unsupported formats

Message ID 20200901111612.10552-3-dafna.hirschfeld@collabora.com (mailing list archive)
State New, archived
Headers show
Series media: staging: rkisp1: add support to V4L2_CAP_IO_MC | expand

Commit Message

Dafna Hirschfeld Sept. 1, 2020, 11:16 a.m. UTC
For Ycbcr packed formats only YUYV can be supported by
the driver. This patch removes the other formats.

Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
Acked-by: Helen Koike <helen.koike@collabora.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 drivers/staging/media/rkisp1/rkisp1-capture.c | 17 -----------------
 1 file changed, 17 deletions(-)

Comments

Tomasz Figa Sept. 26, 2020, 1:17 p.m. UTC | #1
Hi Dafna,

On Tue, Sep 01, 2020 at 01:16:04PM +0200, Dafna Hirschfeld wrote:
> For Ycbcr packed formats only YUYV can be supported by
> the driver. This patch removes the other formats.

I can see the driver already setting the
RKISP1_CIF_MI_XTD_FMT_CTRL_*_CB_CR_SWAP register according to the
uv_swap flag, but it currently does it so only if comp_planes is 2.
Wouldn't just doing the same if the number of planes is 1 fix the
support for at least the YVYU format?

Best regards,
Tomasz

> 
> Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
> Acked-by: Helen Koike <helen.koike@collabora.com>
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
>  drivers/staging/media/rkisp1/rkisp1-capture.c | 17 -----------------
>  1 file changed, 17 deletions(-)
> 
> diff --git a/drivers/staging/media/rkisp1/rkisp1-capture.c b/drivers/staging/media/rkisp1/rkisp1-capture.c
> index f4d5cc3e2f12..79195e74d995 100644
> --- a/drivers/staging/media/rkisp1/rkisp1-capture.c
> +++ b/drivers/staging/media/rkisp1/rkisp1-capture.c
> @@ -88,13 +88,6 @@ static const struct rkisp1_capture_fmt_cfg rkisp1_mp_fmts[] = {
>  		.fourcc = V4L2_PIX_FMT_YUYV,
>  		.uv_swap = 0,
>  		.write_format = RKISP1_MI_CTRL_MP_WRITE_YUVINT,
> -	}, {
> -		.fourcc = V4L2_PIX_FMT_YVYU,
> -		.uv_swap = 1,
> -		.write_format = RKISP1_MI_CTRL_MP_WRITE_YUVINT,
> -	}, {
> -		.fourcc = V4L2_PIX_FMT_VYUY,
> -		.write_format = RKISP1_MI_CTRL_MP_WRITE_YUVINT,
>  	}, {
>  		.fourcc = V4L2_PIX_FMT_YUV422P,
>  		.uv_swap = 0,
> @@ -197,16 +190,6 @@ static const struct rkisp1_capture_fmt_cfg rkisp1_sp_fmts[] = {
>  		.uv_swap = 0,
>  		.write_format = RKISP1_MI_CTRL_SP_WRITE_INT,
>  		.output_format = RKISP1_MI_CTRL_SP_OUTPUT_YUV422,
> -	}, {
> -		.fourcc = V4L2_PIX_FMT_YVYU,
> -		.uv_swap = 1,
> -		.write_format = RKISP1_MI_CTRL_SP_WRITE_INT,
> -		.output_format = RKISP1_MI_CTRL_SP_OUTPUT_YUV422,
> -	}, {
> -		.fourcc = V4L2_PIX_FMT_VYUY,
> -		.uv_swap = 1,
> -		.write_format = RKISP1_MI_CTRL_SP_WRITE_INT,
> -		.output_format = RKISP1_MI_CTRL_SP_OUTPUT_YUV422,
>  	}, {
>  		.fourcc = V4L2_PIX_FMT_YUV422P,
>  		.uv_swap = 0,
> -- 
> 2.17.1
>
Dafna Hirschfeld Sept. 27, 2020, 9:33 a.m. UTC | #2
Hi,

Am 26.09.20 um 15:17 schrieb Tomasz Figa:
> Hi Dafna,
> 
> On Tue, Sep 01, 2020 at 01:16:04PM +0200, Dafna Hirschfeld wrote:
>> For Ycbcr packed formats only YUYV can be supported by
>> the driver. This patch removes the other formats.
> 
> I can see the driver already setting the
> RKISP1_CIF_MI_XTD_FMT_CTRL_*_CB_CR_SWAP register according to the
> uv_swap flag, but it currently does it so only if comp_planes is 2.
> Wouldn't just doing the same if the number of planes is 1 fix the
> support for at least the YVYU format?

Hi, Laurent already suggested it and I found out it does not
work, see: https://patchwork.kernel.org/patch/11471301/

Thanks,
Dafna

> 
> Best regards,
> Tomasz
> 
>>
>> Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
>> Acked-by: Helen Koike <helen.koike@collabora.com>
>> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
>> ---
>>   drivers/staging/media/rkisp1/rkisp1-capture.c | 17 -----------------
>>   1 file changed, 17 deletions(-)
>>
>> diff --git a/drivers/staging/media/rkisp1/rkisp1-capture.c b/drivers/staging/media/rkisp1/rkisp1-capture.c
>> index f4d5cc3e2f12..79195e74d995 100644
>> --- a/drivers/staging/media/rkisp1/rkisp1-capture.c
>> +++ b/drivers/staging/media/rkisp1/rkisp1-capture.c
>> @@ -88,13 +88,6 @@ static const struct rkisp1_capture_fmt_cfg rkisp1_mp_fmts[] = {
>>   		.fourcc = V4L2_PIX_FMT_YUYV,
>>   		.uv_swap = 0,
>>   		.write_format = RKISP1_MI_CTRL_MP_WRITE_YUVINT,
>> -	}, {
>> -		.fourcc = V4L2_PIX_FMT_YVYU,
>> -		.uv_swap = 1,
>> -		.write_format = RKISP1_MI_CTRL_MP_WRITE_YUVINT,
>> -	}, {
>> -		.fourcc = V4L2_PIX_FMT_VYUY,
>> -		.write_format = RKISP1_MI_CTRL_MP_WRITE_YUVINT,
>>   	}, {
>>   		.fourcc = V4L2_PIX_FMT_YUV422P,
>>   		.uv_swap = 0,
>> @@ -197,16 +190,6 @@ static const struct rkisp1_capture_fmt_cfg rkisp1_sp_fmts[] = {
>>   		.uv_swap = 0,
>>   		.write_format = RKISP1_MI_CTRL_SP_WRITE_INT,
>>   		.output_format = RKISP1_MI_CTRL_SP_OUTPUT_YUV422,
>> -	}, {
>> -		.fourcc = V4L2_PIX_FMT_YVYU,
>> -		.uv_swap = 1,
>> -		.write_format = RKISP1_MI_CTRL_SP_WRITE_INT,
>> -		.output_format = RKISP1_MI_CTRL_SP_OUTPUT_YUV422,
>> -	}, {
>> -		.fourcc = V4L2_PIX_FMT_VYUY,
>> -		.uv_swap = 1,
>> -		.write_format = RKISP1_MI_CTRL_SP_WRITE_INT,
>> -		.output_format = RKISP1_MI_CTRL_SP_OUTPUT_YUV422,
>>   	}, {
>>   		.fourcc = V4L2_PIX_FMT_YUV422P,
>>   		.uv_swap = 0,
>> -- 
>> 2.17.1
>>
Tomasz Figa Sept. 27, 2020, 12:01 p.m. UTC | #3
On Sun, Sep 27, 2020 at 11:33 AM Dafna Hirschfeld
<dafna.hirschfeld@collabora.com> wrote:
>
> Hi,
>
> Am 26.09.20 um 15:17 schrieb Tomasz Figa:
> > Hi Dafna,
> >
> > On Tue, Sep 01, 2020 at 01:16:04PM +0200, Dafna Hirschfeld wrote:
> >> For Ycbcr packed formats only YUYV can be supported by
> >> the driver. This patch removes the other formats.
> >
> > I can see the driver already setting the
> > RKISP1_CIF_MI_XTD_FMT_CTRL_*_CB_CR_SWAP register according to the
> > uv_swap flag, but it currently does it so only if comp_planes is 2.
> > Wouldn't just doing the same if the number of planes is 1 fix the
> > support for at least the YVYU format?
>
> Hi, Laurent already suggested it and I found out it does not
> work, see: https://patchwork.kernel.org/patch/11471301/

I see, okay, thanks for double checking.

Best regards,
Tomasz

>
> Thanks,
> Dafna
>
> >
> > Best regards,
> > Tomasz
> >
> >>
> >> Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
> >> Acked-by: Helen Koike <helen.koike@collabora.com>
> >> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> >> ---
> >>   drivers/staging/media/rkisp1/rkisp1-capture.c | 17 -----------------
> >>   1 file changed, 17 deletions(-)
> >>
> >> diff --git a/drivers/staging/media/rkisp1/rkisp1-capture.c b/drivers/staging/media/rkisp1/rkisp1-capture.c
> >> index f4d5cc3e2f12..79195e74d995 100644
> >> --- a/drivers/staging/media/rkisp1/rkisp1-capture.c
> >> +++ b/drivers/staging/media/rkisp1/rkisp1-capture.c
> >> @@ -88,13 +88,6 @@ static const struct rkisp1_capture_fmt_cfg rkisp1_mp_fmts[] = {
> >>              .fourcc = V4L2_PIX_FMT_YUYV,
> >>              .uv_swap = 0,
> >>              .write_format = RKISP1_MI_CTRL_MP_WRITE_YUVINT,
> >> -    }, {
> >> -            .fourcc = V4L2_PIX_FMT_YVYU,
> >> -            .uv_swap = 1,
> >> -            .write_format = RKISP1_MI_CTRL_MP_WRITE_YUVINT,
> >> -    }, {
> >> -            .fourcc = V4L2_PIX_FMT_VYUY,
> >> -            .write_format = RKISP1_MI_CTRL_MP_WRITE_YUVINT,
> >>      }, {
> >>              .fourcc = V4L2_PIX_FMT_YUV422P,
> >>              .uv_swap = 0,
> >> @@ -197,16 +190,6 @@ static const struct rkisp1_capture_fmt_cfg rkisp1_sp_fmts[] = {
> >>              .uv_swap = 0,
> >>              .write_format = RKISP1_MI_CTRL_SP_WRITE_INT,
> >>              .output_format = RKISP1_MI_CTRL_SP_OUTPUT_YUV422,
> >> -    }, {
> >> -            .fourcc = V4L2_PIX_FMT_YVYU,
> >> -            .uv_swap = 1,
> >> -            .write_format = RKISP1_MI_CTRL_SP_WRITE_INT,
> >> -            .output_format = RKISP1_MI_CTRL_SP_OUTPUT_YUV422,
> >> -    }, {
> >> -            .fourcc = V4L2_PIX_FMT_VYUY,
> >> -            .uv_swap = 1,
> >> -            .write_format = RKISP1_MI_CTRL_SP_WRITE_INT,
> >> -            .output_format = RKISP1_MI_CTRL_SP_OUTPUT_YUV422,
> >>      }, {
> >>              .fourcc = V4L2_PIX_FMT_YUV422P,
> >>              .uv_swap = 0,
> >> --
> >> 2.17.1
> >>
diff mbox series

Patch

diff --git a/drivers/staging/media/rkisp1/rkisp1-capture.c b/drivers/staging/media/rkisp1/rkisp1-capture.c
index f4d5cc3e2f12..79195e74d995 100644
--- a/drivers/staging/media/rkisp1/rkisp1-capture.c
+++ b/drivers/staging/media/rkisp1/rkisp1-capture.c
@@ -88,13 +88,6 @@  static const struct rkisp1_capture_fmt_cfg rkisp1_mp_fmts[] = {
 		.fourcc = V4L2_PIX_FMT_YUYV,
 		.uv_swap = 0,
 		.write_format = RKISP1_MI_CTRL_MP_WRITE_YUVINT,
-	}, {
-		.fourcc = V4L2_PIX_FMT_YVYU,
-		.uv_swap = 1,
-		.write_format = RKISP1_MI_CTRL_MP_WRITE_YUVINT,
-	}, {
-		.fourcc = V4L2_PIX_FMT_VYUY,
-		.write_format = RKISP1_MI_CTRL_MP_WRITE_YUVINT,
 	}, {
 		.fourcc = V4L2_PIX_FMT_YUV422P,
 		.uv_swap = 0,
@@ -197,16 +190,6 @@  static const struct rkisp1_capture_fmt_cfg rkisp1_sp_fmts[] = {
 		.uv_swap = 0,
 		.write_format = RKISP1_MI_CTRL_SP_WRITE_INT,
 		.output_format = RKISP1_MI_CTRL_SP_OUTPUT_YUV422,
-	}, {
-		.fourcc = V4L2_PIX_FMT_YVYU,
-		.uv_swap = 1,
-		.write_format = RKISP1_MI_CTRL_SP_WRITE_INT,
-		.output_format = RKISP1_MI_CTRL_SP_OUTPUT_YUV422,
-	}, {
-		.fourcc = V4L2_PIX_FMT_VYUY,
-		.uv_swap = 1,
-		.write_format = RKISP1_MI_CTRL_SP_WRITE_INT,
-		.output_format = RKISP1_MI_CTRL_SP_OUTPUT_YUV422,
 	}, {
 		.fourcc = V4L2_PIX_FMT_YUV422P,
 		.uv_swap = 0,