Skip to contentSkip to conversation

media: atmel-isc: Supplement the configuration of formats

PATCH In review Wenyou Yang 2 participants 14 messages Aug 17, 2017 – Sep 1, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover media: atmel-isc: Supplement the configuration of formats

The intention of the patch set is to add more configuration of
formats: GREY, ARGB444, ARGB555 and ARGB32, and add the checking the format from the extern sensor which doesn't support RGB formats from the external sensor.

Wenyou Yang (3):
media: atmel-isc: Not support RBG format from sensor.
media: atmel-isc: Remove the redundant assignment
media: atmel-isc: Add more format configurations

 drivers/media/platform/atmel/atmel-isc.c | 89 ++++++++++++++++++++------------
 1 file changed, 56 insertions(+), 33 deletions(-)
Signature · 1 line
2.13.0
#1 lore raw

PATCH 1/3 media: atmel-isc: Not support RBG format from sensor.

The 12-bit parallel interface supports the Raw Bayer, YCbCr, Monochrome and JPEG Compressed pixel formats from the external sensor, not support RBG pixel format.

---

 drivers/media/platform/atmel/atmel-isc.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/media/platform/atmel/atmel-isc.c +5 -0
index d4df3d4ccd85..535bb03783fe 100644
@@ -1478,6 +1478,11 @@ static int isc_formats_init(struct isc_device *isc)
 	while (!v4l2_subdev_call(subdev, pad, enum_mbus_code,
 	       NULL, &mbus_code)) {
 		mbus_code.index++;
+
+		/* Not support the RGB pixel formats from sensor */
+		if ((mbus_code.code & 0xf000) == 0x1000)
+			continue;
+
 		fmt = find_format_by_code(mbus_code.code, &i);
 		if (!fmt)
 			continue;
Signature · 1 line
2.13.0
#2 lore raw

Re: [PATCH 1/3] media: atmel-isc: Not support RBG format from sensor.

Quoted 15 lines · Wenyou Yang

The 12-bit parallel interface supports the Raw Bayer, YCbCr, Monochrome and JPEG Compressed pixel formats from the external sensor, not support RBG pixel format.

---

 drivers/media/platform/atmel/atmel-isc.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/media/platform/atmel/atmel-isc.c +0 -0
index d4df3d4ccd85..535bb03783fe 100644

drivers/media/platform/atmel/atmel-isc.c static int isc_formats_init(struct isc_device *isc) · line 1484

Quoted 7 lines
drivers/media/platform/atmel/atmel-isc.c +4 -0
@@ -1478,6 +1478,11 @@ static int isc_formats_init(struct isc_device *isc)
 	while (!v4l2_subdev_call(subdev, pad, enum_mbus_code,
 	       NULL, &mbus_code)) {
 		mbus_code.index++;
+
+		/* Not support the RGB pixel formats from sensor */
+		if ((mbus_code.code & 0xf000) == 0x1000)
+			continue;

Am I missing something? Here you skip any RGB mediabus formats, but in patch 3/3 you add RGB mediabus formats. But this patch prevents those new formats from being selected, right?

Regards,

Hans

Quoted 5 lines
drivers/media/platform/atmel/atmel-isc.c +1 -0
+
 		fmt = find_format_by_code(mbus_code.code, &i);
 		if (!fmt)
 			continue;
#3 lore raw

Re: [PATCH 1/3] media: atmel-isc: Not support RBG format from sensor.

Hi Hans,

Quoted 11 lines · Hans Verkuil
Quoted 10 lines · Wenyou Yang

The 12-bit parallel interface supports the Raw Bayer, YCbCr, Monochrome and JPEG Compressed pixel formats from the external sensor, not support RBG pixel format.

---

  drivers/media/platform/atmel/atmel-isc.c | 5 +++++
  1 file changed, 5 insertions(+)
Quoted 15 lines

drivers/media/platform/atmel/atmel-isc.c static int isc_formats_init(struct isc_device *isc) · line 1484

Quoted 12 lines
drivers/media/platform/atmel/atmel-isc.c +4 -0
index d4df3d4ccd85..535bb03783fe 100644
@@ -1478,6 +1478,11 @@ static int isc_formats_init(struct isc_device *isc)
  	while (!v4l2_subdev_call(subdev, pad, enum_mbus_code,
  	       NULL, &mbus_code)) {
  		mbus_code.index++;
+
+		/* Not support the RGB pixel formats from sensor */
+		if ((mbus_code.code & 0xf000) == 0x1000)
+			continue;

Am I missing something? Here you skip any RGB mediabus formats, but in patch 3/3 you add RGB mediabus formats. But this patch prevents those new formats from being selected, right?

This patch prevents getting the RGB format from the sensor directly. The RGB format can be produced by ISC controller by itself.

Quoted 9 lines

Regards,

Hans

Quoted 5 lines
drivers/media/platform/atmel/atmel-isc.c +1 -0
+
  		fmt = find_format_by_code(mbus_code.code, &i);
  		if (!fmt)
  			continue;

Best Regards,
Wenyou Yang

#4 lore raw

Re: [PATCH 1/3] media: atmel-isc: Not support RBG format from sensor.

Quoted 29 lines · Wenyou

Hi Hans,

Quoted 11 lines · Hans Verkuil
Quoted 10 lines · Wenyou Yang

The 12-bit parallel interface supports the Raw Bayer, YCbCr, Monochrome and JPEG Compressed pixel formats from the external sensor, not support RBG pixel format.

---

  drivers/media/platform/atmel/atmel-isc.c | 5 +++++
  1 file changed, 5 insertions(+)
Quoted 15 lines

drivers/media/platform/atmel/atmel-isc.c static int isc_formats_init(struct isc_device *isc) · line 1484

Quoted 12 lines
drivers/media/platform/atmel/atmel-isc.c +4 -0
index d4df3d4ccd85..535bb03783fe 100644
@@ -1478,6 +1478,11 @@ static int isc_formats_init(struct isc_device *isc)
  	while (!v4l2_subdev_call(subdev, pad, enum_mbus_code,
  	       NULL, &mbus_code)) {
  		mbus_code.index++;
+
+		/* Not support the RGB pixel formats from sensor */
+		if ((mbus_code.code & 0xf000) == 0x1000)
+			continue;

Am I missing something? Here you skip any RGB mediabus formats, but in patch 3/3 you add RGB mediabus formats. But this patch prevents those new formats from being selected, right?

Quoted 2 lines

This patch prevents getting the RGB format from the sensor directly. The RGB format can be produced by ISC controller by itself.

OK, I think I see what is going on here. The isc_formats array really is two arrays in one: up to RAW_FMT_IND_END it describes what it can receive from the source, and after that it describes what it can convert it to.

But if you can't handle RGB formats from the sensor, then why not make sure none of the mbus codes in isc_formats uses RGB? That makes much more sense.

E.g.:

        { V4L2_PIX_FMT_RGB565, MEDIA_BUS_FMT_RGB565_2X8_LE, 16,
          ISC_PFE_CFG0_BPS_EIGHT, ISC_BAY_CFG_BGBG, ISC_RLP_CFG_MODE_RGB565,
          ISC_DCFG_IMODE_PACKED16, ISC_DCTRL_DVIEW_PACKED, 0x7b,
          false, false },

Why use MEDIA_BUS_FMT_RGB565_2X8_LE if this apparently is not supported?

Regards,

Hans

Quoted 14 lines
Quoted 10 lines

Regards,

Hans

Quoted 5 lines
drivers/media/platform/atmel/atmel-isc.c +1 -0
+
  		fmt = find_format_by_code(mbus_code.code, &i);
  		if (!fmt)
  			continue;

Best Regards,
Wenyou Yang

#5 lore raw

RE: [PATCH 1/3] media: atmel-isc: Not support RBG format from sensor.

Hi Hans,

Quoted 42 lines

-----Original Message-----
From: Hans Verkuil [mailto:hverkuil at xs4all.nl]
Sent: 2017?8?22? 15:00
To: Wenyou Yang - A41535 <[email protected]>; Mauro Carvalho Chehab <[email protected]>
Cc: Nicolas Ferre - M43238 <[email protected]>; linux- kernel at vger.kernel.org; Sakari Ailus <[email protected]>; Jonathan Corbet <[email protected]>; linux-arm-kernel at lists.infradead.org; Linux Media Mailing List <[email protected]>
Subject: Re: [PATCH 1/3] media: atmel-isc: Not support RBG format from sensor.

Quoted 30 lines · Wenyou

Hi Hans,

Quoted 27 lines · Hans Verkuil
Quoted 16 lines · Wenyou Yang

The 12-bit parallel interface supports the Raw Bayer, YCbCr, Monochrome and JPEG Compressed pixel formats from the external sensor, not support RBG pixel format.

---

  drivers/media/platform/atmel/atmel-isc.c | 5 +++++
  1 file changed, 5 insertions(+)
drivers/media/platform/atmel/atmel-isc.c +0 -0
index d4df3d4ccd85..535bb03783fe 100644

drivers/media/platform/atmel/atmel-isc.c static int isc_formats_init(struct isc_device *isc) · line 1484

Quoted 7 lines
drivers/media/platform/atmel/atmel-isc.c +4 -0
@@ -1478,6 +1478,11 @@ static int isc_formats_init(struct isc_device *isc)
  	while (!v4l2_subdev_call(subdev, pad, enum_mbus_code,
  	       NULL, &mbus_code)) {
  		mbus_code.index++;
+
+		/* Not support the RGB pixel formats from sensor */
+		if ((mbus_code.code & 0xf000) == 0x1000)
+			continue;

Am I missing something? Here you skip any RGB mediabus formats, but in patch 3/3 you add RGB mediabus formats. But this patch prevents those new formats from being selected, right?

Quoted 6 lines
Quoted 2 lines

This patch prevents getting the RGB format from the sensor directly. The RGB format can be produced by ISC controller by itself.

OK, I think I see what is going on here. The isc_formats array really is two arrays in one: up to RAW_FMT_IND_END it describes what it can receive from the source, and after that it describes what it can convert it to.

Not exactly.

Yes, up to RAW_FMT_IND_END, these formats must be got from the senor, they are RAW formats.

Quoted 1 line

From ISC_FMT_IND_START to ISC_FMT_IND_END, they can be generated by the ISC controller.

It is possible they can be got from the sensor too, the driver will check it.
If it can be got from both the sensor and the ISC controller, the user can use the "sensor_preferred" parameter to decide from which one to get. The RBG formats are the exception.

Quoted 6 lines

But if you can't handle RGB formats from the sensor, then why not make sure none of the mbus codes in isc_formats uses RGB? That makes much more sense.

E.g.:

Quoted 7 lines
        { V4L2_PIX_FMT_RGB565, MEDIA_BUS_FMT_RGB565_2X8_LE, 16,
          ISC_PFE_CFG0_BPS_EIGHT, ISC_BAY_CFG_BGBG,

ISC_RLP_CFG_MODE_RGB565,
ISC_DCFG_IMODE_PACKED16, ISC_DCTRL_DVIEW_PACKED, 0x7b, false, false },

Why use MEDIA_BUS_FMT_RGB565_2X8_LE if this apparently is not supported?

This array is also the lists of all formats supported by the ISC(including got from the sensor). The RGB formats are only generated by the ISC controller, not from the sensor.

Quoted 19 lines

Regards,

Hans

Quoted 14 lines
Quoted 10 lines

Regards,

Hans

Quoted 5 lines
drivers/media/platform/atmel/atmel-isc.c +1 -0
+
  		fmt = find_format_by_code(mbus_code.code, &i);
  		if (!fmt)
  			continue;

Best Regards,
Wenyou Yang

Best Regards,
Wenyou Yang

#6 lore raw

Re: [PATCH 1/3] media: atmel-isc: Not support RBG format from sensor.

Quoted 71 lines · Wenyou.Yang at microchip.com

Hi Hans,

Quoted 42 lines

-----Original Message-----
From: Hans Verkuil [mailto:hverkuil at xs4all.nl]
Sent: 2017?8?22? 15:00
To: Wenyou Yang - A41535 <[email protected]>; Mauro Carvalho Chehab <[email protected]>
Cc: Nicolas Ferre - M43238 <[email protected]>; linux- kernel at vger.kernel.org; Sakari Ailus <[email protected]>; Jonathan Corbet <[email protected]>; linux-arm-kernel at lists.infradead.org; Linux Media Mailing List <[email protected]>
Subject: Re: [PATCH 1/3] media: atmel-isc: Not support RBG format from sensor.

Quoted 30 lines · Wenyou

Hi Hans,

Quoted 27 lines · Hans Verkuil
Quoted 16 lines · Wenyou Yang

The 12-bit parallel interface supports the Raw Bayer, YCbCr, Monochrome and JPEG Compressed pixel formats from the external sensor, not support RBG pixel format.

---

  drivers/media/platform/atmel/atmel-isc.c | 5 +++++
  1 file changed, 5 insertions(+)
drivers/media/platform/atmel/atmel-isc.c +0 -0
index d4df3d4ccd85..535bb03783fe 100644

drivers/media/platform/atmel/atmel-isc.c static int isc_formats_init(struct isc_device *isc) · line 1484

Quoted 7 lines
drivers/media/platform/atmel/atmel-isc.c +4 -0
@@ -1478,6 +1478,11 @@ static int isc_formats_init(struct isc_device *isc)
  	while (!v4l2_subdev_call(subdev, pad, enum_mbus_code,
  	       NULL, &mbus_code)) {
  		mbus_code.index++;
+
+		/* Not support the RGB pixel formats from sensor */
+		if ((mbus_code.code & 0xf000) == 0x1000)
+			continue;

Am I missing something? Here you skip any RGB mediabus formats, but in patch 3/3 you add RGB mediabus formats. But this patch prevents those new formats from being selected, right?

Quoted 6 lines
Quoted 2 lines

This patch prevents getting the RGB format from the sensor directly. The RGB format can be produced by ISC controller by itself.

OK, I think I see what is going on here. The isc_formats array really is two arrays in one: up to RAW_FMT_IND_END it describes what it can receive from the source, and after that it describes what it can convert it to.

Not exactly.

Yes, up to RAW_FMT_IND_END, these formats must be got from the senor, they are RAW formats.
From ISC_FMT_IND_START to ISC_FMT_IND_END, they can be generated by the ISC controller.
It is possible they can be got from the sensor too, the driver will check it.
If it can be got from both the sensor and the ISC controller, the user can use the "sensor_preferred" parameter to decide from which one to get. The RBG formats are the exception.

Quoted 12 lines

But if you can't handle RGB formats from the sensor, then why not make sure none of the mbus codes in isc_formats uses RGB? That makes much more sense.

E.g.:

        { V4L2_PIX_FMT_RGB565, MEDIA_BUS_FMT_RGB565_2X8_LE, 16,
          ISC_PFE_CFG0_BPS_EIGHT, ISC_BAY_CFG_BGBG,

ISC_RLP_CFG_MODE_RGB565,
ISC_DCFG_IMODE_PACKED16, ISC_DCTRL_DVIEW_PACKED, 0x7b, false, false },

Quoted 4 lines
Quoted 1 line

Why use MEDIA_BUS_FMT_RGB565_2X8_LE if this apparently is not supported?

This array is also the lists of all formats supported by the ISC(including got from the sensor). The RGB formats are only generated by the ISC controller, not from the sensor.

You're adding code that skips any entries of the table where mbus_code is an RGB code. But this can also be done by not having RGB mbus codes in the table in the first place since they make no sense if the HW cannot handle that! Set the mbus_code to e.g. 0 for such entries, that makes more sense.

I also strongly suggest changing how the table is organized since those _FMT_IND_ indices are all to easy to get wrong (and frankly hard to understand).

Regards,

Hans

Quoted 24 lines
Quoted 20 lines

Regards,

Hans

Quoted 14 lines
Quoted 10 lines

Regards,

Hans

Quoted 5 lines
drivers/media/platform/atmel/atmel-isc.c +1 -0
+
  		fmt = find_format_by_code(mbus_code.code, &i);
  		if (!fmt)
  			continue;

Best Regards,
Wenyou Yang

Best Regards,
Wenyou Yang

#7 lore raw

Re: [PATCH 1/3] media: atmel-isc: Not support RBG format from sensor.

Quoted 72 lines · Hans Verkuil
Quoted 68 lines · Wenyou.Yang at microchip.com

Hi Hans,

Quoted 42 lines

-----Original Message-----
From: Hans Verkuil [mailto:hverkuil at xs4all.nl]
Sent: 2017?8?22? 15:00
To: Wenyou Yang - A41535 <[email protected]>; Mauro Carvalho Chehab <[email protected]>
Cc: Nicolas Ferre - M43238 <[email protected]>; linux- kernel at vger.kernel.org; Sakari Ailus <[email protected]>; Jonathan Corbet <[email protected]>; linux-arm-kernel at lists.infradead.org; Linux Media Mailing List <[email protected]>
Subject: Re: [PATCH 1/3] media: atmel-isc: Not support RBG format from sensor.

Quoted 30 lines · Wenyou

Hi Hans,

Quoted 27 lines · Hans Verkuil
Quoted 16 lines · Wenyou Yang

The 12-bit parallel interface supports the Raw Bayer, YCbCr, Monochrome and JPEG Compressed pixel formats from the external sensor, not support RBG pixel format.

---

   drivers/media/platform/atmel/atmel-isc.c | 5 +++++
   1 file changed, 5 insertions(+)
drivers/media/platform/atmel/atmel-isc.c +0 -0
index d4df3d4ccd85..535bb03783fe 100644

drivers/media/platform/atmel/atmel-isc.c static int isc_formats_init(struct isc_device *isc) · line 1484

Quoted 7 lines
drivers/media/platform/atmel/atmel-isc.c +4 -0
@@ -1478,6 +1478,11 @@ static int isc_formats_init(struct isc_device *isc)
   	while (!v4l2_subdev_call(subdev, pad, enum_mbus_code,
   	       NULL, &mbus_code)) {
   		mbus_code.index++;
+
+		/* Not support the RGB pixel formats from sensor */
+		if ((mbus_code.code & 0xf000) == 0x1000)
+			continue;

Am I missing something? Here you skip any RGB mediabus formats, but in patch 3/3 you add RGB mediabus formats. But this patch prevents those new formats from being selected, right?

Quoted 5 lines
Quoted 2 lines

This patch prevents getting the RGB format from the sensor directly. The RGB format can be produced by ISC controller by itself.

OK, I think I see what is going on here. The isc_formats array really is two arrays in one: up to RAW_FMT_IND_END it describes what it can receive from the source, and after that it describes what it can convert it to.

Not exactly.

Yes, up to RAW_FMT_IND_END, these formats must be got from the senor, they are RAW formats.
From ISC_FMT_IND_START to ISC_FMT_IND_END, they can be generated by the ISC controller.
It is possible they can be got from the sensor too, the driver will check it.
If it can be got from both the sensor and the ISC controller, the user can use the "sensor_preferred" parameter to decide from which one to get. The RBG formats are the exception.

Quoted 11 lines

But if you can't handle RGB formats from the sensor, then why not make sure none of the mbus codes in isc_formats uses RGB? That makes much more sense.

E.g.:

         { V4L2_PIX_FMT_RGB565, MEDIA_BUS_FMT_RGB565_2X8_LE, 16,
           ISC_PFE_CFG0_BPS_EIGHT, ISC_BAY_CFG_BGBG,

ISC_RLP_CFG_MODE_RGB565,
ISC_DCFG_IMODE_PACKED16, ISC_DCTRL_DVIEW_PACKED, 0x7b, false, false },

Quoted 3 lines
Quoted 1 line

Why use MEDIA_BUS_FMT_RGB565_2X8_LE if this apparently is not supported?

This array is also the lists of all formats supported by the ISC(including got from the sensor). The RGB formats are only generated by the ISC controller, not from the sensor.

Quoted 7 lines

You're adding code that skips any entries of the table where mbus_code is an RGB code. But this can also be done by not having RGB mbus codes in the table in the first place since they make no sense if the HW cannot handle that! Set the mbus_code to e.g. 0 for such entries, that makes more sense.

I also strongly suggest changing how the table is organized since those _FMT_IND_ indices are all to easy to get wrong (and frankly hard to understand).

Yes, you are right, I will change it. Do you have some advice?

Thank you.

Quoted 23 lines

Regards,

Hans

Quoted 18 lines
Quoted 16 lines

Regards,

Hans

Quoted 12 lines
Quoted 9 lines

Regards,

Hans

Quoted 5 lines
drivers/media/platform/atmel/atmel-isc.c +1 -0
+
   		fmt = find_format_by_code(mbus_code.code, &i);
   		if (!fmt)
   			continue;

Best Regards,
Wenyou Yang

Best Regards,
Wenyou Yang

Best Regards,
Wenyou Yang

#8 lore raw

Re: [PATCH 1/3] media: atmel-isc: Not support RBG format from sensor.

Quoted 75 lines · Wenyou
Quoted 72 lines · Hans Verkuil
Quoted 71 lines · Wenyou.Yang at microchip.com

Hi Hans,

Quoted 42 lines

-----Original Message-----
From: Hans Verkuil [mailto:hverkuil at xs4all.nl]
Sent: 2017?8?22? 15:00
To: Wenyou Yang - A41535 <[email protected]>; Mauro Carvalho Chehab <[email protected]>
Cc: Nicolas Ferre - M43238 <[email protected]>; linux- kernel at vger.kernel.org; Sakari Ailus <[email protected]>; Jonathan Corbet <[email protected]>; linux-arm-kernel at lists.infradead.org; Linux Media Mailing List <[email protected]>
Subject: Re: [PATCH 1/3] media: atmel-isc: Not support RBG format from sensor.

Quoted 30 lines · Wenyou

Hi Hans,

Quoted 27 lines · Hans Verkuil
Quoted 16 lines · Wenyou Yang

The 12-bit parallel interface supports the Raw Bayer, YCbCr, Monochrome and JPEG Compressed pixel formats from the external sensor, not support RBG pixel format.

---

   drivers/media/platform/atmel/atmel-isc.c | 5 +++++
   1 file changed, 5 insertions(+)
drivers/media/platform/atmel/atmel-isc.c +0 -0
index d4df3d4ccd85..535bb03783fe 100644

drivers/media/platform/atmel/atmel-isc.c static int isc_formats_init(struct isc_device *isc) · line 1484

Quoted 7 lines
drivers/media/platform/atmel/atmel-isc.c +4 -0
@@ -1478,6 +1478,11 @@ static int isc_formats_init(struct isc_device *isc)
   	while (!v4l2_subdev_call(subdev, pad, enum_mbus_code,
   	       NULL, &mbus_code)) {
   		mbus_code.index++;
+
+		/* Not support the RGB pixel formats from sensor */
+		if ((mbus_code.code & 0xf000) == 0x1000)
+			continue;

Am I missing something? Here you skip any RGB mediabus formats, but in patch 3/3 you add RGB mediabus formats. But this patch prevents those new formats from being selected, right?

Quoted 5 lines
Quoted 2 lines

This patch prevents getting the RGB format from the sensor directly. The RGB format can be produced by ISC controller by itself.

OK, I think I see what is going on here. The isc_formats array really is two arrays in one: up to RAW_FMT_IND_END it describes what it can receive from the source, and after that it describes what it can convert it to.

Not exactly.

Yes, up to RAW_FMT_IND_END, these formats must be got from the senor, they are RAW formats.
From ISC_FMT_IND_START to ISC_FMT_IND_END, they can be generated by the ISC controller.
It is possible they can be got from the sensor too, the driver will check it.
If it can be got from both the sensor and the ISC controller, the user can use the "sensor_preferred" parameter to decide from which one to get. The RBG formats are the exception.

Quoted 5 lines

But if you can't handle RGB formats from the sensor, then why not make sure none of the mbus codes in isc_formats uses RGB? That makes much more sense.

E.g.:

Quoted 7 lines
         { V4L2_PIX_FMT_RGB565, MEDIA_BUS_FMT_RGB565_2X8_LE, 16,
           ISC_PFE_CFG0_BPS_EIGHT, ISC_BAY_CFG_BGBG,

ISC_RLP_CFG_MODE_RGB565,
ISC_DCFG_IMODE_PACKED16, ISC_DCTRL_DVIEW_PACKED, 0x7b, false, false },

Why use MEDIA_BUS_FMT_RGB565_2X8_LE if this apparently is not supported?

This array is also the lists of all formats supported by the ISC(including got from the sensor). The RGB formats are only generated by the ISC controller, not from the sensor.

Quoted 8 lines
Quoted 7 lines

You're adding code that skips any entries of the table where mbus_code is an RGB code. But this can also be done by not having RGB mbus codes in the table in the first place since they make no sense if the HW cannot handle that! Set the mbus_code to e.g. 0 for such entries, that makes more sense.

I also strongly suggest changing how the table is organized since those _FMT_IND_ indices are all to easy to get wrong (and frankly hard to understand).

Yes, you are right, I will change it. Do you have some advice?

Two options spring to mind: split into two tables or add a bool that tells whether the format can be created by the isc or not.

Regards,

Hans

#9 lore raw

Re: [PATCH 1/3] media: atmel-isc: Not support RBG format from sensor.

Hi Hans,

Quoted 80 lines · Hans Verkuil
Quoted 79 lines · Wenyou
Quoted 77 lines · Hans Verkuil
Quoted 68 lines · Wenyou.Yang at microchip.com

Hi Hans,

Quoted 42 lines

-----Original Message-----
From: Hans Verkuil [mailto:hverkuil at xs4all.nl]
Sent: 2017?8?22? 15:00
To: Wenyou Yang - A41535 <[email protected]>; Mauro Carvalho Chehab <[email protected]>
Cc: Nicolas Ferre - M43238 <[email protected]>; linux- kernel at vger.kernel.org; Sakari Ailus <[email protected]>; Jonathan Corbet <[email protected]>; linux-arm-kernel at lists.infradead.org; Linux Media Mailing List <[email protected]>
Subject: Re: [PATCH 1/3] media: atmel-isc: Not support RBG format from sensor.

Quoted 30 lines · Wenyou

Hi Hans,

Quoted 27 lines · Hans Verkuil
Quoted 16 lines · Wenyou Yang

The 12-bit parallel interface supports the Raw Bayer, YCbCr, Monochrome and JPEG Compressed pixel formats from the external sensor, not support RBG pixel format.

---

    drivers/media/platform/atmel/atmel-isc.c | 5 +++++
    1 file changed, 5 insertions(+)
drivers/media/platform/atmel/atmel-isc.c +0 -0
index d4df3d4ccd85..535bb03783fe 100644

drivers/media/platform/atmel/atmel-isc.c static int isc_formats_init(struct isc_device *isc) · line 1484

Quoted 7 lines
drivers/media/platform/atmel/atmel-isc.c +4 -0
@@ -1478,6 +1478,11 @@ static int isc_formats_init(struct isc_device *isc)
    	while (!v4l2_subdev_call(subdev, pad, enum_mbus_code,
    	       NULL, &mbus_code)) {
    		mbus_code.index++;
+
+		/* Not support the RGB pixel formats from sensor */
+		if ((mbus_code.code & 0xf000) == 0x1000)
+			continue;

Am I missing something? Here you skip any RGB mediabus formats, but in patch 3/3 you add RGB mediabus formats. But this patch prevents those new formats from being selected, right?

Quoted 5 lines
Quoted 2 lines

This patch prevents getting the RGB format from the sensor directly. The RGB format can be produced by ISC controller by itself.

OK, I think I see what is going on here. The isc_formats array really is two arrays in one: up to RAW_FMT_IND_END it describes what it can receive from the source, and after that it describes what it can convert it to.

Not exactly.

Yes, up to RAW_FMT_IND_END, these formats must be got from the senor, they are RAW formats.
From ISC_FMT_IND_START to ISC_FMT_IND_END, they can be generated by the ISC controller.
It is possible they can be got from the sensor too, the driver will check it.
If it can be got from both the sensor and the ISC controller, the user can use the "sensor_preferred" parameter to decide from which one to get. The RBG formats are the exception.

Quoted 11 lines

But if you can't handle RGB formats from the sensor, then why not make sure none of the mbus codes in isc_formats uses RGB? That makes much more sense.

E.g.:

          { V4L2_PIX_FMT_RGB565, MEDIA_BUS_FMT_RGB565_2X8_LE, 16,
            ISC_PFE_CFG0_BPS_EIGHT, ISC_BAY_CFG_BGBG,

ISC_RLP_CFG_MODE_RGB565,
ISC_DCFG_IMODE_PACKED16, ISC_DCTRL_DVIEW_PACKED, 0x7b, false, false },

Quoted 3 lines
Quoted 1 line

Why use MEDIA_BUS_FMT_RGB565_2X8_LE if this apparently is not supported?

This array is also the lists of all formats supported by the ISC(including got from the sensor). The RGB formats are only generated by the ISC controller, not from the sensor.

You're adding code that skips any entries of the table where mbus_code is an RGB code. But this can also be done by not having RGB mbus codes in the table in the first place since they make no sense if the HW cannot handle that! Set the mbus_code to e.g. 0 for such entries, that makes more sense.

Quoted 5 lines
Quoted 3 lines
Quoted 2 lines

I also strongly suggest changing how the table is organized since those _FMT_IND_ indices are all to easy to get wrong (and frankly hard to understand).

Yes, you are right, I will change it. Do you have some advice?

Two options spring to mind: split into two tables or add a bool that tells whether the format can be created by the isc or not.

I reworked the format table,
http://lists.infradead.org/pipermail/linux-arm-kernel/2017-August/529683.html
Please give your comments.

Quoted 4 lines

Regards,

Hans

Best Regards,
Wenyou Yang

#10 lore raw

PATCH 2/3 media: atmel-isc: Remove the redundant assignment

In reply to Wenyou Yang

Remove the redundant assignment of members in the isc_formats array.

---

 drivers/media/platform/atmel/atmel-isc.c | 64 ++++++++++++++++----------------
 1 file changed, 32 insertions(+), 32 deletions(-)
drivers/media/platform/atmel/atmel-isc.c +32 -32
index 535bb03783fe..d91f4e5f8a8d 100644
@@ -187,74 +187,74 @@ struct isc_device {
 #define ISC_FMT_IND_END      14
 
 static struct isc_format isc_formats[] = {
+	/* 0 */
 	{ V4L2_PIX_FMT_SBGGR8, MEDIA_BUS_FMT_SBGGR8_1X8, 8,
 	  ISC_PFE_CFG0_BPS_EIGHT, ISC_BAY_CFG_BGBG, ISC_RLP_CFG_MODE_DAT8,
-	  ISC_DCFG_IMODE_PACKED8, ISC_DCTRL_DVIEW_PACKED, 0x0,
-	  false, false },
+	  ISC_DCFG_IMODE_PACKED8, ISC_DCTRL_DVIEW_PACKED, 0x0 },
+	/* 1 */
 	{ V4L2_PIX_FMT_SGBRG8, MEDIA_BUS_FMT_SGBRG8_1X8, 8,
 	  ISC_PFE_CFG0_BPS_EIGHT, ISC_BAY_CFG_GBGB, ISC_RLP_CFG_MODE_DAT8,
-	  ISC_DCFG_IMODE_PACKED8, ISC_DCTRL_DVIEW_PACKED, 0x0,
-	  false, false },
+	  ISC_DCFG_IMODE_PACKED8, ISC_DCTRL_DVIEW_PACKED, 0x0 },
+	/* 2 */
 	{ V4L2_PIX_FMT_SGRBG8, MEDIA_BUS_FMT_SGRBG8_1X8, 8,
 	  ISC_PFE_CFG0_BPS_EIGHT, ISC_BAY_CFG_GRGR, ISC_RLP_CFG_MODE_DAT8,
-	  ISC_DCFG_IMODE_PACKED8, ISC_DCTRL_DVIEW_PACKED, 0x0,
-	  false, false },
+	  ISC_DCFG_IMODE_PACKED8, ISC_DCTRL_DVIEW_PACKED, 0x0 },
+	/* 3 */
 	{ V4L2_PIX_FMT_SRGGB8, MEDIA_BUS_FMT_SRGGB8_1X8, 8,
 	  ISC_PFE_CFG0_BPS_EIGHT, ISC_BAY_CFG_RGRG, ISC_RLP_CFG_MODE_DAT8,
-	  ISC_DCFG_IMODE_PACKED8, ISC_DCTRL_DVIEW_PACKED, 0x0,
-	  false, false },
+	  ISC_DCFG_IMODE_PACKED8, ISC_DCTRL_DVIEW_PACKED, 0x0 },
 
+	/* 4 */
 	{ V4L2_PIX_FMT_SBGGR10, MEDIA_BUS_FMT_SBGGR10_1X10, 16,
 	  ISC_PFG_CFG0_BPS_TEN, ISC_BAY_CFG_BGBG, ISC_RLP_CFG_MODE_DAT10,
-	  ISC_DCFG_IMODE_PACKED16, ISC_DCTRL_DVIEW_PACKED, 0x0,
-	  false, false },
+	  ISC_DCFG_IMODE_PACKED16, ISC_DCTRL_DVIEW_PACKED, 0x0 },
+	/* 5 */
 	{ V4L2_PIX_FMT_SGBRG10, MEDIA_BUS_FMT_SGBRG10_1X10, 16,
 	  ISC_PFG_CFG0_BPS_TEN, ISC_BAY_CFG_GBGB, ISC_RLP_CFG_MODE_DAT10,
-	  ISC_DCFG_IMODE_PACKED16, ISC_DCTRL_DVIEW_PACKED, 0x0,
-	  false, false },
+	  ISC_DCFG_IMODE_PACKED16, ISC_DCTRL_DVIEW_PACKED, 0x0 },
+	/* 6 */
 	{ V4L2_PIX_FMT_SGRBG10, MEDIA_BUS_FMT_SGRBG10_1X10, 16,
 	  ISC_PFG_CFG0_BPS_TEN, ISC_BAY_CFG_GRGR, ISC_RLP_CFG_MODE_DAT10,
-	  ISC_DCFG_IMODE_PACKED16, ISC_DCTRL_DVIEW_PACKED, 0x0,
-	  false, false },
+	  ISC_DCFG_IMODE_PACKED16, ISC_DCTRL_DVIEW_PACKED, 0x0 },
+	/* 7 */
 	{ V4L2_PIX_FMT_SRGGB10, MEDIA_BUS_FMT_SRGGB10_1X10, 16,
 	  ISC_PFG_CFG0_BPS_TEN, ISC_BAY_CFG_RGRG, ISC_RLP_CFG_MODE_DAT10,
-	  ISC_DCFG_IMODE_PACKED16, ISC_DCTRL_DVIEW_PACKED, 0x0,
-	  false, false },
+	  ISC_DCFG_IMODE_PACKED16, ISC_DCTRL_DVIEW_PACKED, 0x0 },
 
+	/* 8 */
 	{ V4L2_PIX_FMT_SBGGR12, MEDIA_BUS_FMT_SBGGR12_1X12, 16,
 	  ISC_PFG_CFG0_BPS_TWELVE, ISC_BAY_CFG_BGBG, ISC_RLP_CFG_MODE_DAT12,
-	  ISC_DCFG_IMODE_PACKED16, ISC_DCTRL_DVIEW_PACKED, 0x0,
-	  false, false },
+	  ISC_DCFG_IMODE_PACKED16, ISC_DCTRL_DVIEW_PACKED, 0x0 },
+	/* 9 */
 	{ V4L2_PIX_FMT_SGBRG12, MEDIA_BUS_FMT_SGBRG12_1X12, 16,
 	  ISC_PFG_CFG0_BPS_TWELVE, ISC_BAY_CFG_GBGB, ISC_RLP_CFG_MODE_DAT12,
-	  ISC_DCFG_IMODE_PACKED16, ISC_DCTRL_DVIEW_PACKED, 0x0,
-	  false, false },
+	  ISC_DCFG_IMODE_PACKED16, ISC_DCTRL_DVIEW_PACKED, 0x0 },
+	/* 10 */
 	{ V4L2_PIX_FMT_SGRBG12, MEDIA_BUS_FMT_SGRBG12_1X12, 16,
 	  ISC_PFG_CFG0_BPS_TWELVE, ISC_BAY_CFG_GRGR, ISC_RLP_CFG_MODE_DAT12,
-	  ISC_DCFG_IMODE_PACKED16, ISC_DCTRL_DVIEW_PACKED, 0x0,
-	  false, false },
+	  ISC_DCFG_IMODE_PACKED16, ISC_DCTRL_DVIEW_PACKED, 0x0 },
+	/* 11 */
 	{ V4L2_PIX_FMT_SRGGB12, MEDIA_BUS_FMT_SRGGB12_1X12, 16,
 	  ISC_PFG_CFG0_BPS_TWELVE, ISC_BAY_CFG_RGRG, ISC_RLP_CFG_MODE_DAT12,
-	  ISC_DCFG_IMODE_PACKED16, ISC_DCTRL_DVIEW_PACKED, 0x0,
-	  false, false },
+	  ISC_DCFG_IMODE_PACKED16, ISC_DCTRL_DVIEW_PACKED, 0x0 },
 
+	/* 12 */
 	{ V4L2_PIX_FMT_YUV420, 0x0, 12,
 	  ISC_PFE_CFG0_BPS_EIGHT, ISC_BAY_CFG_BGBG, ISC_RLP_CFG_MODE_YYCC,
-	  ISC_DCFG_IMODE_YC420P, ISC_DCTRL_DVIEW_PLANAR, 0x7fb,
-	  false, false },
+	  ISC_DCFG_IMODE_YC420P, ISC_DCTRL_DVIEW_PLANAR, 0x7fb },
+	/* 13 */
 	{ V4L2_PIX_FMT_YUV422P, 0x0, 16,
 	  ISC_PFE_CFG0_BPS_EIGHT, ISC_BAY_CFG_BGBG, ISC_RLP_CFG_MODE_YYCC,
-	  ISC_DCFG_IMODE_YC422P, ISC_DCTRL_DVIEW_PLANAR, 0x3fb,
-	  false, false },
+	  ISC_DCFG_IMODE_YC422P, ISC_DCTRL_DVIEW_PLANAR, 0x3fb },
+	/* 14 */
 	{ V4L2_PIX_FMT_RGB565, MEDIA_BUS_FMT_RGB565_2X8_LE, 16,
 	  ISC_PFE_CFG0_BPS_EIGHT, ISC_BAY_CFG_BGBG, ISC_RLP_CFG_MODE_RGB565,
-	  ISC_DCFG_IMODE_PACKED16, ISC_DCTRL_DVIEW_PACKED, 0x7b,
-	  false, false },
+	  ISC_DCFG_IMODE_PACKED16, ISC_DCTRL_DVIEW_PACKED, 0x7b },
 
+	/* 15 */
 	{ V4L2_PIX_FMT_YUYV, MEDIA_BUS_FMT_YUYV8_2X8, 16,
 	  ISC_PFE_CFG0_BPS_EIGHT, ISC_BAY_CFG_BGBG, ISC_RLP_CFG_MODE_DAT8,
-	  ISC_DCFG_IMODE_PACKED8, ISC_DCTRL_DVIEW_PACKED, 0x0,
-	  false, false },
+	  ISC_DCFG_IMODE_PACKED8, ISC_DCTRL_DVIEW_PACKED, 0x0 },
 };
 
 #define GAMMA_MAX	2
Signature · 1 line
2.13.0
#11 lore raw

PATCH 3/3 media: atmel-isc: Add more format configurations

In reply to Wenyou Yang

Add the configuration of formats: GREY, ARGB444, ARGB555 and ARGB32.

---

 drivers/media/platform/atmel/atmel-isc.c | 22 ++++++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)
drivers/media/platform/atmel/atmel-isc.c +20 -2
index d91f4e5f8a8d..4e18fe1104c8 100644
@@ -184,7 +184,7 @@ struct isc_device {
 #define RAW_FMT_IND_START    0
 #define RAW_FMT_IND_END      11
 #define ISC_FMT_IND_START    12
-#define ISC_FMT_IND_END      14
+#define ISC_FMT_IND_END      18
 
 static struct isc_format isc_formats[] = {
 	/* 0 */
@@ -246,12 +246,30 @@ static struct isc_format isc_formats[] = {
 	{ V4L2_PIX_FMT_YUV422P, 0x0, 16,
 	  ISC_PFE_CFG0_BPS_EIGHT, ISC_BAY_CFG_BGBG, ISC_RLP_CFG_MODE_YYCC,
 	  ISC_DCFG_IMODE_YC422P, ISC_DCTRL_DVIEW_PLANAR, 0x3fb },
+
 	/* 14 */
+	{ V4L2_PIX_FMT_GREY, MEDIA_BUS_FMT_Y8_1X8, 8,
+	  ISC_PFE_CFG0_BPS_EIGHT, ISC_BAY_CFG_BGBG, ISC_RLP_CFG_MODE_DATY8,
+	  ISC_DCFG_IMODE_PACKED8, ISC_DCTRL_DVIEW_PACKED, 0x1fb },
+
+	/* 15 */
+	{ V4L2_PIX_FMT_ARGB444, MEDIA_BUS_FMT_RGB444_2X8_PADHI_LE, 16,
+	  ISC_PFE_CFG0_BPS_EIGHT, ISC_BAY_CFG_BGBG, ISC_RLP_CFG_MODE_ARGB444,
+	  ISC_DCFG_IMODE_PACKED16, ISC_DCTRL_DVIEW_PACKED, 0x7b },
+	/* 16 */
+	{ V4L2_PIX_FMT_ARGB555, MEDIA_BUS_FMT_RGB555_2X8_PADHI_LE, 16,
+	  ISC_PFE_CFG0_BPS_EIGHT, ISC_BAY_CFG_BGBG, ISC_RLP_CFG_MODE_ARGB555,
+	  ISC_DCFG_IMODE_PACKED16, ISC_DCTRL_DVIEW_PACKED, 0x7b },
+	/* 17 */
 	{ V4L2_PIX_FMT_RGB565, MEDIA_BUS_FMT_RGB565_2X8_LE, 16,
 	  ISC_PFE_CFG0_BPS_EIGHT, ISC_BAY_CFG_BGBG, ISC_RLP_CFG_MODE_RGB565,
 	  ISC_DCFG_IMODE_PACKED16, ISC_DCTRL_DVIEW_PACKED, 0x7b },
+	/* 18 */
+	{ V4L2_PIX_FMT_ARGB32, MEDIA_BUS_FMT_ARGB8888_1X32, 32,
+	  ISC_PFE_CFG0_BPS_EIGHT, ISC_BAY_CFG_BGBG, ISC_RLP_CFG_MODE_ARGB32,
+	  ISC_DCFG_IMODE_PACKED32, ISC_DCTRL_DVIEW_PACKED, 0x7b },
 
-	/* 15 */
+	/* 19 */
 	{ V4L2_PIX_FMT_YUYV, MEDIA_BUS_FMT_YUYV8_2X8, 16,
 	  ISC_PFE_CFG0_BPS_EIGHT, ISC_BAY_CFG_BGBG, ISC_RLP_CFG_MODE_DAT8,
 	  ISC_DCFG_IMODE_PACKED8, ISC_DCTRL_DVIEW_PACKED, 0x0 },
Signature · 1 line
2.13.0
#12 lore raw

Re: [PATCH 3/3] media: atmel-isc: Add more format configurations

Quoted 13 lines · Wenyou Yang

Add the configuration of formats: GREY, ARGB444, ARGB555 and ARGB32.

---

 drivers/media/platform/atmel/atmel-isc.c | 22 ++++++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)
drivers/media/platform/atmel/atmel-isc.c +0 -0
index d91f4e5f8a8d..4e18fe1104c8 100644

drivers/media/platform/atmel/atmel-isc.c struct isc_device { · line 187

Quoted 5 lines
drivers/media/platform/atmel/atmel-isc.c +1 -1
@@ -184,7 +184,7 @@ struct isc_device {
 #define RAW_FMT_IND_START    0
 #define RAW_FMT_IND_END      11
 #define ISC_FMT_IND_START    12
-#define ISC_FMT_IND_END      14
+#define ISC_FMT_IND_END      18

Shouldn't this be 19?

Regards,

Hans

Quoted 36 lines
drivers/media/platform/atmel/atmel-isc.c +19 -1
 static struct isc_format isc_formats[] = {
 	/* 0 */
@@ -246,12 +246,30 @@ static struct isc_format isc_formats[] = {
 	{ V4L2_PIX_FMT_YUV422P, 0x0, 16,
 	  ISC_PFE_CFG0_BPS_EIGHT, ISC_BAY_CFG_BGBG, ISC_RLP_CFG_MODE_YYCC,
 	  ISC_DCFG_IMODE_YC422P, ISC_DCTRL_DVIEW_PLANAR, 0x3fb },
+
 	/* 14 */
+	{ V4L2_PIX_FMT_GREY, MEDIA_BUS_FMT_Y8_1X8, 8,
+	  ISC_PFE_CFG0_BPS_EIGHT, ISC_BAY_CFG_BGBG, ISC_RLP_CFG_MODE_DATY8,
+	  ISC_DCFG_IMODE_PACKED8, ISC_DCTRL_DVIEW_PACKED, 0x1fb },
+
+	/* 15 */
+	{ V4L2_PIX_FMT_ARGB444, MEDIA_BUS_FMT_RGB444_2X8_PADHI_LE, 16,
+	  ISC_PFE_CFG0_BPS_EIGHT, ISC_BAY_CFG_BGBG, ISC_RLP_CFG_MODE_ARGB444,
+	  ISC_DCFG_IMODE_PACKED16, ISC_DCTRL_DVIEW_PACKED, 0x7b },
+	/* 16 */
+	{ V4L2_PIX_FMT_ARGB555, MEDIA_BUS_FMT_RGB555_2X8_PADHI_LE, 16,
+	  ISC_PFE_CFG0_BPS_EIGHT, ISC_BAY_CFG_BGBG, ISC_RLP_CFG_MODE_ARGB555,
+	  ISC_DCFG_IMODE_PACKED16, ISC_DCTRL_DVIEW_PACKED, 0x7b },
+	/* 17 */
 	{ V4L2_PIX_FMT_RGB565, MEDIA_BUS_FMT_RGB565_2X8_LE, 16,
 	  ISC_PFE_CFG0_BPS_EIGHT, ISC_BAY_CFG_BGBG, ISC_RLP_CFG_MODE_RGB565,
 	  ISC_DCFG_IMODE_PACKED16, ISC_DCTRL_DVIEW_PACKED, 0x7b },
+	/* 18 */
+	{ V4L2_PIX_FMT_ARGB32, MEDIA_BUS_FMT_ARGB8888_1X32, 32,
+	  ISC_PFE_CFG0_BPS_EIGHT, ISC_BAY_CFG_BGBG, ISC_RLP_CFG_MODE_ARGB32,
+	  ISC_DCFG_IMODE_PACKED32, ISC_DCTRL_DVIEW_PACKED, 0x7b },
 
-	/* 15 */
+	/* 19 */
 	{ V4L2_PIX_FMT_YUYV, MEDIA_BUS_FMT_YUYV8_2X8, 16,
 	  ISC_PFE_CFG0_BPS_EIGHT, ISC_BAY_CFG_BGBG, ISC_RLP_CFG_MODE_DAT8,
 	  ISC_DCFG_IMODE_PACKED8, ISC_DCTRL_DVIEW_PACKED, 0x0 },
#13 lore raw

Re: [PATCH 3/3] media: atmel-isc: Add more format configurations

Hi Hans,

Quoted 9 lines · Hans Verkuil
Quoted 8 lines · Wenyou Yang

Add the configuration of formats: GREY, ARGB444, ARGB555 and ARGB32.

---

  drivers/media/platform/atmel/atmel-isc.c | 22 ++++++++++++++++++++--
  1 file changed, 20 insertions(+), 2 deletions(-)
Quoted 11 lines

drivers/media/platform/atmel/atmel-isc.c struct isc_device { · line 187

Quoted 10 lines
drivers/media/platform/atmel/atmel-isc.c +1 -1
index d91f4e5f8a8d..4e18fe1104c8 100644
@@ -184,7 +184,7 @@ struct isc_device {
  #define RAW_FMT_IND_START    0
  #define RAW_FMT_IND_END      11
  #define ISC_FMT_IND_START    12
-#define ISC_FMT_IND_END      14
+#define ISC_FMT_IND_END      18

Shouldn't this be 19?

From ISC_FMT_IND_START to ISC_FMT_IND_END, it describes the formats
they can be got from both the sensor (possibly) and the ISC controller.

The last format (19) is in not this category. It maybe be got from the sensor, can't be generated by the controller.

Quoted 34 lines

Regards,

Hans

Quoted 30 lines
drivers/media/platform/atmel/atmel-isc.c +18 -0
  static struct isc_format isc_formats[] = {
  	/* 0 */
@@ -246,12 +246,30 @@ static struct isc_format isc_formats[] = {
  	{ V4L2_PIX_FMT_YUV422P, 0x0, 16,
  	  ISC_PFE_CFG0_BPS_EIGHT, ISC_BAY_CFG_BGBG, ISC_RLP_CFG_MODE_YYCC,
  	  ISC_DCFG_IMODE_YC422P, ISC_DCTRL_DVIEW_PLANAR, 0x3fb },
+
  	/* 14 */
+	{ V4L2_PIX_FMT_GREY, MEDIA_BUS_FMT_Y8_1X8, 8,
+	  ISC_PFE_CFG0_BPS_EIGHT, ISC_BAY_CFG_BGBG, ISC_RLP_CFG_MODE_DATY8,
+	  ISC_DCFG_IMODE_PACKED8, ISC_DCTRL_DVIEW_PACKED, 0x1fb },
+
+	/* 15 */
+	{ V4L2_PIX_FMT_ARGB444, MEDIA_BUS_FMT_RGB444_2X8_PADHI_LE, 16,
+	  ISC_PFE_CFG0_BPS_EIGHT, ISC_BAY_CFG_BGBG, ISC_RLP_CFG_MODE_ARGB444,
+	  ISC_DCFG_IMODE_PACKED16, ISC_DCTRL_DVIEW_PACKED, 0x7b },
+	/* 16 */
+	{ V4L2_PIX_FMT_ARGB555, MEDIA_BUS_FMT_RGB555_2X8_PADHI_LE, 16,
+	  ISC_PFE_CFG0_BPS_EIGHT, ISC_BAY_CFG_BGBG, ISC_RLP_CFG_MODE_ARGB555,
+	  ISC_DCFG_IMODE_PACKED16, ISC_DCTRL_DVIEW_PACKED, 0x7b },
+	/* 17 */
  	{ V4L2_PIX_FMT_RGB565, MEDIA_BUS_FMT_RGB565_2X8_LE, 16,
  	  ISC_PFE_CFG0_BPS_EIGHT, ISC_BAY_CFG_BGBG, ISC_RLP_CFG_MODE_RGB565,
  	  ISC_DCFG_IMODE_PACKED16, ISC_DCTRL_DVIEW_PACKED, 0x7b },
+	/* 18 */
+	{ V4L2_PIX_FMT_ARGB32, MEDIA_BUS_FMT_ARGB8888_1X32, 32,
+	  ISC_PFE_CFG0_BPS_EIGHT, ISC_BAY_CFG_BGBG, ISC_RLP_CFG_MODE_ARGB32,
+	  ISC_DCFG_IMODE_PACKED32, ISC_DCTRL_DVIEW_PACKED, 0x7b },
 
Quoted 6 lines

drivers/media/platform/atmel/atmel-isc.c static struct isc_format isc_formats[] = { · line 275

Quoted 6 lines
drivers/media/platform/atmel/atmel-isc.c +1 -1
-	/* 15 */
+	/* 19 */
  	{ V4L2_PIX_FMT_YUYV, MEDIA_BUS_FMT_YUYV8_2X8, 16,
  	  ISC_PFE_CFG0_BPS_EIGHT, ISC_BAY_CFG_BGBG, ISC_RLP_CFG_MODE_DAT8,
  	  ISC_DCFG_IMODE_PACKED8, ISC_DCTRL_DVIEW_PACKED, 0x0 },

Best Regards,
Wenyou Yang