diff mbox series

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

Message ID 20230731210258.256152-2-marex@denx.de (mailing list archive)
State New, archived
Headers show
Series [1/2] dt-bindings: display: simple: Add Innolux G156HCE-L01 panel | expand

Commit Message

Marek Vasut July 31, 2023, 9:02 p.m. UTC
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 <marex@denx.de>
---
Cc: Conor Dooley <conor+dt@kernel.org>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: David Airlie <airlied@gmail.com>
Cc: Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
Cc: Neil Armstrong <neil.armstrong@linaro.org>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: devicetree@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
---
 drivers/gpu/drm/panel/panel-simple.c | 34 ++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

Comments

Neil Armstrong Aug. 3, 2023, 8:24 a.m. UTC | #1
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 <marex@denx.de>
> ---
> Cc: Conor Dooley <conor+dt@kernel.org>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: David Airlie <airlied@gmail.com>
> Cc: Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
> Cc: Neil Armstrong <neil.armstrong@linaro.org>
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: Sam Ravnborg <sam@ravnborg.org>
> Cc: Thierry Reding <thierry.reding@gmail.com>
> Cc: devicetree@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 = { 120000000, 144000000, 150000000 },
> +	.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 <neil.armstrong@linaro.org>
Luca Ceresoli Aug. 3, 2023, 2:23 p.m. UTC | #2
Hi Marek,

On Mon, 31 Jul 2023 23:02:58 +0200
Marek Vasut <marex@denx.de> 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 = { 120000000, 144000000, 150000000 },

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
Marek Vasut Aug. 3, 2023, 2:25 p.m. UTC | #3
On 8/3/23 16:23, Luca Ceresoli wrote:
> Hi Marek,

Hi,

> On Mon, 31 Jul 2023 23:02:58 +0200
> Marek Vasut <marex@denx.de> 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) ?
Luca Ceresoli Aug. 3, 2023, 3:06 p.m. UTC | #4
Hi Marek,

On Thu, 3 Aug 2023 16:25:37 +0200
Marek Vasut <marex@denx.de> wrote:

> On 8/3/23 16:23, Luca Ceresoli wrote:
> > Hi Marek,  
> 
> Hi,
> 
> > On Mon, 31 Jul 2023 23:02:58 +0200
> > Marek Vasut <marex@denx.de> 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
Marek Vasut Aug. 3, 2023, 5:10 p.m. UTC | #5
On 8/3/23 17:06, Luca Ceresoli wrote:
> Hi Marek,
> 
> On Thu, 3 Aug 2023 16:25:37 +0200
> Marek Vasut <marex@denx.de> wrote:
> 
>> On 8/3/23 16:23, Luca Ceresoli wrote:
>>> Hi Marek,
>>
>> Hi,
>>
>>> On Mon, 31 Jul 2023 23:02:58 +0200
>>> Marek Vasut <marex@denx.de> 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.
Luca Ceresoli Aug. 4, 2023, 8:19 a.m. UTC | #6
Hi Marek,

On Thu, 3 Aug 2023 19:10:35 +0200
Marek Vasut <marex@denx.de> wrote:

> On 8/3/23 17:06, Luca Ceresoli wrote:
> > Hi Marek,
> > 
> > On Thu, 3 Aug 2023 16:25:37 +0200
> > Marek Vasut <marex@denx.de> wrote:
> >   
> >> On 8/3/23 16:23, Luca Ceresoli wrote:  
> >>> Hi Marek,  
> >>
> >> Hi,
> >>  
> >>> On Mon, 31 Jul 2023 23:02:58 +0200
> >>> Marek Vasut <marex@denx.de> 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 Aug. 4, 2023, 2:30 p.m. UTC | #7
Hi Marek, Neil,

On Fri, 4 Aug 2023 10:19:12 +0200
Luca Ceresoli <luca.ceresoli@bootlin.com> wrote:

> Hi Marek,
> 
> On Thu, 3 Aug 2023 19:10:35 +0200
> Marek Vasut <marex@denx.de> wrote:
> 
> > On 8/3/23 17:06, Luca Ceresoli wrote:  
> > > Hi Marek,
> > > 
> > > On Thu, 3 Aug 2023 16:25:37 +0200
> > > Marek Vasut <marex@denx.de> wrote:
> > >     
> > >> On 8/3/23 16:23, Luca Ceresoli wrote:    
> > >>> Hi Marek,    
> > >>
> > >> Hi,
> > >>    
> > >>> On Mon, 31 Jul 2023 23:02:58 +0200
> > >>> Marek Vasut <marex@denx.de> 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
diff mbox series

Patch

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 = { 120000000, 144000000, 150000000 },
+	.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,