[PATCH] imx-drm: imx-hdmi: fix hdmi hotplug detection initial state

Fabio Estevam festevam at gmail.com
Mon Jun 9 18:15:16 UTC 2014


On Mon, Jun 9, 2014 at 2:49 PM, Russell King - ARM Linux
<linux at arm.linux.org.uk> wrote:
> On Mon, Jun 09, 2014 at 11:29:28AM -0300, Fabio Estevam wrote:
>> On Mon, Jun 9, 2014 at 11:06 AM, Russell King - ARM Linux
>> <linux at arm.linux.org.uk> wrote:
>>
>> > Please check the status in /sys/class/drm/card0-HDMI-A-1/status.  This
>> > should report the current state of the hotplug detection.
>>
>> /sys/class/drm/card0-HDMI-A-1/status returns the correct state for
>> HDMI cable connection.
>
> Good, so that means we're reporting the correct status to the DRM layer.
> Please post the kernel boot messages, one with the HDMI cable disconnected,
> and one with a HDMI sink connected.

With HDMI cable connected (no image is seen on HDMI, only on lvds cable):

imx-ipuv3 2400000.ipu: IPUv3H probed
imx-ipuv3 2800000.ipu: IPUv3H probed
[drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
mmcblk0: mmc1:0007 SD4GB 3.70 GiB
[drm] No driver support for vblank timestamp query.
 mmcblk0: unknown partition table
imx-drm display-subsystem.11: bound imx-ipuv3-crtc.0 (ops ipu_crtc_ops)
imx-drm display-subsystem.11: bound imx-ipuv3-crtc.1 (ops ipu_crtc_ops)
imx-drm display-subsystem.11: bound imx-ipuv3-crtc.2 (ops ipu_crtc_ops)
imx-drm display-subsystem.11: bound imx-ipuv3-crtc.3 (ops ipu_crtc_ops)
imx-hdmi 120000.hdmi: Detected HDMI controller 0x13:0xa:0xa0:0xc1
imx-hdmi 120000.hdmi: hdmi_set_clk_regenerator: samplerate=48000
ratio=100  pixelclk=74250000  N=6144 cts=74250
imx-drm display-subsystem.11: bound 120000.hdmi (ops hdmi_ops)
imx-hdmi 120000.hdmi: EVENT=plugin
imx-hdmi 120000.hdmi: Non-CEA mode used in HDMI
imx-hdmi 120000.hdmi: final pixclk = 0
imx-drm display-subsystem.11: bound ldb.10 (ops imx_ldb_ops)
imx-hdmi 120000.hdmi: imx_hdmi_setup DVI mode
imx-hdmi 120000.hdmi: got edid: width[51] x height[28]
imx-hdmi 120000.hdmi: Non-CEA mode used in HDMI
imx-hdmi 120000.hdmi: final pixclk = 138500000
imx-hdmi 120000.hdmi: imx_hdmi_setup DVI mode
imx-hdmi 120000.hdmi: Non-CEA mode used in HDMI
imx-hdmi 120000.hdmi: final pixclk = 138500000
imx-hdmi 120000.hdmi: imx_hdmi_setup DVI mode

If I disconnect/reconnect the HDMI cable (then image is seen on both
HDMI and LVDS):

root at freescale /$ imx-hdmi 120000.hdmi: EVENT=plugout
imx-hdmi 120000.hdmi: EVENT=plugin
imx-hdmi 120000.hdmi: Non-CEA mode used in HDMI
imx-hdmi 120000.hdmi: final pixclk = 138500000
imx-hdmi 120000.hdmi: imx_hdmi_setup DVI mode
imx-hdmi 120000.hdmi: got edid: width[51] x height[28]
imx-hdmi 120000.hdmi: Non-CEA mode used in HDMI
imx-hdmi 120000.hdmi: final pixclk = 138500000
imx-hdmi 120000.hdmi: imx_hdmi_setup DVI mode
imx-hdmi 120000.hdmi: Non-CEA mode used in HDMI
imx-hdmi 120000.hdmi: final pixclk = 138500000
imx-hdmi 120000.hdmi: imx_hdmi_setup DVI mode

Now booting the kernel with HDMI disconnected:

[drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
mmcblk0: mmc1:0007 SD4GB 3.70 GiB
[drm] No driver support for vblank timestamp query.
 mmcblk0: unknown partition table
imx-drm display-subsystem.11: bound imx-ipuv3-crtc.0 (ops ipu_crtc_ops)
imx-drm display-subsystem.11: bound imx-ipuv3-crtc.1 (ops ipu_crtc_ops)
imx-drm display-subsystem.11: bound imx-ipuv3-crtc.2 (ops ipu_crtc_ops)
imx-drm display-subsystem.11: bound imx-ipuv3-crtc.3 (ops ipu_crtc_ops)
imx-hdmi 120000.hdmi: Detected HDMI controller 0x13:0xa:0xa0:0xc1
imx-hdmi 120000.hdmi: hdmi_set_clk_regenerator: samplerate=48000
ratio=100  pixelclk=74250000  N=6144 cts=74250
imx-drm display-subsystem.11: bound 120000.hdmi (ops hdmi_ops)
imx-drm display-subsystem.11: bound ldb.10 (ops imx_ldb_ops)
Console: switching to colour frame buffer device 128x48
imx-drm display-subsystem.11: fb0:  frame buffer device
imx-drm display-subsystem.11: registered panic notifier
[drm] Initialized imx-drm 1.0.0 20120507 on minor 0

And after connecting the HDMI cable:

imx-hdmi 120000.hdmi: EVENT=plugin
imx-hdmi 120000.hdmi: Non-CEA mode used in HDMI
imx-hdmi 120000.hdmi: final pixclk = 0
imx-hdmi 120000.hdmi: imx_hdmi_setup DVI mode
imx-hdmi 120000.hdmi: got edid: width[51] x height[28]
imx-hdmi 120000.hdmi: Non-CEA mode used in HDMI
imx-hdmi 120000.hdmi: final pixclk = 78800000
imx-hdmi 120000.hdmi: imx_hdmi_setup DVI mode
imx-hdmi 120000.hdmi: Non-CEA mode used in HDMI
imx-hdmi 120000.hdmi: final pixclk = 78800000
imx-hdmi 120000.hdmi: imx_hdmi_setup DVI mode

Image is seen on both LVDS and HDMI monitor, but HDMI resolution is
not correct (this is a different bug though).

>
>> The HDMI undetected issue I am seeing on sabresd seems to be related
>> to the simultaneous usage of HDMI and LVDS.
>>
>> If I remove the ldb node from the imx6qdl-sabresd.dtsi, then the HDMI
>> cable is correctly detected and HDMI is shown right after boot.
>
> I wonder if the problem is that HDMI and LVDS are interfering with each
> other wrt the required pixel clock, and LVDS is winning.  If we have
> HDMI enabled, many HDMI sinks will only work if we set one of their
> supported modes (with the dot clock within 1% - though some sinks are
> more lenient).

Yes, it seems this is the case.

Thanks


More information about the devel mailing list