Re: [PATCH 2/2] drm/panel-simple: Add Innolux G156HCE-L01 panel entry

2023-08-04 Thread Luca Ceresoli
Hi Marek, Neil,

On Fri, 4 Aug 2023 10:19:12 +0200
Luca Ceresoli  wrote:

> Hi Marek,
> 
> On Thu, 3 Aug 2023 19:10:35 +0200
> Marek Vasut  wrote:
> 
> > On 8/3/23 17:06, Luca Ceresoli wrote:  
> > > Hi Marek,
> > > 
> > > On Thu, 3 Aug 2023 16:25:37 +0200
> > > Marek Vasut  wrote:
> > > 
> > >> On 8/3/23 16:23, Luca Ceresoli wrote:
> > >>> Hi Marek,
> > >>
> > >> Hi,
> > >>
> > >>> On Mon, 31 Jul 2023 23:02:58 +0200
> > >>> Marek Vasut  wrote:
> > >>>
> >  Add support for Innolux G156HCE-L01 15.6" 1920x1080 24bpp
> >  dual-link LVDS TFT panel. Documentation is available at [1].
> > >>>
> > >>> Interesting, I'm bringing up this exact panel right now and found your
> > >>> patch.
> > >>>
> >  The middle frequency is tuned slightly upward from 70.93 MHz
> >  to 72 MHz, otherwise the panel shows slight flicker.
> > >>>
> > >>> Using 70.93 MHz here does not show any flickering. I even tried going
> > >>> in the opposite direction and set 70 MHz, and to use different
> > >>> backlight settings, all without any flickering.
> > >>>
> > >>> Do you think you might be using a defective device? Would you have a
> > >>> chance of testing another sample?
> > >>
> > >> I have literally one such display.
> > >>
> > >> Which SoC do you use (and if applicable, which bridge) ?
> > > 
> > > The panel is driven by the DSI-2 output of a i.MX8MP through a TI
> > > SN65DSI84 bridge.
> > 
> > I use the LT9211 , so I wonder whether this might be another Lontium 
> > specific oddity.  
> 
> Or maybe not. After checking the LVDS clock with an oscilloscope I
> discovered I was actually sending 77 MHz. After fixing it I found that
> my panel (of which I only have one sample as well) does not display any
> output with pixel clocks <= 75 MHz. It works with clocks >= 76 MHz.

After checking lots of other details in my video setup and doing
cleanups, I finally managed to have this panel working with the
intended 70.93 MHz clock (and also lower clocks such as 70.00 MHz).

Is it too late to change this patch? Or should I send a patch on top?

Luca

-- 
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


Re: [PATCH 2/2] drm/panel-simple: Add Innolux G156HCE-L01 panel entry

2023-08-04 Thread Luca Ceresoli
Hi Marek,

On Thu, 3 Aug 2023 19:10:35 +0200
Marek Vasut  wrote:

> On 8/3/23 17:06, Luca Ceresoli wrote:
> > Hi Marek,
> > 
> > On Thu, 3 Aug 2023 16:25:37 +0200
> > Marek Vasut  wrote:
> >   
> >> On 8/3/23 16:23, Luca Ceresoli wrote:  
> >>> Hi Marek,  
> >>
> >> Hi,
> >>  
> >>> On Mon, 31 Jul 2023 23:02:58 +0200
> >>> Marek Vasut  wrote:
> >>>  
>  Add support for Innolux G156HCE-L01 15.6" 1920x1080 24bpp
>  dual-link LVDS TFT panel. Documentation is available at [1].  
> >>>
> >>> Interesting, I'm bringing up this exact panel right now and found your
> >>> patch.
> >>>  
>  The middle frequency is tuned slightly upward from 70.93 MHz
>  to 72 MHz, otherwise the panel shows slight flicker.  
> >>>
> >>> Using 70.93 MHz here does not show any flickering. I even tried going
> >>> in the opposite direction and set 70 MHz, and to use different
> >>> backlight settings, all without any flickering.
> >>>
> >>> Do you think you might be using a defective device? Would you have a
> >>> chance of testing another sample?  
> >>
> >> I have literally one such display.
> >>
> >> Which SoC do you use (and if applicable, which bridge) ?  
> > 
> > The panel is driven by the DSI-2 output of a i.MX8MP through a TI
> > SN65DSI84 bridge.  
> 
> I use the LT9211 , so I wonder whether this might be another Lontium 
> specific oddity.

Or maybe not. After checking the LVDS clock with an oscilloscope I
discovered I was actually sending 77 MHz. After fixing it I found that
my panel (of which I only have one sample as well) does not display any
output with pixel clocks <= 75 MHz. It works with clocks >= 76 MHz.

I'm trying to get more info about this.

Luca

-- 
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


Re: [PATCH 2/2] drm/panel-simple: Add Innolux G156HCE-L01 panel entry

2023-08-03 Thread Marek Vasut

On 8/3/23 17:06, Luca Ceresoli wrote:

Hi Marek,

On Thu, 3 Aug 2023 16:25:37 +0200
Marek Vasut  wrote:


On 8/3/23 16:23, Luca Ceresoli wrote:

Hi Marek,


Hi,


On Mon, 31 Jul 2023 23:02:58 +0200
Marek Vasut  wrote:
   

Add support for Innolux G156HCE-L01 15.6" 1920x1080 24bpp
dual-link LVDS TFT panel. Documentation is available at [1].


Interesting, I'm bringing up this exact panel right now and found your
patch.
   

The middle frequency is tuned slightly upward from 70.93 MHz
to 72 MHz, otherwise the panel shows slight flicker.


Using 70.93 MHz here does not show any flickering. I even tried going
in the opposite direction and set 70 MHz, and to use different
backlight settings, all without any flickering.

Do you think you might be using a defective device? Would you have a
chance of testing another sample?


I have literally one such display.

Which SoC do you use (and if applicable, which bridge) ?


The panel is driven by the DSI-2 output of a i.MX8MP through a TI
SN65DSI84 bridge.


I use the LT9211 , so I wonder whether this might be another Lontium 
specific oddity.


Re: [PATCH 2/2] drm/panel-simple: Add Innolux G156HCE-L01 panel entry

2023-08-03 Thread Luca Ceresoli
Hi Marek,

On Thu, 3 Aug 2023 16:25:37 +0200
Marek Vasut  wrote:

> On 8/3/23 16:23, Luca Ceresoli wrote:
> > Hi Marek,  
> 
> Hi,
> 
> > On Mon, 31 Jul 2023 23:02:58 +0200
> > Marek Vasut  wrote:
> >   
> >> Add support for Innolux G156HCE-L01 15.6" 1920x1080 24bpp
> >> dual-link LVDS TFT panel. Documentation is available at [1].  
> > 
> > Interesting, I'm bringing up this exact panel right now and found your
> > patch.
> >   
> >> The middle frequency is tuned slightly upward from 70.93 MHz
> >> to 72 MHz, otherwise the panel shows slight flicker.  
> > 
> > Using 70.93 MHz here does not show any flickering. I even tried going
> > in the opposite direction and set 70 MHz, and to use different
> > backlight settings, all without any flickering.
> > 
> > Do you think you might be using a defective device? Would you have a
> > chance of testing another sample?  
> 
> I have literally one such display.
> 
> Which SoC do you use (and if applicable, which bridge) ?

The panel is driven by the DSI-2 output of a i.MX8MP through a TI
SN65DSI84 bridge.

Luca

-- 
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


Re: [PATCH 2/2] drm/panel-simple: Add Innolux G156HCE-L01 panel entry

2023-08-03 Thread Marek Vasut

On 8/3/23 16:23, Luca Ceresoli wrote:

Hi Marek,


Hi,


On Mon, 31 Jul 2023 23:02:58 +0200
Marek Vasut  wrote:


Add support for Innolux G156HCE-L01 15.6" 1920x1080 24bpp
dual-link LVDS TFT panel. Documentation is available at [1].


Interesting, I'm bringing up this exact panel right now and found your
patch.


The middle frequency is tuned slightly upward from 70.93 MHz
to 72 MHz, otherwise the panel shows slight flicker.


Using 70.93 MHz here does not show any flickering. I even tried going
in the opposite direction and set 70 MHz, and to use different
backlight settings, all without any flickering.

Do you think you might be using a defective device? Would you have a
chance of testing another sample?


I have literally one such display.

Which SoC do you use (and if applicable, which bridge) ?


Re: [PATCH 2/2] drm/panel-simple: Add Innolux G156HCE-L01 panel entry

2023-08-03 Thread Luca Ceresoli
Hi Marek,

On Mon, 31 Jul 2023 23:02:58 +0200
Marek Vasut  wrote:

> Add support for Innolux G156HCE-L01 15.6" 1920x1080 24bpp
> dual-link LVDS TFT panel. Documentation is available at [1].

Interesting, I'm bringing up this exact panel right now and found your
patch.

> The middle frequency is tuned slightly upward from 70.93 MHz
> to 72 MHz, otherwise the panel shows slight flicker.

Using 70.93 MHz here does not show any flickering. I even tried going
in the opposite direction and set 70 MHz, and to use different
backlight settings, all without any flickering.

Do you think you might be using a defective device? Would you have a
chance of testing another sample?

> diff --git a/drivers/gpu/drm/panel/panel-simple.c 
> b/drivers/gpu/drm/panel/panel-simple.c
> index 396a22177c674..417dd69054fc1 100644
> --- a/drivers/gpu/drm/panel/panel-simple.c
> +++ b/drivers/gpu/drm/panel/panel-simple.c
> @@ -2377,6 +2377,37 @@ static const struct panel_desc innolux_g121x1_l03 = {
>   },
>  };
>  
> +static const struct display_timing innolux_g156hce_l01_timings = {
> + .pixelclock = { 12000, 14400, 15000 },

In case the 144 MHz clock is kept, I'd add a comment here to clarify
the reason for diverging from the datasheet without the need for git
log.

Luca

-- 
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


Re: [PATCH 2/2] drm/panel-simple: Add Innolux G156HCE-L01 panel entry

2023-08-03 Thread Neil Armstrong

On 31/07/2023 23:02, Marek Vasut wrote:

Add support for Innolux G156HCE-L01 15.6" 1920x1080 24bpp
dual-link LVDS TFT panel. Documentation is available at [1].
The middle frequency is tuned slightly upward from 70.93 MHz
to 72 MHz, otherwise the panel shows slight flicker.

[1] 
https://www.distec.de/fileadmin/pdf/produkte/TFT-Displays/Innolux/G156HCE-L01_Rev.C3_Datasheet.pdf

Signed-off-by: Marek Vasut 
---
Cc: Conor Dooley 
Cc: Daniel Vetter 
Cc: David Airlie 
Cc: Krzysztof Kozlowski 
Cc: Neil Armstrong 
Cc: Rob Herring 
Cc: Sam Ravnborg 
Cc: Thierry Reding 
Cc: devicet...@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
---
  drivers/gpu/drm/panel/panel-simple.c | 34 
  1 file changed, 34 insertions(+)

diff --git a/drivers/gpu/drm/panel/panel-simple.c 
b/drivers/gpu/drm/panel/panel-simple.c
index 396a22177c674..417dd69054fc1 100644
--- a/drivers/gpu/drm/panel/panel-simple.c
+++ b/drivers/gpu/drm/panel/panel-simple.c
@@ -2377,6 +2377,37 @@ static const struct panel_desc innolux_g121x1_l03 = {
},
  };
  
+static const struct display_timing innolux_g156hce_l01_timings = {

+   .pixelclock = { 12000, 14400, 15000 },
+   .hactive = { 1920, 1920, 1920 },
+   .hfront_porch = { 80, 90, 100 },
+   .hback_porch = { 80, 90, 100 },
+   .hsync_len = { 20, 30, 30 },
+   .vactive = { 1080, 1080, 1080 },
+   .vfront_porch = { 3, 10, 20 },
+   .vback_porch = { 3, 10, 20 },
+   .vsync_len = { 4, 10, 10 },
+};
+
+static const struct panel_desc innolux_g156hce_l01 = {
+   .timings = &innolux_g156hce_l01_timings,
+   .num_timings = 1,
+   .bpc = 8,
+   .size = {
+   .width = 344,
+   .height = 194,
+   },
+   .delay = {
+   .prepare = 1,   /* T1+T2 */
+   .enable = 450,  /* T5 */
+   .disable = 200, /* T6 */
+   .unprepare = 10,/* T3+T7 */
+   },
+   .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
+   .bus_flags = DRM_BUS_FLAG_DE_HIGH,
+   .connector_type = DRM_MODE_CONNECTOR_LVDS,
+};
+
  static const struct drm_display_mode innolux_n156bge_l21_mode = {
.clock = 69300,
.hdisplay = 1366,
@@ -4243,6 +4274,9 @@ static const struct of_device_id platform_of_match[] = {
}, {
.compatible = "innolux,g121x1-l03",
.data = &innolux_g121x1_l03,
+   }, {
+   .compatible = "innolux,g156hce-l01",
+   .data = &innolux_g156hce_l01,
}, {
.compatible = "innolux,n156bge-l21",
.data = &innolux_n156bge_l21,


Reviewed-by: Neil Armstrong 


[PATCH 2/2] drm/panel-simple: Add Innolux G156HCE-L01 panel entry

2023-07-31 Thread Marek Vasut
Add support for Innolux G156HCE-L01 15.6" 1920x1080 24bpp
dual-link LVDS TFT panel. Documentation is available at [1].
The middle frequency is tuned slightly upward from 70.93 MHz
to 72 MHz, otherwise the panel shows slight flicker.

[1] 
https://www.distec.de/fileadmin/pdf/produkte/TFT-Displays/Innolux/G156HCE-L01_Rev.C3_Datasheet.pdf

Signed-off-by: Marek Vasut 
---
Cc: Conor Dooley 
Cc: Daniel Vetter 
Cc: David Airlie 
Cc: Krzysztof Kozlowski 
Cc: Neil Armstrong 
Cc: Rob Herring 
Cc: Sam Ravnborg 
Cc: Thierry Reding 
Cc: devicet...@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
---
 drivers/gpu/drm/panel/panel-simple.c | 34 
 1 file changed, 34 insertions(+)

diff --git a/drivers/gpu/drm/panel/panel-simple.c 
b/drivers/gpu/drm/panel/panel-simple.c
index 396a22177c674..417dd69054fc1 100644
--- a/drivers/gpu/drm/panel/panel-simple.c
+++ b/drivers/gpu/drm/panel/panel-simple.c
@@ -2377,6 +2377,37 @@ static const struct panel_desc innolux_g121x1_l03 = {
},
 };
 
+static const struct display_timing innolux_g156hce_l01_timings = {
+   .pixelclock = { 12000, 14400, 15000 },
+   .hactive = { 1920, 1920, 1920 },
+   .hfront_porch = { 80, 90, 100 },
+   .hback_porch = { 80, 90, 100 },
+   .hsync_len = { 20, 30, 30 },
+   .vactive = { 1080, 1080, 1080 },
+   .vfront_porch = { 3, 10, 20 },
+   .vback_porch = { 3, 10, 20 },
+   .vsync_len = { 4, 10, 10 },
+};
+
+static const struct panel_desc innolux_g156hce_l01 = {
+   .timings = &innolux_g156hce_l01_timings,
+   .num_timings = 1,
+   .bpc = 8,
+   .size = {
+   .width = 344,
+   .height = 194,
+   },
+   .delay = {
+   .prepare = 1,   /* T1+T2 */
+   .enable = 450,  /* T5 */
+   .disable = 200, /* T6 */
+   .unprepare = 10,/* T3+T7 */
+   },
+   .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
+   .bus_flags = DRM_BUS_FLAG_DE_HIGH,
+   .connector_type = DRM_MODE_CONNECTOR_LVDS,
+};
+
 static const struct drm_display_mode innolux_n156bge_l21_mode = {
.clock = 69300,
.hdisplay = 1366,
@@ -4243,6 +4274,9 @@ static const struct of_device_id platform_of_match[] = {
}, {
.compatible = "innolux,g121x1-l03",
.data = &innolux_g121x1_l03,
+   }, {
+   .compatible = "innolux,g156hce-l01",
+   .data = &innolux_g156hce_l01,
}, {
.compatible = "innolux,n156bge-l21",
.data = &innolux_n156bge_l21,
-- 
2.40.1