diff mbox

droid4 hdmi on 4.14-rc4+

Message ID 20171025220732.GB21504@atomide.com (mailing list archive)
State New, archived
Headers show

Commit Message

Tony Lindgren Oct. 25, 2017, 10:07 p.m. UTC
* Merlijn Wajer <merlijn@wizzup.org> [171025 14:54]:
> Hi,
> 
> I have been trying to get HDMI to work on the Motorola Droid4, as I saw
> that it should be supported. When I enable DRM_OMAP, OMAP4_DSS_HDMI and
> DRM_OMAP_CONNECTOR_HDMI, I don't get any output on HDMI (Full config
> here [1], for Linux 4.14-rc4). I see this in dmesg (repeatedly) [2]:
> 
> [   21.360321] of_get_named_gpiod_flags: parsed 'hpd-gpios' property of
> node '/connector[0]' - status (0)
> [   21.370147] connector-hdmi connector: failed to find video source
> 
> My hunch is that perhaps something is missing in the device tree, but
> after looking for time in the omapdrm code I cannot figure it out. Am I
> perhaps missing some configuration options?
> 
> I also do not seem to have any /dev/dri entries, although I did expect
> to see them.

Hmm I've been using it a lot over past six months with lapdock with
typically updating to Linux next about once a week or every few weeks.
I'm just using pending LCD and backlight patches, and omap2plus_defconfig
with following patch. Maybe see if you're missing something from that
patch?

Also Tomi pointed out earlier that n900 needed the analog tv module
loaded for LCD output.. I wonder if you need also the pending LCD
patches applied?

Cheers,

Tony

> [1] http://sprunge.us/GIhC
> [2] http://sprunge.us/bXWf

8< -------------------------

Comments

Merlijn Wajer Oct. 26, 2017, 1:23 p.m. UTC | #1
On 26/10/17 00:07, Tony Lindgren wrote:
> * Merlijn Wajer <merlijn@wizzup.org> [171025 14:54]:
>> Hi,
>>
>> I have been trying to get HDMI to work on the Motorola Droid4, as I saw
>> that it should be supported. When I enable DRM_OMAP, OMAP4_DSS_HDMI and
>> DRM_OMAP_CONNECTOR_HDMI, I don't get any output on HDMI (Full config
>> here [1], for Linux 4.14-rc4). I see this in dmesg (repeatedly) [2]:
>>
>> [   21.360321] of_get_named_gpiod_flags: parsed 'hpd-gpios' property of
>> node '/connector[0]' - status (0)
>> [   21.370147] connector-hdmi connector: failed to find video source
>>
>> My hunch is that perhaps something is missing in the device tree, but
>> after looking for time in the omapdrm code I cannot figure it out. Am I
>> perhaps missing some configuration options?
>>
>> I also do not seem to have any /dev/dri entries, although I did expect
>> to see them.
> 
> Hmm I've been using it a lot over past six months with lapdock with
> typically updating to Linux next about once a week or every few weeks.
> I'm just using pending LCD and backlight patches, and omap2plus_defconfig
> with following patch. Maybe see if you're missing something from that
> patch?
> 
> Also Tomi pointed out earlier that n900 needed the analog tv module
> loaded for LCD output.. I wonder if you need also the pending LCD
> patches applied?

I presume you mean these 14 patches, where this is the first one:
https://patchwork.kernel.org/patch/9860917/

I have applied these 14 patches on top of 4.14-rc4 without errors. I've
also added the config options that you suggested. With new modules,
kernel and devtree I don't get that many 'connector-hdmi' errors,
suggesting that this error may be solved, but I still don't seem to get
any output on HDMI.

There seems to be another/new error relating to some missing te-gpios
(or te-gpio) in the device tree, that the n950 device tree does have,
but the droid4 device tree does not have?

The LCD doesn't seem to show anything either. Here is the kernel output
[1], and my current config [2].

/dev/dri/* is also still missing - it is still my assumption that this
should show up if all goes well - is this correct?

Cheers,
Merlijn


[1] http://sprunge.us/DZXf
[2] http://sprunge.us/WhJL
Tony Lindgren Oct. 26, 2017, 1:50 p.m. UTC | #2
* Merlijn Wajer <merlijn@wizzup.org> [171026 06:28]:
> On 26/10/17 00:07, Tony Lindgren wrote:
> > * Merlijn Wajer <merlijn@wizzup.org> [171025 14:54]:
> >> Hi,
> >>
> >> I have been trying to get HDMI to work on the Motorola Droid4, as I saw
> >> that it should be supported. When I enable DRM_OMAP, OMAP4_DSS_HDMI and
> >> DRM_OMAP_CONNECTOR_HDMI, I don't get any output on HDMI (Full config
> >> here [1], for Linux 4.14-rc4). I see this in dmesg (repeatedly) [2]:
> >>
> >> [   21.360321] of_get_named_gpiod_flags: parsed 'hpd-gpios' property of
> >> node '/connector[0]' - status (0)
> >> [   21.370147] connector-hdmi connector: failed to find video source
> >>
> >> My hunch is that perhaps something is missing in the device tree, but
> >> after looking for time in the omapdrm code I cannot figure it out. Am I
> >> perhaps missing some configuration options?
> >>
> >> I also do not seem to have any /dev/dri entries, although I did expect
> >> to see them.
> > 
> > Hmm I've been using it a lot over past six months with lapdock with
> > typically updating to Linux next about once a week or every few weeks.
> > I'm just using pending LCD and backlight patches, and omap2plus_defconfig
> > with following patch. Maybe see if you're missing something from that
> > patch?
> > 
> > Also Tomi pointed out earlier that n900 needed the analog tv module
> > loaded for LCD output.. I wonder if you need also the pending LCD
> > patches applied?
> 
> I presume you mean these 14 patches, where this is the first one:
> https://patchwork.kernel.org/patch/9860917/
> 
> I have applied these 14 patches on top of 4.14-rc4 without errors. I've
> also added the config options that you suggested. With new modules,
> kernel and devtree I don't get that many 'connector-hdmi' errors,
> suggesting that this error may be solved, but I still don't seem to get
> any output on HDMI.
> 
> There seems to be another/new error relating to some missing te-gpios
> (or te-gpio) in the device tree, that the n950 device tree does have,
> but the droid4 device tree does not have?

I think these are harmless. I don't think there is such a GPIO on
droid 4, or if there is we don't know the GPIO number.

> The LCD doesn't seem to show anything either. Here is the kernel output
> [1], and my current config [2].

Oh OK, you also need the pending TI LMU backlight patches:

https://patchwork.kernel.org/patch/9845089/
https://patchwork.kernel.org/patch/9845087/

Sebastian's blog has a status matrix that should have links to the
most recent pending patches:

http://elektranox.org/droid4/

> /dev/dri/* is also still missing - it is still my assumption that this
> should show up if all goes well - is this correct?

Yeah you should get the unaccelerated dri available:

$ find /dev/dri/
/dev/dri/
/dev/dri/card0
/dev/dri/by-path
/dev/dri/by-path/platform-omapdrm.0-card
/dev/dri/by-path/platform-omapdrm.0-render
/dev/dri/renderD128

Not sure if and why we have some ordering problem with DSS if one of
the dts configured displays is not loaded.

Also note that Linux next has the omap4 CEC driver merged that might
provide some fun too once you get things working.

Regards,

Tony


> [1] http://sprunge.us/DZXf
> [2] http://sprunge.us/WhJL



--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Merlijn Wajer Oct. 26, 2017, 7:33 p.m. UTC | #3
Hi,

On 26/10/17 15:50, Tony Lindgren wrote:

>> There seems to be another/new error relating to some missing te-gpios
>> (or te-gpio) in the device tree, that the n950 device tree does have,
>> but the droid4 device tree does not have?
> 
> I think these are harmless. I don't think there is such a GPIO on
> droid 4, or if there is we don't know the GPIO number.

OK.

>> The LCD doesn't seem to show anything either. Here is the kernel output
>> [1], and my current config [2].
> 
> Oh OK, you also need the pending TI LMU backlight patches:
> 
> https://patchwork.kernel.org/patch/9845089/
> https://patchwork.kernel.org/patch/9845087/

OK; applied.

> Sebastian's blog has a status matrix that should have links to the
> most recent pending patches:
> 
> http://elektranox.org/droid4/

I think the ones you linked to me are more recent than the one on his
status page. But I did get the 14 LCD patches from that page.

>> /dev/dri/* is also still missing - it is still my assumption that this
>> should show up if all goes well - is this correct?
> 
> Yeah you should get the unaccelerated dri available:
> 
> $ find /dev/dri/
> /dev/dri/
> /dev/dri/card0
> /dev/dri/by-path
> /dev/dri/by-path/platform-omapdrm.0-card
> /dev/dri/by-path/platform-omapdrm.0-render
> /dev/dri/renderD128
> 
> Not sure if and why we have some ordering problem with DSS if one of
> the dts configured displays is not loaded.

This is the output that I get now [1] - seems pretty similar to before I
applied the TI LMU backlight patches. Config is here [2] LCD and HDMI do
not seem to work yet - any clue what else I might have missed? (Also no
/dev/dri entries)

I'm also down with trying a slightly older tree (like 4.12) if that's
known to work.

> Also note that Linux next has the omap4 CEC driver merged that might
> provide some fun too once you get things working.

That would be fun indeed - but I assume it is unlikely to cause the
current (perceived, at least on my end) breakage, right?

[1] http://sprunge.us/Xaic
[2] http://sprunge.us/AdES
Sebastian Reichel Oct. 26, 2017, 9:56 p.m. UTC | #4
Hi,

On Thu, Oct 26, 2017 at 09:33:56PM +0200, Merlijn Wajer wrote:
> Hi,
> 
> On 26/10/17 15:50, Tony Lindgren wrote:
> 
> >> There seems to be another/new error relating to some missing te-gpios
> >> (or te-gpio) in the device tree, that the n950 device tree does have,
> >> but the droid4 device tree does not have?
> > 
> > I think these are harmless. I don't think there is such a GPIO on
> > droid 4, or if there is we don't know the GPIO number.
> 
> OK.
> 
> >> The LCD doesn't seem to show anything either. Here is the kernel output
> >> [1], and my current config [2].
> > 
> > Oh OK, you also need the pending TI LMU backlight patches:
> > 
> > https://patchwork.kernel.org/patch/9845089/
> > https://patchwork.kernel.org/patch/9845087/
> 
> OK; applied.
> 
> > Sebastian's blog has a status matrix that should have links to the
> > most recent pending patches:
> > 
> > http://elektranox.org/droid4/
> 
> I think the ones you linked to me are more recent than the one on his
> status page. But I did get the 14 LCD patches from that page.
> 
> >> /dev/dri/* is also still missing - it is still my assumption that this
> >> should show up if all goes well - is this correct?
> > 
> > Yeah you should get the unaccelerated dri available:
> > 
> > $ find /dev/dri/
> > /dev/dri/
> > /dev/dri/card0
> > /dev/dri/by-path
> > /dev/dri/by-path/platform-omapdrm.0-card
> > /dev/dri/by-path/platform-omapdrm.0-render
> > /dev/dri/renderD128
> > 
> > Not sure if and why we have some ordering problem with DSS if one of
> > the dts configured displays is not loaded.
> 
> This is the output that I get now [1] - seems pretty similar to before I
> applied the TI LMU backlight patches. Config is here [2] LCD and HDMI do
> not seem to work yet - any clue what else I might have missed? (Also no
> /dev/dri entries)
> 
> I'm also down with trying a slightly older tree (like 4.12) if that's
> known to work.

This smells like -EPROBE_DEFER in "panel-dsi-cm". Check the dyndbg
entries in this presentation to see how to debug the issue:

https://elinux.org/images/8/83/Plumbers_2016_dt_device_tree_tools.pdf

Looking at the log it might be the backlight. Do you have an entry
in /sys/class/backlight?

> > Also note that Linux next has the omap4 CEC driver merged that might
> > provide some fun too once you get things working.
> 
> That would be fun indeed - but I assume it is unlikely to cause the
> current (perceived, at least on my end) breakage, right?
> 
> [1] http://sprunge.us/Xaic
> [2] http://sprunge.us/AdES

Unrelated: You want to enable CONFIG_PHY_CPCAP_USB.

-- Sebastian
Merlijn Wajer Oct. 26, 2017, 10:04 p.m. UTC | #5
Hi,

On 26/10/17 23:56, Sebastian Reichel wrote:

>>
>> This is the output that I get now [1] - seems pretty similar to before I
>> applied the TI LMU backlight patches. Config is here [2] LCD and HDMI do
>> not seem to work yet - any clue what else I might have missed? (Also no
>> /dev/dri entries)
>>
>> I'm also down with trying a slightly older tree (like 4.12) if that's
>> known to work.
> 
> This smells like -EPROBE_DEFER in "panel-dsi-cm". Check the dyndbg
> entries in this presentation to see how to debug the issue:
> 
> https://elinux.org/images/8/83/Plumbers_2016_dt_device_tree_tools.pdf
> 
> Looking at the log it might be the backlight. Do you have an entry
> in /sys/class/backlight?

Nothing in /sys/class/backlight/ - there are also no modules loaded that
match the pattern 'back' (lsmod | grep back).

This is from the current config - could be problem perhaps be that
LCD_SUPPORT and CLASS_DEVICE are 'y', but everything else is a module?

# zgrep BACK /proc/config.gz  | grep -v 'not set'
CONFIG_CGROUP_WRITEBACK=y
CONFIG_CLONE_BACKWARDS=y
CONFIG_BACKLIGHT_LCD_SUPPORT=y
CONFIG_BACKLIGHT_CLASS_DEVICE=y
CONFIG_BACKLIGHT_GENERIC=m
CONFIG_BACKLIGHT_PWM=m
CONFIG_BACKLIGHT_PANDORA=m
CONFIG_BACKLIGHT_TI_LMU=m
CONFIG_BACKLIGHT_GPIO=m
CONFIG_LEDS_TRIGGER_BACKLIGHT=m

I also noticed the early:

[    5.516448] lcd: disabling

I can look at the dyndbg entries tomorrow if the above doesn't help.

> 
>>> Also note that Linux next has the omap4 CEC driver merged that might
>>> provide some fun too once you get things working.
>>
>> That would be fun indeed - but I assume it is unlikely to cause the
>> current (perceived, at least on my end) breakage, right?
>>
>> [1] http://sprunge.us/Xaic
>> [2] http://sprunge.us/AdES
> 
> Unrelated: You want to enable CONFIG_PHY_CPCAP_USB.

Will do. Thanks.

Cheers,
Merlijn
Sebastian Reichel Oct. 27, 2017, 6:13 p.m. UTC | #6
Hi,

On Fri, Oct 27, 2017 at 12:04:32AM +0200, Merlijn Wajer wrote:
> On 26/10/17 23:56, Sebastian Reichel wrote:
>>> [...]
>> This smells like -EPROBE_DEFER in "panel-dsi-cm". Check the dyndbg
>> entries in this presentation to see how to debug the issue:
>> 
>> https://elinux.org/images/8/83/Plumbers_2016_dt_device_tree_tools.pdf
>> 
>> Looking at the log it might be the backlight. Do you have an entry
>> in /sys/class/backlight?
> 
> Nothing in /sys/class/backlight/ - there are also no modules loaded that
> match the pattern 'back' (lsmod | grep back).

ok, this is probably an autoloading issue. I currently compile static
kernels (everything builtin), since that is easier for my development
workflow. (So I did not test this). You should be able to get
backlight by modprobing the backlight driver (modprobe ti-lmu-backlight).

For now I suggest to enable BACKLIGHT_TI_LMU=y (you need to enable
some dependencies for that). I will have a look at this before I
send the next revision of the backlight support.

> [...]

-- Sebastian
Merlijn Wajer Oct. 27, 2017, 7:47 p.m. UTC | #7
Hi,

On 27/10/17 20:13, Sebastian Reichel wrote:
> Hi,
> 
> On Fri, Oct 27, 2017 at 12:04:32AM +0200, Merlijn Wajer wrote:
>> On 26/10/17 23:56, Sebastian Reichel wrote:
>>>> [...]
>>> This smells like -EPROBE_DEFER in "panel-dsi-cm". Check the dyndbg
>>> entries in this presentation to see how to debug the issue:
>>>
>>> https://elinux.org/images/8/83/Plumbers_2016_dt_device_tree_tools.pdf
>>>
>>> Looking at the log it might be the backlight. Do you have an entry
>>> in /sys/class/backlight?
>>
>> Nothing in /sys/class/backlight/ - there are also no modules loaded that
>> match the pattern 'back' (lsmod | grep back).
> 
> ok, this is probably an autoloading issue. I currently compile static
> kernels (everything builtin), since that is easier for my development
> workflow. (So I did not test this). You should be able to get
> backlight by modprobing the backlight driver (modprobe ti-lmu-backlight).

Yes - this worked! Now I have /dev/dri, the X11 modesetting driver
works, and both HDMI and LCD work. :-)

> For now I suggest to enable BACKLIGHT_TI_LMU=y (you need to enable
> some dependencies for that). I will have a look at this before I
> send the next revision of the backlight support.

Sounds good.

Cheers,
Merlijn
diff mbox

Patch

diff --git a/arch/arm/configs/omap2plus_defconfig b/arch/arm/configs/omap2plus_defconfig
--- a/arch/arm/configs/omap2plus_defconfig
+++ b/arch/arm/configs/omap2plus_defconfig
@@ -319,27 +319,31 @@  CONFIG_V4L_PLATFORM_DRIVERS=y
 CONFIG_VIDEO_OMAP3=m
 # CONFIG_MEDIA_SUBDRV_AUTOSELECT is not set
 CONFIG_VIDEO_TVP5150=m
+CONFIG_DRM=m
+CONFIG_DRM_OMAP=m
+CONFIG_DRM_OMAP_NUM_CRTCS=2
+CONFIG_OMAP5_DSS_HDMI=y
+CONFIG_OMAP2_DSS_SDI=y
+CONFIG_OMAP2_DSS_DSI=y
+CONFIG_DRM_OMAP_ENCODER_OPA362=m
+CONFIG_DRM_OMAP_ENCODER_TFP410=m
+CONFIG_DRM_OMAP_ENCODER_TPD12S015=m
+CONFIG_DRM_OMAP_CONNECTOR_DVI=m
+CONFIG_DRM_OMAP_CONNECTOR_HDMI=m
+CONFIG_DRM_OMAP_CONNECTOR_ANALOG_TV=m
+CONFIG_DRM_OMAP_PANEL_DPI=m
+CONFIG_DRM_OMAP_PANEL_DSI_CM=m
+CONFIG_DRM_OMAP_PANEL_SONY_ACX565AKM=m
+CONFIG_DRM_OMAP_PANEL_LGPHILIPS_LB035Q02=m
+CONFIG_DRM_OMAP_PANEL_SHARP_LS037V7DW01=m
+CONFIG_DRM_OMAP_PANEL_TPO_TD028TTEC1=m
+CONFIG_DRM_OMAP_PANEL_TPO_TD043MTEA1=m
+CONFIG_DRM_OMAP_PANEL_NEC_NL8048HL11=m
+CONFIG_DRM_TILCDC=m
 CONFIG_FB=y
 CONFIG_FIRMWARE_EDID=y
 CONFIG_FB_MODE_HELPERS=y
 CONFIG_FB_TILEBLITTING=y
-CONFIG_FB_OMAP2=m
-CONFIG_FB_OMAP5_DSS_HDMI=y
-CONFIG_FB_OMAP2_DSS_SDI=y
-CONFIG_FB_OMAP2_DSS_DSI=y
-CONFIG_FB_OMAP2_ENCODER_TFP410=m
-CONFIG_FB_OMAP2_ENCODER_TPD12S015=m
-CONFIG_FB_OMAP2_CONNECTOR_DVI=m
-CONFIG_FB_OMAP2_CONNECTOR_HDMI=m
-CONFIG_FB_OMAP2_CONNECTOR_ANALOG_TV=m
-CONFIG_FB_OMAP2_PANEL_DPI=m
-CONFIG_FB_OMAP2_PANEL_DSI_CM=m
-CONFIG_FB_OMAP2_PANEL_SONY_ACX565AKM=m
-CONFIG_FB_OMAP2_PANEL_LGPHILIPS_LB035Q02=m
-CONFIG_FB_OMAP2_PANEL_SHARP_LS037V7DW01=m
-CONFIG_FB_OMAP2_PANEL_TPO_TD028TTEC1=m
-CONFIG_FB_OMAP2_PANEL_TPO_TD043MTEA1=m
-CONFIG_FB_OMAP2_PANEL_NEC_NL8048HL11=m
 CONFIG_BACKLIGHT_LCD_SUPPORT=y
 CONFIG_LCD_CLASS_DEVICE=y
 CONFIG_LCD_PLATFORM=y