linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: dts: imx6qdl-nitrogen6_max: Disable LVDS channels
@ 2019-04-08 17:53 Robert Foss
  2019-04-08 20:37 ` Fabio Estevam
  0 siblings, 1 reply; 7+ messages in thread
From: Robert Foss @ 2019-04-08 17:53 UTC (permalink / raw)
  To: shawnguo, s.hauer, kernel, fabio.estevam, linux-imx, robh+dt,
	mark.rutland, linux-arm-kernel, devicetree, linux-kernel
  Cc: Robert Foss

If a LVDS device is not connected, having the LVDS channels
enabled will prevent imx-ldb from probing correctly even
if other CRTCs are connected.

Signed-off-by: Robert Foss <robert.foss@collabora.com>
---
 arch/arm/boot/dts/imx6qdl-nitrogen6_max.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/imx6qdl-nitrogen6_max.dtsi b/arch/arm/boot/dts/imx6qdl-nitrogen6_max.dtsi
index 39200e5dc896..5b413cf4c250 100644
--- a/arch/arm/boot/dts/imx6qdl-nitrogen6_max.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-nitrogen6_max.dtsi
@@ -703,7 +703,7 @@
 	status = "okay";
 
 	lvds-channel@0 {
-		status = "okay";
+		status = "disabled";
 
 		port@4 {
 			reg = <4>;
@@ -715,7 +715,7 @@
 	};
 
 	lvds-channel@1 {
-		status = "okay";
+		status = "disabled";
 
 		port@4 {
 			reg = <4>;
-- 
2.19.1


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

* Re: [PATCH] ARM: dts: imx6qdl-nitrogen6_max: Disable LVDS channels
  2019-04-08 17:53 [PATCH] ARM: dts: imx6qdl-nitrogen6_max: Disable LVDS channels Robert Foss
@ 2019-04-08 20:37 ` Fabio Estevam
  2019-04-09  0:07   ` Robert Foss
  0 siblings, 1 reply; 7+ messages in thread
From: Fabio Estevam @ 2019-04-08 20:37 UTC (permalink / raw)
  To: Robert Foss, Gary Bisson
  Cc: Shawn Guo, Sascha Hauer, Sascha Hauer, Fabio Estevam,
	NXP Linux Team, Rob Herring, Mark Rutland,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	linux-kernel

Hi Robert,

[Adding Gary]

On Mon, Apr 8, 2019 at 2:54 PM Robert Foss <robert.foss@collabora.com> wrote:
>
> If a LVDS device is not connected, having the LVDS channels
> enabled will prevent imx-ldb from probing correctly even
> if other CRTCs are connected.
>
> Signed-off-by: Robert Foss <robert.foss@collabora.com>
> ---
>  arch/arm/boot/dts/imx6qdl-nitrogen6_max.dtsi | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/boot/dts/imx6qdl-nitrogen6_max.dtsi b/arch/arm/boot/dts/imx6qdl-nitrogen6_max.dtsi
> index 39200e5dc896..5b413cf4c250 100644
> --- a/arch/arm/boot/dts/imx6qdl-nitrogen6_max.dtsi
> +++ b/arch/arm/boot/dts/imx6qdl-nitrogen6_max.dtsi
> @@ -703,7 +703,7 @@
>         status = "okay";
>
>         lvds-channel@0 {
> -               status = "okay";
> +               status = "disabled";
>
>                 port@4 {
>                         reg = <4>;
> @@ -715,7 +715,7 @@
>         };
>
>         lvds-channel@1 {
> -               status = "okay";
> +               status = "disabled";

I am not sure I understood what you are trying to fix.

Could you please share some logs when imx-ldb fails to probe correctly?

Is this a regression?

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

* Re: [PATCH] ARM: dts: imx6qdl-nitrogen6_max: Disable LVDS channels
  2019-04-08 20:37 ` Fabio Estevam
@ 2019-04-09  0:07   ` Robert Foss
  2019-04-10  7:35     ` Gary Bisson
  0 siblings, 1 reply; 7+ messages in thread
From: Robert Foss @ 2019-04-09  0:07 UTC (permalink / raw)
  To: Fabio Estevam, Gary Bisson
  Cc: Shawn Guo, Sascha Hauer, Sascha Hauer, Fabio Estevam,
	NXP Linux Team, Rob Herring, Mark Rutland,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	linux-kernel

Hey Fabio,

On 4/8/19 10:37 PM, Fabio Estevam wrote:
> Hi Robert,
> 
> [Adding Gary]
> 
> On Mon, Apr 8, 2019 at 2:54 PM Robert Foss <robert.foss@collabora.com> wrote:
>>
>> If a LVDS device is not connected, having the LVDS channels
>> enabled will prevent imx-ldb from probing correctly even
>> if other CRTCs are connected.
>>
>> Signed-off-by: Robert Foss <robert.foss@collabora.com>
>> ---
>>   arch/arm/boot/dts/imx6qdl-nitrogen6_max.dtsi | 4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/arch/arm/boot/dts/imx6qdl-nitrogen6_max.dtsi b/arch/arm/boot/dts/imx6qdl-nitrogen6_max.dtsi
>> index 39200e5dc896..5b413cf4c250 100644
>> --- a/arch/arm/boot/dts/imx6qdl-nitrogen6_max.dtsi
>> +++ b/arch/arm/boot/dts/imx6qdl-nitrogen6_max.dtsi
>> @@ -703,7 +703,7 @@
>>          status = "okay";
>>
>>          lvds-channel@0 {
>> -               status = "okay";
>> +               status = "disabled";
>>
>>                  port@4 {
>>                          reg = <4>;
>> @@ -715,7 +715,7 @@
>>          };
>>
>>          lvds-channel@1 {
>> -               status = "okay";
>> +               status = "disabled";
> 
> I am not sure I understood what you are trying to fix.

If CONFIG_DRM_IMX_LDB is enabled, LVDS DT channels are enabled
and no LVDS-panels are connected the imx-ldb driver will
fail to bind.

This is a problem, since it will prevent other actually connected
display output from being used, even if they bind properly.

> 
> Could you please share some logs when imx-ldb fails to probe correctly?


[    2.119563] component_bind_all() trying to bind: ldb
[    2.124600] imx-drm display-subsystem: binding ldb (ops imx_ldb_ops)
[    2.146169] drm_of_find_panel_or_bridge() np->name=lvds-channel  np->type=<NULL>
[    2.153709] drm_of_find_panel_or_bridge() no panel found for remote
[    2.160081] drm_of_find_panel_or_bridge() bridge needed
[    2.162043] drm_of_find_panel_or_bridge() bridge not found
[    2.165331] drm_of_find_panel_or_bridge() failed
[    2.170023] imx-drm display-subsystem: failed to bind ldb (ops imx_ldb_ops): -517

This at the same time as HDMI binds properly:

[    4.458954] dwhdmi-imx 120000.hdmi: Detected HDMI TX controller v1.30a with 
HDCP (DWC HDMI 3D TX PHY)
[    4.469633] imx-drm display-subsystem: bound 120000.hdmi (ops dw_hdmi_imx_ops)

Which in the end causes the IMX driver to not initialize properly
and ignore the HDMI connection that bound properly.
This in turn prevents us from having any graphical output while there
is no LVDS panel connected.


> 
> Is this a regression?
> 

Not as far as I know.

How a Nitrogen6-Max board without a LVDS panel, but using the
imx_v6_v7_defconfig ever started and had displayed graphical
output on other connected displays I don't know though.


Rob.

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

* Re: [PATCH] ARM: dts: imx6qdl-nitrogen6_max: Disable LVDS channels
  2019-04-09  0:07   ` Robert Foss
@ 2019-04-10  7:35     ` Gary Bisson
  2019-04-10 10:57       ` Robert Foss
  0 siblings, 1 reply; 7+ messages in thread
From: Gary Bisson @ 2019-04-10  7:35 UTC (permalink / raw)
  To: Robert Foss
  Cc: Fabio Estevam, Shawn Guo, Sascha Hauer, Sascha Hauer,
	Fabio Estevam, NXP Linux Team, Rob Herring, Mark Rutland,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	linux-kernel, Troy Kisky

Hi,

On Tue, Apr 9, 2019 at 2:07 AM Robert Foss <robert.foss@collabora.com> wrote:
>
> Hey Fabio,
>
> On 4/8/19 10:37 PM, Fabio Estevam wrote:
> > Hi Robert,
> >
> > [Adding Gary]

Adding Troy, I'm no longer a full-time employee at Boundary Devices.

> > On Mon, Apr 8, 2019 at 2:54 PM Robert Foss <robert.foss@collabora.com> wrote:
> >>
> >> If a LVDS device is not connected, having the LVDS channels
> >> enabled will prevent imx-ldb from probing correctly even
> >> if other CRTCs are connected.
> >>
> >> Signed-off-by: Robert Foss <robert.foss@collabora.com>
> >> ---
> >>   arch/arm/boot/dts/imx6qdl-nitrogen6_max.dtsi | 4 ++--
> >>   1 file changed, 2 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/arch/arm/boot/dts/imx6qdl-nitrogen6_max.dtsi b/arch/arm/boot/dts/imx6qdl-nitrogen6_max.dtsi
> >> index 39200e5dc896..5b413cf4c250 100644
> >> --- a/arch/arm/boot/dts/imx6qdl-nitrogen6_max.dtsi
> >> +++ b/arch/arm/boot/dts/imx6qdl-nitrogen6_max.dtsi
> >> @@ -703,7 +703,7 @@
> >>          status = "okay";
> >>
> >>          lvds-channel@0 {
> >> -               status = "okay";
> >> +               status = "disabled";
> >>
> >>                  port@4 {
> >>                          reg = <4>;
> >> @@ -715,7 +715,7 @@
> >>          };
> >>
> >>          lvds-channel@1 {
> >> -               status = "okay";
> >> +               status = "disabled";
> >
> > I am not sure I understood what you are trying to fix.
>
> If CONFIG_DRM_IMX_LDB is enabled, LVDS DT channels are enabled
> and no LVDS-panels are connected the imx-ldb driver will
> fail to bind.
>
> This is a problem, since it will prevent other actually connected
> display output from being used, even if they bind properly.
>
> >
> > Could you please share some logs when imx-ldb fails to probe correctly?
>
>
> [    2.119563] component_bind_all() trying to bind: ldb
> [    2.124600] imx-drm display-subsystem: binding ldb (ops imx_ldb_ops)
> [    2.146169] drm_of_find_panel_or_bridge() np->name=lvds-channel  np->type=<NULL>
> [    2.153709] drm_of_find_panel_or_bridge() no panel found for remote
> [    2.160081] drm_of_find_panel_or_bridge() bridge needed
> [    2.162043] drm_of_find_panel_or_bridge() bridge not found
> [    2.165331] drm_of_find_panel_or_bridge() failed
> [    2.170023] imx-drm display-subsystem: failed to bind ldb (ops imx_ldb_ops): -517
>
> This at the same time as HDMI binds properly:
>
> [    4.458954] dwhdmi-imx 120000.hdmi: Detected HDMI TX controller v1.30a with
> HDCP (DWC HDMI 3D TX PHY)
> [    4.469633] imx-drm display-subsystem: bound 120000.hdmi (ops dw_hdmi_imx_ops)
>
> Which in the end causes the IMX driver to not initialize properly
> and ignore the HDMI connection that bound properly.
> This in turn prevents us from having any graphical output while there
> is no LVDS panel connected.

Does this happen if the LVDS is disabled in cmdline? (adding "video=LVDS-1:d")

Note that a bootscript was written for mainline kernel that takes care
of display configuration [1].

Currently this bootscript disables all the displays that aren't used.
It was tested with HDMI, where LVDS and LCD display are disabled, and
it *used to* work.

If this doesn't work then there's most likely a regression somewhere.

Regards,
Gary

[1] https://github.com/boundarydevices/u-boot-imx6/blob/boundary-v2018.07/board/boundary/bootscripts/bootscript-mainline.txt#L90

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

* Re: [PATCH] ARM: dts: imx6qdl-nitrogen6_max: Disable LVDS channels
  2019-04-10  7:35     ` Gary Bisson
@ 2019-04-10 10:57       ` Robert Foss
  2019-04-10 11:55         ` Fabio Estevam
  0 siblings, 1 reply; 7+ messages in thread
From: Robert Foss @ 2019-04-10 10:57 UTC (permalink / raw)
  To: Gary Bisson
  Cc: Mark Rutland,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Fabio Estevam, Sascha Hauer, linux-kernel, Troy Kisky,
	Rob Herring, NXP Linux Team, Sascha Hauer, Fabio Estevam,
	Shawn Guo,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE

Hey Gary,

On 4/10/19 9:35 AM, Gary Bisson wrote:
> Hi,
> 
> On Tue, Apr 9, 2019 at 2:07 AM Robert Foss <robert.foss@collabora.com> wrote:
>>
>> Hey Fabio,
>>
>> On 4/8/19 10:37 PM, Fabio Estevam wrote:
>>> Hi Robert,
>>>
>>> [Adding Gary]
> 
> Adding Troy, I'm no longer a full-time employee at Boundary Devices.
> 
>>> On Mon, Apr 8, 2019 at 2:54 PM Robert Foss <robert.foss@collabora.com> wrote:
>>>>
>>>> If a LVDS device is not connected, having the LVDS channels
>>>> enabled will prevent imx-ldb from probing correctly even
>>>> if other CRTCs are connected.
>>>>
>>>> Signed-off-by: Robert Foss <robert.foss@collabora.com>
>>>> ---
>>>>    arch/arm/boot/dts/imx6qdl-nitrogen6_max.dtsi | 4 ++--
>>>>    1 file changed, 2 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/arch/arm/boot/dts/imx6qdl-nitrogen6_max.dtsi b/arch/arm/boot/dts/imx6qdl-nitrogen6_max.dtsi
>>>> index 39200e5dc896..5b413cf4c250 100644
>>>> --- a/arch/arm/boot/dts/imx6qdl-nitrogen6_max.dtsi
>>>> +++ b/arch/arm/boot/dts/imx6qdl-nitrogen6_max.dtsi
>>>> @@ -703,7 +703,7 @@
>>>>           status = "okay";
>>>>
>>>>           lvds-channel@0 {
>>>> -               status = "okay";
>>>> +               status = "disabled";
>>>>
>>>>                   port@4 {
>>>>                           reg = <4>;
>>>> @@ -715,7 +715,7 @@
>>>>           };
>>>>
>>>>           lvds-channel@1 {
>>>> -               status = "okay";
>>>> +               status = "disabled";
>>>
>>> I am not sure I understood what you are trying to fix.
>>
>> If CONFIG_DRM_IMX_LDB is enabled, LVDS DT channels are enabled
>> and no LVDS-panels are connected the imx-ldb driver will
>> fail to bind.
>>
>> This is a problem, since it will prevent other actually connected
>> display output from being used, even if they bind properly.
>>
>>>
>>> Could you please share some logs when imx-ldb fails to probe correctly?
>>
>>
>> [    2.119563] component_bind_all() trying to bind: ldb
>> [    2.124600] imx-drm display-subsystem: binding ldb (ops imx_ldb_ops)
>> [    2.146169] drm_of_find_panel_or_bridge() np->name=lvds-channel  np->type=<NULL>
>> [    2.153709] drm_of_find_panel_or_bridge() no panel found for remote
>> [    2.160081] drm_of_find_panel_or_bridge() bridge needed
>> [    2.162043] drm_of_find_panel_or_bridge() bridge not found
>> [    2.165331] drm_of_find_panel_or_bridge() failed
>> [    2.170023] imx-drm display-subsystem: failed to bind ldb (ops imx_ldb_ops): -517
>>
>> This at the same time as HDMI binds properly:
>>
>> [    4.458954] dwhdmi-imx 120000.hdmi: Detected HDMI TX controller v1.30a with
>> HDCP (DWC HDMI 3D TX PHY)
>> [    4.469633] imx-drm display-subsystem: bound 120000.hdmi (ops dw_hdmi_imx_ops)
>>
>> Which in the end causes the IMX driver to not initialize properly
>> and ignore the HDMI connection that bound properly.
>> This in turn prevents us from having any graphical output while there
>> is no LVDS panel connected.
> 
> Does this happen if the LVDS is disabled in cmdline? (adding "video=LVDS-1:d")

I hadn't tried this before, but is seems yo yield the same results

# cat /proc/cmdline
video=LVDS-1:d enforcing=0 ip=dhcp rw rootwait root=/dev/mmcblk1p1 
log_buf_len=16M cma=512M vmalloc=512M

# dmesg
imx-drm display-subsystem: failed to bind disp0 (ops imx_pd_ops): -517
imx-drm display-subsystem: master bind failed: -517

This dmesg log is failing to bind disp0 at another point than what I
was seeing before, yet the result is the same. The connected HDMI
output is not brought online correctly.

> 
> Note that a bootscript was written for mainline kernel that takes care
> of display configuration [1].
> 
> Currently this bootscript disables all the displays that aren't used.
> It was tested with HDMI, where LVDS and LCD display are disabled, and
> it *used to* work.
> 
> If this doesn't work then there's most likely a regression somewhere.
> 
> Regards,
> Gary
> 
> [1] https://github.com/boundarydevices/u-boot-imx6/blob/boundary-v2018.07/board/boundary/bootscripts/bootscript-mainline.txt#L90
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> 

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

* Re: [PATCH] ARM: dts: imx6qdl-nitrogen6_max: Disable LVDS channels
  2019-04-10 10:57       ` Robert Foss
@ 2019-04-10 11:55         ` Fabio Estevam
  2019-04-10 12:00           ` Fabio Estevam
  0 siblings, 1 reply; 7+ messages in thread
From: Fabio Estevam @ 2019-04-10 11:55 UTC (permalink / raw)
  To: Robert Foss
  Cc: Gary Bisson, Mark Rutland,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Fabio Estevam, Sascha Hauer, linux-kernel, Troy Kisky,
	Rob Herring, NXP Linux Team, Sascha Hauer, Fabio Estevam,
	Shawn Guo,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE

Hi Robert,

On Wed, Apr 10, 2019 at 7:57 AM Robert Foss <robert.foss@collabora.com> wrote:

> # dmesg
> imx-drm display-subsystem: failed to bind disp0 (ops imx_pd_ops): -517
> imx-drm display-subsystem: master bind failed: -517
>
> This dmesg log is failing to bind disp0 at another point than what I
> was seeing before, yet the result is the same. The connected HDMI
> output is not brought online correctly.

It seems that the ldb failure is due to the lvds backlight nodes not
finding the PWM resource due to the PWM driver rename.

Please check if this patch fixes the problem on your case:
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?h=next-20190410&id=728e096dd70889c2e80dd4153feee91afb1daf72

imx-drm should also be fixed independently of this PWM rename change
in my opinion.

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

* Re: [PATCH] ARM: dts: imx6qdl-nitrogen6_max: Disable LVDS channels
  2019-04-10 11:55         ` Fabio Estevam
@ 2019-04-10 12:00           ` Fabio Estevam
  0 siblings, 0 replies; 7+ messages in thread
From: Fabio Estevam @ 2019-04-10 12:00 UTC (permalink / raw)
  To: Robert Foss
  Cc: Gary Bisson, Mark Rutland,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Fabio Estevam, Sascha Hauer, linux-kernel, Troy Kisky,
	Rob Herring, NXP Linux Team, Sascha Hauer, Fabio Estevam,
	Shawn Guo,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE

On Wed, Apr 10, 2019 at 8:55 AM Fabio Estevam <festevam@gmail.com> wrote:

> Please check if this patch fixes the problem on your case:
> https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?h=next-20190410&id=728e096dd70889c2e80dd4153feee91afb1daf72

Also, just confirmed that this commit reached 5.1-rc3.

Robert, please run 5.1-rc3 (or rc4) and let us know if you still see
the problem.

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

end of thread, other threads:[~2019-04-10 12:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-08 17:53 [PATCH] ARM: dts: imx6qdl-nitrogen6_max: Disable LVDS channels Robert Foss
2019-04-08 20:37 ` Fabio Estevam
2019-04-09  0:07   ` Robert Foss
2019-04-10  7:35     ` Gary Bisson
2019-04-10 10:57       ` Robert Foss
2019-04-10 11:55         ` Fabio Estevam
2019-04-10 12:00           ` Fabio Estevam

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).