mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] media: i2c: imx334: add support for additional test patterns
@ 2025-06-24  6:54 shravan kumar
  2025-06-24  9:57 ` Kieran Bingham
  0 siblings, 1 reply; 4+ messages in thread
From: shravan kumar @ 2025-06-24  6:54 UTC (permalink / raw)
  To: sakari.ailus, mchehab
  Cc: kieran.bingham, linux-media, linux-kernel, conor.dooley,
	valentina.fernandezalanis, praveen.kumar, shravan.chippa

From: Shravan Chippa <shravan.chippa@microchip.com>

Added support for three additional test patterns in the
IMX334 driver: Black and Grey Bars, Black Color, and White Color.

Signed-off-by: Shravan Chippa <shravan.chippa@microchip.com>
---
 drivers/media/i2c/imx334.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/media/i2c/imx334.c b/drivers/media/i2c/imx334.c
index 846b9928d4e8..43dd7edb48c8 100644
--- a/drivers/media/i2c/imx334.c
+++ b/drivers/media/i2c/imx334.c
@@ -118,6 +118,9 @@
 #define IMX334_REG_TP			CCI_REG8(0x329e)
 #define IMX334_TP_COLOR_HBARS		0xa
 #define IMX334_TP_COLOR_VBARS		0xb
+#define IMX334_TP_BLACK			0x0
+#define IMX334_TP_WHITE			0x1
+#define IMX334_TP_BLACK_GREY		0xC
 
 #define IMX334_TPG_EN_DOUT		CCI_REG8(0x329c)
 #define IMX334_TP_ENABLE		0x1
@@ -398,12 +401,18 @@ static const char * const imx334_test_pattern_menu[] = {
 	"Disabled",
 	"Vertical Color Bars",
 	"Horizontal Color Bars",
+	"Black and Grey Bars",
+	"Black Color",
+	"White Color",
 };
 
 static const int imx334_test_pattern_val[] = {
 	IMX334_TP_DISABLE,
 	IMX334_TP_COLOR_HBARS,
 	IMX334_TP_COLOR_VBARS,
+	IMX334_TP_BLACK_GREY,
+	IMX334_TP_BLACK,
+	IMX334_TP_WHITE,
 };
 
 static const struct cci_reg_sequence raw10_framefmt_regs[] = {
-- 
2.34.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] media: i2c: imx334: add support for additional test patterns
  2025-06-24  6:54 [PATCH] media: i2c: imx334: add support for additional test patterns shravan kumar
@ 2025-06-24  9:57 ` Kieran Bingham
  2025-06-26  7:09   ` Shravan.Chippa
  0 siblings, 1 reply; 4+ messages in thread
From: Kieran Bingham @ 2025-06-24  9:57 UTC (permalink / raw)
  To: mchehab, sakari.ailus, shravan kumar
  Cc: linux-media, linux-kernel, conor.dooley,
	valentina.fernandezalanis, praveen.kumar, shravan.chippa

Hi Shravan

Quoting shravan kumar (2025-06-24 07:54:38)
> From: Shravan Chippa <shravan.chippa@microchip.com>
> 
> Added support for three additional test patterns in the
> IMX334 driver: Black and Grey Bars, Black Color, and White Color.
> 
> Signed-off-by: Shravan Chippa <shravan.chippa@microchip.com>
> ---
>  drivers/media/i2c/imx334.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/drivers/media/i2c/imx334.c b/drivers/media/i2c/imx334.c
> index 846b9928d4e8..43dd7edb48c8 100644
> --- a/drivers/media/i2c/imx334.c
> +++ b/drivers/media/i2c/imx334.c
> @@ -118,6 +118,9 @@
>  #define IMX334_REG_TP                  CCI_REG8(0x329e)
>  #define IMX334_TP_COLOR_HBARS          0xa
>  #define IMX334_TP_COLOR_VBARS          0xb
> +#define IMX334_TP_BLACK                        0x0
> +#define IMX334_TP_WHITE                        0x1
> +#define IMX334_TP_BLACK_GREY           0xC

This should be lower case to match the other hex constants (0xc)

I also wonder if this list should be in register address order ... but
then it won't match the menu items ...

>  
>  #define IMX334_TPG_EN_DOUT             CCI_REG8(0x329c)
>  #define IMX334_TP_ENABLE               0x1
> @@ -398,12 +401,18 @@ static const char * const imx334_test_pattern_menu[] = {
>         "Disabled",
>         "Vertical Color Bars",
>         "Horizontal Color Bars",
> +       "Black and Grey Bars",
> +       "Black Color",
> +       "White Color",
>  };
>  
>  static const int imx334_test_pattern_val[] = {
>         IMX334_TP_DISABLE,
>         IMX334_TP_COLOR_HBARS,
>         IMX334_TP_COLOR_VBARS,
> +       IMX334_TP_BLACK_GREY,
> +       IMX334_TP_BLACK,
> +       IMX334_TP_WHITE,
>  };
>  
>  static const struct cci_reg_sequence raw10_framefmt_regs[] = {
> -- 
> 2.34.1
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [PATCH] media: i2c: imx334: add support for additional test patterns
  2025-06-24  9:57 ` Kieran Bingham
@ 2025-06-26  7:09   ` Shravan.Chippa
  2025-06-29 10:20     ` Sakari Ailus
  0 siblings, 1 reply; 4+ messages in thread
From: Shravan.Chippa @ 2025-06-26  7:09 UTC (permalink / raw)
  To: kieran.bingham, mchehab, sakari.ailus
  Cc: linux-media, linux-kernel, Conor.Dooley,
	Valentina.FernandezAlanis, Praveen.Kumar

Hi Kieran,


> -----Original Message-----
> From: Kieran Bingham <kieran.bingham@ideasonboard.com>
> Sent: Tuesday, June 24, 2025 3:28 PM
> To: mchehab@kernel.org; sakari.ailus@linux.intel.com; shravan Chippa -
> I35088 <Shravan.Chippa@microchip.com>
> Cc: linux-media@vger.kernel.org; linux-kernel@vger.kernel.org; Conor Dooley -
> M52691 <Conor.Dooley@microchip.com>; Valentina Fernandez Alanis -
> M63239 <Valentina.FernandezAlanis@microchip.com>; Praveen Kumar -
> I30718 <Praveen.Kumar@microchip.com>; shravan Chippa - I35088
> <Shravan.Chippa@microchip.com>
> Subject: Re: [PATCH] media: i2c: imx334: add support for additional test
> patterns
> 
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the
> content is safe
> 
> Hi Shravan
> 
> Quoting shravan kumar (2025-06-24 07:54:38)
> > From: Shravan Chippa <shravan.chippa@microchip.com>
> >
> > Added support for three additional test patterns in the
> > IMX334 driver: Black and Grey Bars, Black Color, and White Color.
> >
> > Signed-off-by: Shravan Chippa <shravan.chippa@microchip.com>
> > ---
> >  drivers/media/i2c/imx334.c | 9 +++++++++
> >  1 file changed, 9 insertions(+)
> >
> > diff --git a/drivers/media/i2c/imx334.c b/drivers/media/i2c/imx334.c
> > index 846b9928d4e8..43dd7edb48c8 100644
> > --- a/drivers/media/i2c/imx334.c
> > +++ b/drivers/media/i2c/imx334.c
> > @@ -118,6 +118,9 @@
> >  #define IMX334_REG_TP                  CCI_REG8(0x329e)
> >  #define IMX334_TP_COLOR_HBARS          0xa
> >  #define IMX334_TP_COLOR_VBARS          0xb
> > +#define IMX334_TP_BLACK                        0x0
> > +#define IMX334_TP_WHITE                        0x1
> > +#define IMX334_TP_BLACK_GREY           0xC
> 
> This should be lower case to match the other hex constants (0xc)
> 
> I also wonder if this list should be in register address order ... but then it won't
> match the menu items ...

This is just value to write in the register

Thanks,
Shravan

> 
> >
> >  #define IMX334_TPG_EN_DOUT             CCI_REG8(0x329c)
> >  #define IMX334_TP_ENABLE               0x1
> > @@ -398,12 +401,18 @@ static const char * const
> imx334_test_pattern_menu[] = {
> >         "Disabled",
> >         "Vertical Color Bars",
> >         "Horizontal Color Bars",
> > +       "Black and Grey Bars",
> > +       "Black Color",
> > +       "White Color",
> >  };
> >
> >  static const int imx334_test_pattern_val[] = {
> >         IMX334_TP_DISABLE,
> >         IMX334_TP_COLOR_HBARS,
> >         IMX334_TP_COLOR_VBARS,
> > +       IMX334_TP_BLACK_GREY,
> > +       IMX334_TP_BLACK,
> > +       IMX334_TP_WHITE,
> >  };
> >
> >  static const struct cci_reg_sequence raw10_framefmt_regs[] = {
> > --
> > 2.34.1
> >

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] media: i2c: imx334: add support for additional test patterns
  2025-06-26  7:09   ` Shravan.Chippa
@ 2025-06-29 10:20     ` Sakari Ailus
  0 siblings, 0 replies; 4+ messages in thread
From: Sakari Ailus @ 2025-06-29 10:20 UTC (permalink / raw)
  To: Shravan.Chippa, kieran.bingham, mchehab
  Cc: linux-media, linux-kernel, Conor.Dooley,
	Valentina.FernandezAlanis, Praveen.Kumar

On 6/26/25 10:09, Shravan.Chippa@microchip.com wrote:
> Hi Kieran,
> 
> 
>> -----Original Message-----
>> From: Kieran Bingham <kieran.bingham@ideasonboard.com>
>> Sent: Tuesday, June 24, 2025 3:28 PM
>> To: mchehab@kernel.org; sakari.ailus@linux.intel.com; shravan Chippa -
>> I35088 <Shravan.Chippa@microchip.com>
>> Cc: linux-media@vger.kernel.org; linux-kernel@vger.kernel.org; Conor Dooley -
>> M52691 <Conor.Dooley@microchip.com>; Valentina Fernandez Alanis -
>> M63239 <Valentina.FernandezAlanis@microchip.com>; Praveen Kumar -
>> I30718 <Praveen.Kumar@microchip.com>; shravan Chippa - I35088
>> <Shravan.Chippa@microchip.com>
>> Subject: Re: [PATCH] media: i2c: imx334: add support for additional test
>> patterns
>>
>> EXTERNAL EMAIL: Do not click links or open attachments unless you know the
>> content is safe
>>
>> Hi Shravan
>>
>> Quoting shravan kumar (2025-06-24 07:54:38)
>>> From: Shravan Chippa <shravan.chippa@microchip.com>
>>>
>>> Added support for three additional test patterns in the
>>> IMX334 driver: Black and Grey Bars, Black Color, and White Color.
>>>
>>> Signed-off-by: Shravan Chippa <shravan.chippa@microchip.com>
>>> ---
>>>   drivers/media/i2c/imx334.c | 9 +++++++++
>>>   1 file changed, 9 insertions(+)
>>>
>>> diff --git a/drivers/media/i2c/imx334.c b/drivers/media/i2c/imx334.c
>>> index 846b9928d4e8..43dd7edb48c8 100644
>>> --- a/drivers/media/i2c/imx334.c
>>> +++ b/drivers/media/i2c/imx334.c
>>> @@ -118,6 +118,9 @@
>>>   #define IMX334_REG_TP                  CCI_REG8(0x329e)
>>>   #define IMX334_TP_COLOR_HBARS          0xa
>>>   #define IMX334_TP_COLOR_VBARS          0xb
>>> +#define IMX334_TP_BLACK                        0x0
>>> +#define IMX334_TP_WHITE                        0x1
>>> +#define IMX334_TP_BLACK_GREY           0xC
>>
>> This should be lower case to match the other hex constants (0xc)
>>
>> I also wonder if this list should be in register address order ... but then it won't
>> match the menu items ...
> 
> This is just value to write in the register

The menu items that are off the register value are already there so I'd 
just keep them as-is. I'll apply this with the constant fixed.

-- 
Regards,

Sakari Ailus

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-06-30  7:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-06-24  6:54 [PATCH] media: i2c: imx334: add support for additional test patterns shravan kumar
2025-06-24  9:57 ` Kieran Bingham
2025-06-26  7:09   ` Shravan.Chippa
2025-06-29 10:20     ` Sakari Ailus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®