diff mbox series

[v2,5/5] media: staging: rkisp1: cap: remove unsupported formats

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

Commit Message

Dafna Hirschfeld April 2, 2020, 7:04 p.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>
---
 drivers/staging/media/rkisp1/rkisp1-capture.c | 21 -------------------
 1 file changed, 21 deletions(-)

Comments

Laurent Pinchart April 5, 2020, 10:43 p.m. UTC | #1
Hi Dafna,

Thank you for the patch.

On Thu, Apr 02, 2020 at 09:04:19PM +0200, Dafna Hirschfeld wrote:
> For Ycbcr packed formats only YUYV can be supported by
> the driver. This patch removes the other formats.

The RKISP1_CIF_MI_BYTE_SWAP bit could possibly help achieving other YUV
orders, but as far as I can tell, it would affect both the main path and
the self path, so it wouldn't be very convenient. At a quick glance I
haven't found a way to support those formats, but just to make sure,
have you double-checked that the nv21_self and nv21_main bits of
MI_XTD_FORMAT_CTRL don't also affect packed mode ? If they don't,

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
> Acked-by: Helen Koike <helen.koike@collabora.com>
> ---
>  drivers/staging/media/rkisp1/rkisp1-capture.c | 21 -------------------
>  1 file changed, 21 deletions(-)
> 
> diff --git a/drivers/staging/media/rkisp1/rkisp1-capture.c b/drivers/staging/media/rkisp1/rkisp1-capture.c
> index 2d274e8f565b..076335193f40 100644
> --- a/drivers/staging/media/rkisp1/rkisp1-capture.c
> +++ b/drivers/staging/media/rkisp1/rkisp1-capture.c
> @@ -98,15 +98,6 @@ static const struct rkisp1_capture_fmt_cfg rkisp1_mp_fmts[] = {
>  		.fmt_type = RKISP1_FMT_YUV,
>  		.uv_swap = 0,
>  		.write_format = RKISP1_MI_CTRL_MP_WRITE_YUVINT,
> -	}, {
> -		.fourcc = V4L2_PIX_FMT_YVYU,
> -		.fmt_type = RKISP1_FMT_YUV,
> -		.uv_swap = 1,
> -		.write_format = RKISP1_MI_CTRL_MP_WRITE_YUVINT,
> -	}, {
> -		.fourcc = V4L2_PIX_FMT_VYUY,
> -		.fmt_type = RKISP1_FMT_YUV,
> -		.write_format = RKISP1_MI_CTRL_MP_WRITE_YUVINT,
>  	}, {
>  		.fourcc = V4L2_PIX_FMT_YUV422P,
>  		.fmt_type = RKISP1_FMT_YUV,
> @@ -234,18 +225,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,
> -		.fmt_type = RKISP1_FMT_YUV,
> -		.uv_swap = 1,
> -		.write_format = RKISP1_MI_CTRL_SP_WRITE_INT,
> -		.output_format = RKISP1_MI_CTRL_SP_OUTPUT_YUV422,
> -	}, {
> -		.fourcc = V4L2_PIX_FMT_VYUY,
> -		.fmt_type = RKISP1_FMT_YUV,
> -		.uv_swap = 1,
> -		.write_format = RKISP1_MI_CTRL_SP_WRITE_INT,
> -		.output_format = RKISP1_MI_CTRL_SP_OUTPUT_YUV422,
>  	}, {
>  		.fourcc = V4L2_PIX_FMT_YUV422P,
>  		.fmt_type = RKISP1_FMT_YUV,
Dafna Hirschfeld April 6, 2020, 12:42 p.m. UTC | #2
On 4/6/20 12:43 AM, Laurent Pinchart wrote:
> Hi Dafna,
> 
> Thank you for the patch.
> 
> On Thu, Apr 02, 2020 at 09:04:19PM +0200, Dafna Hirschfeld wrote:
>> For Ycbcr packed formats only YUYV can be supported by
>> the driver. This patch removes the other formats.
> 
> The RKISP1_CIF_MI_BYTE_SWAP bit could possibly help achieving other YUV
> orders, but as far as I can tell, it would affect both the main path and
> the self path, so it wouldn't be very convenient. At a quick glance I
> haven't found a way to support those formats, but just to make sure,
> have you double-checked that the nv21_self and nv21_main bits of
> MI_XTD_FORMAT_CTRL don't also affect packed mode ? If they don't,
Hi, thanks a lot for the reviews, I'll check that.

Dafna
> 
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> 
>> Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
>> Acked-by: Helen Koike <helen.koike@collabora.com>
>> ---
>>   drivers/staging/media/rkisp1/rkisp1-capture.c | 21 -------------------
>>   1 file changed, 21 deletions(-)
>>
>> diff --git a/drivers/staging/media/rkisp1/rkisp1-capture.c b/drivers/staging/media/rkisp1/rkisp1-capture.c
>> index 2d274e8f565b..076335193f40 100644
>> --- a/drivers/staging/media/rkisp1/rkisp1-capture.c
>> +++ b/drivers/staging/media/rkisp1/rkisp1-capture.c
>> @@ -98,15 +98,6 @@ static const struct rkisp1_capture_fmt_cfg rkisp1_mp_fmts[] = {
>>   		.fmt_type = RKISP1_FMT_YUV,
>>   		.uv_swap = 0,
>>   		.write_format = RKISP1_MI_CTRL_MP_WRITE_YUVINT,
>> -	}, {
>> -		.fourcc = V4L2_PIX_FMT_YVYU,
>> -		.fmt_type = RKISP1_FMT_YUV,
>> -		.uv_swap = 1,
>> -		.write_format = RKISP1_MI_CTRL_MP_WRITE_YUVINT,
>> -	}, {
>> -		.fourcc = V4L2_PIX_FMT_VYUY,
>> -		.fmt_type = RKISP1_FMT_YUV,
>> -		.write_format = RKISP1_MI_CTRL_MP_WRITE_YUVINT,
>>   	}, {
>>   		.fourcc = V4L2_PIX_FMT_YUV422P,
>>   		.fmt_type = RKISP1_FMT_YUV,
>> @@ -234,18 +225,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,
>> -		.fmt_type = RKISP1_FMT_YUV,
>> -		.uv_swap = 1,
>> -		.write_format = RKISP1_MI_CTRL_SP_WRITE_INT,
>> -		.output_format = RKISP1_MI_CTRL_SP_OUTPUT_YUV422,
>> -	}, {
>> -		.fourcc = V4L2_PIX_FMT_VYUY,
>> -		.fmt_type = RKISP1_FMT_YUV,
>> -		.uv_swap = 1,
>> -		.write_format = RKISP1_MI_CTRL_SP_WRITE_INT,
>> -		.output_format = RKISP1_MI_CTRL_SP_OUTPUT_YUV422,
>>   	}, {
>>   		.fourcc = V4L2_PIX_FMT_YUV422P,
>>   		.fmt_type = RKISP1_FMT_YUV,
>
Dafna Hirschfeld April 8, 2020, 10:24 a.m. UTC | #3
On 4/6/20 2:42 PM, Dafna Hirschfeld wrote:
> 
> 
> On 4/6/20 12:43 AM, Laurent Pinchart wrote:
>> Hi Dafna,
>>
>> Thank you for the patch.
>>
>> On Thu, Apr 02, 2020 at 09:04:19PM +0200, Dafna Hirschfeld wrote:
>>> For Ycbcr packed formats only YUYV can be supported by
>>> the driver. This patch removes the other formats.
>>
>> The RKISP1_CIF_MI_BYTE_SWAP bit could possibly help achieving other YUV
>> orders, but as far as I can tell, it would affect both the main path and
>> the self path, so it wouldn't be very convenient. At a quick glance I
>> haven't found a way to support those formats, but just to make sure,
>> have you double-checked that the nv21_self and nv21_main bits of
>> MI_XTD_FORMAT_CTRL don't also affect packed mode ? If they don't,
> Hi, thanks a lot for the reviews, I'll check that.
Hi, unfortunately MI_XTD_FORMAT_CTRL doesn't affect the the packed formats.

Dafna
> 
> Dafna
>>
>> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
>>
>>> Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
>>> Acked-by: Helen Koike <helen.koike@collabora.com>
>>> ---
>>>   drivers/staging/media/rkisp1/rkisp1-capture.c | 21 -------------------
>>>   1 file changed, 21 deletions(-)
>>>
>>> diff --git a/drivers/staging/media/rkisp1/rkisp1-capture.c b/drivers/staging/media/rkisp1/rkisp1-capture.c
>>> index 2d274e8f565b..076335193f40 100644
>>> --- a/drivers/staging/media/rkisp1/rkisp1-capture.c
>>> +++ b/drivers/staging/media/rkisp1/rkisp1-capture.c
>>> @@ -98,15 +98,6 @@ static const struct rkisp1_capture_fmt_cfg rkisp1_mp_fmts[] = {
>>>           .fmt_type = RKISP1_FMT_YUV,
>>>           .uv_swap = 0,
>>>           .write_format = RKISP1_MI_CTRL_MP_WRITE_YUVINT,
>>> -    }, {
>>> -        .fourcc = V4L2_PIX_FMT_YVYU,
>>> -        .fmt_type = RKISP1_FMT_YUV,
>>> -        .uv_swap = 1,
>>> -        .write_format = RKISP1_MI_CTRL_MP_WRITE_YUVINT,
>>> -    }, {
>>> -        .fourcc = V4L2_PIX_FMT_VYUY,
>>> -        .fmt_type = RKISP1_FMT_YUV,
>>> -        .write_format = RKISP1_MI_CTRL_MP_WRITE_YUVINT,
>>>       }, {
>>>           .fourcc = V4L2_PIX_FMT_YUV422P,
>>>           .fmt_type = RKISP1_FMT_YUV,
>>> @@ -234,18 +225,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,
>>> -        .fmt_type = RKISP1_FMT_YUV,
>>> -        .uv_swap = 1,
>>> -        .write_format = RKISP1_MI_CTRL_SP_WRITE_INT,
>>> -        .output_format = RKISP1_MI_CTRL_SP_OUTPUT_YUV422,
>>> -    }, {
>>> -        .fourcc = V4L2_PIX_FMT_VYUY,
>>> -        .fmt_type = RKISP1_FMT_YUV,
>>> -        .uv_swap = 1,
>>> -        .write_format = RKISP1_MI_CTRL_SP_WRITE_INT,
>>> -        .output_format = RKISP1_MI_CTRL_SP_OUTPUT_YUV422,
>>>       }, {
>>>           .fourcc = V4L2_PIX_FMT_YUV422P,
>>>           .fmt_type = RKISP1_FMT_YUV,
>>
diff mbox series

Patch

diff --git a/drivers/staging/media/rkisp1/rkisp1-capture.c b/drivers/staging/media/rkisp1/rkisp1-capture.c
index 2d274e8f565b..076335193f40 100644
--- a/drivers/staging/media/rkisp1/rkisp1-capture.c
+++ b/drivers/staging/media/rkisp1/rkisp1-capture.c
@@ -98,15 +98,6 @@  static const struct rkisp1_capture_fmt_cfg rkisp1_mp_fmts[] = {
 		.fmt_type = RKISP1_FMT_YUV,
 		.uv_swap = 0,
 		.write_format = RKISP1_MI_CTRL_MP_WRITE_YUVINT,
-	}, {
-		.fourcc = V4L2_PIX_FMT_YVYU,
-		.fmt_type = RKISP1_FMT_YUV,
-		.uv_swap = 1,
-		.write_format = RKISP1_MI_CTRL_MP_WRITE_YUVINT,
-	}, {
-		.fourcc = V4L2_PIX_FMT_VYUY,
-		.fmt_type = RKISP1_FMT_YUV,
-		.write_format = RKISP1_MI_CTRL_MP_WRITE_YUVINT,
 	}, {
 		.fourcc = V4L2_PIX_FMT_YUV422P,
 		.fmt_type = RKISP1_FMT_YUV,
@@ -234,18 +225,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,
-		.fmt_type = RKISP1_FMT_YUV,
-		.uv_swap = 1,
-		.write_format = RKISP1_MI_CTRL_SP_WRITE_INT,
-		.output_format = RKISP1_MI_CTRL_SP_OUTPUT_YUV422,
-	}, {
-		.fourcc = V4L2_PIX_FMT_VYUY,
-		.fmt_type = RKISP1_FMT_YUV,
-		.uv_swap = 1,
-		.write_format = RKISP1_MI_CTRL_SP_WRITE_INT,
-		.output_format = RKISP1_MI_CTRL_SP_OUTPUT_YUV422,
 	}, {
 		.fourcc = V4L2_PIX_FMT_YUV422P,
 		.fmt_type = RKISP1_FMT_YUV,