diff mbox series

[v2,4/4] media: staging: rkisp1: cap: remove support of BGR666 format

Message ID 20200515142952.20163-5-dafna.hirschfeld@collabora.com (mailing list archive)
State New, archived
Headers show
Series media: staging: rkisp1: various fixes to capture formats | expand

Commit Message

Dafna Hirschfeld May 15, 2020, 2:29 p.m. UTC
The rkisp1 supports RGB encoding with 6 bits per
color with the following format:
- - b5 b4 b3 b2 b1 b0 - - g5 g4 g3 g2 g1 g0 - - r5 r4 r3 r2 r1 r0 - - - - - - - -

This is not how V4L2_PIX_FMT_BGR666 is defined, so remove
this format from the driver's formats list.

Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
---
 drivers/staging/media/rkisp1/rkisp1-capture.c | 4 ----
 1 file changed, 4 deletions(-)

Comments

Helen Mae Koike Fornazier May 20, 2020, 10:34 p.m. UTC | #1
On 5/15/20 11:29 AM, Dafna Hirschfeld wrote:
> The rkisp1 supports RGB encoding with 6 bits per
> color with the following format:
> - - b5 b4 b3 b2 b1 b0 - - g5 g4 g3 g2 g1 g0 - - r5 r4 r3 r2 r1 r0 - - - - - - - -

Is this the same as V4L2_PIX_FMT_XBGR32 format, but with colors range from 0 to 63 ?

I was wondering what is the usage of such a format. If it is useful, then I'm sad
to see this being removed from the driver, since this is a v4l2 api limitation, and not
a hw limitation.

Regards,
Helen

> 
> This is not how V4L2_PIX_FMT_BGR666 is defined, so remove
> this format from the driver's formats list.
> 
> Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
> ---
>  drivers/staging/media/rkisp1/rkisp1-capture.c | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/drivers/staging/media/rkisp1/rkisp1-capture.c b/drivers/staging/media/rkisp1/rkisp1-capture.c
> index 61b9ebe577b2..2660e44eda88 100644
> --- a/drivers/staging/media/rkisp1/rkisp1-capture.c
> +++ b/drivers/staging/media/rkisp1/rkisp1-capture.c
> @@ -283,10 +283,6 @@ static const struct rkisp1_capture_fmt_cfg rkisp1_sp_fmts[] = {
>  		.fourcc = V4L2_PIX_FMT_RGB565,
>  		.write_format = RKISP1_MI_CTRL_SP_WRITE_PLA,
>  		.output_format = RKISP1_MI_CTRL_SP_OUTPUT_RGB565,
> -	}, {
> -		.fourcc = V4L2_PIX_FMT_BGR666,
> -		.write_format = RKISP1_MI_CTRL_SP_WRITE_PLA,
> -		.output_format = RKISP1_MI_CTRL_SP_OUTPUT_RGB666,
>  	},
>  };
>  
>
Tomasz Figa May 26, 2020, 10:57 p.m. UTC | #2
On Thu, May 21, 2020 at 12:35 AM Helen Koike <helen.koike@collabora.com> wrote:
>
>
>
> On 5/15/20 11:29 AM, Dafna Hirschfeld wrote:
> > The rkisp1 supports RGB encoding with 6 bits per
> > color with the following format:
> > - - b5 b4 b3 b2 b1 b0 - - g5 g4 g3 g2 g1 g0 - - r5 r4 r3 r2 r1 r0 - - - - - - - -
>
> Is this the same as V4L2_PIX_FMT_XBGR32 format, but with colors range from 0 to 63 ?
>
> I was wondering what is the usage of such a format. If it is useful, then I'm sad
> to see this being removed from the driver, since this is a v4l2 api limitation, and not
> a hw limitation.

Sounds like some relic of the past. ;)

In general, RGB formats are not very useful in this hardware. One
wastes the precious bandwidth, but doesn't get more color resolution,
since the pipeline uses YUV 4:2:2 internally anyway. The typical usage
scenarios with video or JPEG encoding and preview are much better off
with the available YUV formats.

>
> Regards,
> Helen
>
> >
> > This is not how V4L2_PIX_FMT_BGR666 is defined, so remove
> > this format from the driver's formats list.
> >
> > Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
> > ---
> >  drivers/staging/media/rkisp1/rkisp1-capture.c | 4 ----
> >  1 file changed, 4 deletions(-)
> >
> > diff --git a/drivers/staging/media/rkisp1/rkisp1-capture.c b/drivers/staging/media/rkisp1/rkisp1-capture.c
> > index 61b9ebe577b2..2660e44eda88 100644
> > --- a/drivers/staging/media/rkisp1/rkisp1-capture.c
> > +++ b/drivers/staging/media/rkisp1/rkisp1-capture.c
> > @@ -283,10 +283,6 @@ static const struct rkisp1_capture_fmt_cfg rkisp1_sp_fmts[] = {
> >               .fourcc = V4L2_PIX_FMT_RGB565,
> >               .write_format = RKISP1_MI_CTRL_SP_WRITE_PLA,
> >               .output_format = RKISP1_MI_CTRL_SP_OUTPUT_RGB565,
> > -     }, {
> > -             .fourcc = V4L2_PIX_FMT_BGR666,
> > -             .write_format = RKISP1_MI_CTRL_SP_WRITE_PLA,
> > -             .output_format = RKISP1_MI_CTRL_SP_OUTPUT_RGB666,
> >       },
> >  };
> >
> >
Helen Mae Koike Fornazier May 27, 2020, 10:14 a.m. UTC | #3
On 5/26/20 7:57 PM, Tomasz Figa wrote:
> On Thu, May 21, 2020 at 12:35 AM Helen Koike <helen.koike@collabora.com> wrote:
>>
>>
>>
>> On 5/15/20 11:29 AM, Dafna Hirschfeld wrote:
>>> The rkisp1 supports RGB encoding with 6 bits per
>>> color with the following format:
>>> - - b5 b4 b3 b2 b1 b0 - - g5 g4 g3 g2 g1 g0 - - r5 r4 r3 r2 r1 r0 - - - - - - - -
>>
>> Is this the same as V4L2_PIX_FMT_XBGR32 format, but with colors range from 0 to 63 ?
>>
>> I was wondering what is the usage of such a format. If it is useful, then I'm sad
>> to see this being removed from the driver, since this is a v4l2 api limitation, and not
>> a hw limitation.
> 
> Sounds like some relic of the past. ;)
> 
> In general, RGB formats are not very useful in this hardware. One
> wastes the precious bandwidth, but doesn't get more color resolution,
> since the pipeline uses YUV 4:2:2 internally anyway. The typical usage
> scenarios with video or JPEG encoding and preview are much better off
> with the available YUV formats.

Thanks for your input.

Right, then in this case, I don't oppose removing it.

> 
>>
>> Regards,
>> Helen
>>
>>>
>>> This is not how V4L2_PIX_FMT_BGR666 is defined, so remove
>>> this format from the driver's formats list.
>>>
>>> Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>

Acked-by: Helen Koike <helen.koike@collabora.com>

Thanks
Helen

>>> ---
>>>  drivers/staging/media/rkisp1/rkisp1-capture.c | 4 ----
>>>  1 file changed, 4 deletions(-)
>>>
>>> diff --git a/drivers/staging/media/rkisp1/rkisp1-capture.c b/drivers/staging/media/rkisp1/rkisp1-capture.c
>>> index 61b9ebe577b2..2660e44eda88 100644
>>> --- a/drivers/staging/media/rkisp1/rkisp1-capture.c
>>> +++ b/drivers/staging/media/rkisp1/rkisp1-capture.c
>>> @@ -283,10 +283,6 @@ static const struct rkisp1_capture_fmt_cfg rkisp1_sp_fmts[] = {
>>>               .fourcc = V4L2_PIX_FMT_RGB565,
>>>               .write_format = RKISP1_MI_CTRL_SP_WRITE_PLA,
>>>               .output_format = RKISP1_MI_CTRL_SP_OUTPUT_RGB565,
>>> -     }, {
>>> -             .fourcc = V4L2_PIX_FMT_BGR666,
>>> -             .write_format = RKISP1_MI_CTRL_SP_WRITE_PLA,
>>> -             .output_format = RKISP1_MI_CTRL_SP_OUTPUT_RGB666,
>>>       },
>>>  };
>>>
>>>
diff mbox series

Patch

diff --git a/drivers/staging/media/rkisp1/rkisp1-capture.c b/drivers/staging/media/rkisp1/rkisp1-capture.c
index 61b9ebe577b2..2660e44eda88 100644
--- a/drivers/staging/media/rkisp1/rkisp1-capture.c
+++ b/drivers/staging/media/rkisp1/rkisp1-capture.c
@@ -283,10 +283,6 @@  static const struct rkisp1_capture_fmt_cfg rkisp1_sp_fmts[] = {
 		.fourcc = V4L2_PIX_FMT_RGB565,
 		.write_format = RKISP1_MI_CTRL_SP_WRITE_PLA,
 		.output_format = RKISP1_MI_CTRL_SP_OUTPUT_RGB565,
-	}, {
-		.fourcc = V4L2_PIX_FMT_BGR666,
-		.write_format = RKISP1_MI_CTRL_SP_WRITE_PLA,
-		.output_format = RKISP1_MI_CTRL_SP_OUTPUT_RGB666,
 	},
 };