All of lore.kernel.org
 help / color / mirror / Atom feed
From: khalasa@piap.pl (Krzysztof Hałasa)
To: linux-arm-kernel@lists.infradead.org
Subject: I.MX6 HDMI support in v4.2
Date: Mon, 07 Sep 2015 16:04:30 +0200	[thread overview]
Message-ID: <m37fo25nrl.fsf@t19.piap.pl> (raw)
In-Reply-To: <20150907112555.GS21084@n2100.arm.linux.org.uk> (Russell King's message of "Mon, 7 Sep 2015 12:25:55 +0100")

Russell King - ARM Linux <linux@arm.linux.org.uk> writes:

>> Now if I enable LVDS (CONFIG_DRM_IMX_LDB - I don't have any LVDS
>> hardware connected), the HDMI device is created (as well as LVDS).
>
> Are you telling the kernel in your device tree file that LDB is required?
> DRM doesn't support hot-plugging outputs, all specified output modules
> must be present before DRM can bring up the display subsystem.

It seems to be the case, I'll test with the LDB portion removed. Though
I don't mind LVDS if it doesn't break HDMI.

>> This used to detect the monitor as "unknown" but now it's "connected"
>> most of the time - not sure what have changed. EDID is empty and I get
>> the following entries in /sys/devices/soc0/display-subsystem/drm/card0:
>
> "used to" - when was this?

Well... before I made unspecified changes to something :-)
I mean, I don't think I made any related changes, but something must
have changed since it always prints "connected" now. Most of the time.
I mean, from time to time :-)
Seems low level.

> I don't think dw_hdmi has ever reported
> a connected status of "unknown", always explicitly stating connected
> or disconnected.

The "unknown" must be an uninitialized variable (neither connected = 1
or disconnected = 2):

--- dmesg-unknown
+++ dmesg-connected
-imx-ipuv3 2400000.ipu: IPUv3H probed
@@
-XXX dw_hdmi_imx_probe[261]
+imx-ipuv3 2400000.ipu: IPUv3H probed
 imx-ipuv3 2800000.ipu: IPUv3H probed
+XXX dw_hdmi_imx_probe[261]
 [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
 [drm] No driver support for vblank timestamp query.
 imx-drm display-subsystem: bound imx-ipuv3-crtc.0 (ops ipu_crtc_ops [imx_ipuv3_crtc])
@@ -323,8 +323,9 @@
 XXX dw_hdmi_hardirq[1479]
 XXX dw_hdmi_irq[1493]
 imx-drm display-subsystem: bound 2000000.aips-bus:ldb at 020e0008 (ops imx_ldb_driver_exit [imx_ldb])
 [drm] Initialized imx-drm 1.0.0 20120507 on minor 0
+XXX dw_hdmi_connector_detect[1389]: CONNECTED

In the "unknown" case, the dw_hdmi_connector_detect() wasn't called.
Maybe the problem happens when dw_hdmi_imx_probe() is called before
"imx-ipuv3 2400000.ipu: IPUv3H probed" is done. Probably an interrupt
isn't generated or something like this, maybe it should poll it once.
I'll check this later.

> Looks fine apart from the lack of EDID.  Are you sure you have the
> pinctrl setup correct for this?  (We don't use the DDC I2C built
> into the HDMI interface.)

How do I check it? I'm simply using the (v4.2) imx6q-gw54xx.dts file.

>> Now, somehow the X.org server sets the resolution to 1024x768, though
>> nothing is displayed on the monitor (it's in stand-by). Files in
>> /sys/.../card0-HDMI-A/ now have the actual EDID, mode list etc.
>
> By default, 1024x768 is selected when there's nothing else available.

How do I select e.g. 1920x1080? The EDID supports this mode, but
# xrandr --output HDMI1 --auto

X Error:  BadMatch
  Request Major code 139 (RANDR)
  Request Minor code 7 ()
  Error Serial #34
  Current Serial #35

imx-drm display-subsystem: failed to allocate buffer with size 8294400
imx-drm display-subsystem: failed to allocate buffer with size 8294400
imx-ipuv3 2400000.ipu: DC stop timeout after 50 ms

I assume I have to reserve the (big linear region of) memory at boot
time, but don't know how.

> The DPMS "on" and enabled above tends to suggest you should be seeing
> output though.

I've applied the PLL5 patch and it now started to work. At least I have
output. I'm still seeing "DC stop timeout after 50 ms" but apparently
only when the X server is being closed, from time to time.

> I should point out that virtually every -rc kernel gets tested here on
> iMX6 with HDMI output - onto my Panasonic TV, and I've seen no evidence
> of any regressions.  For me, it Just Works(tm).

Ok. I'll try to reach the same state :-)

Now, having the HDMI output on the screen, I'm trying to get XVideo
working. It seems all XV attributes are set to their minimum values and
I can't change that. Is it normal? For this or other reason, I can see
a black video window only (I'm trying to use I420 overlay). Could be
unrelated problem, though.

# xvattr
Found Xv 2.2
Adaptor: 0
Name: Marvell Armada Overlay Video
 Port: 85
  Name: XV_ENCODING
   Flags: XvGettable XvSettable
   Min value: 0
   Max value: 0
   Current value: 0
  Name: XV_SATURATION
   Flags: XvGettable XvSettable
   Min value: -16384
   Max value: 16383
   Current value: -16384
  Name: XV_BRIGHTNESS
   Flags: XvGettable XvSettable
   Min value: -256
   Max value: 255
   Current value: -256
  Name: XV_CONTRAST
   Flags: XvGettable XvSettable
   Min value: -16384
   Max value: 16383
   Current value: -16384
  Name: XV_AUTOPAINT_COLORKEY
   Flags: XvGettable XvSettable
   Min value: 0
   Max value: 1
   Current value: 1
  Name: XV_COLORKEY
   Flags: XvGettable XvSettable
   Min value: 0
   Max value: 16777215
   Current value: 0
  Name: XV_PIPE
   Flags: XvGettable XvSettable
   Min value: -1
   Max value: 3
   Current value: -1

# xvattr -a XV_BRIGHTNESS -v 0 -p 85
Found Xv 2.2
XV_BRIGHTNESS set to -256

I'll continue with this stuff tomorrow.


Thanks for the help,
--
Krzysztof Halasa

Industrial Research Institute for Automation and Measurements PIAP
Al. Jerozolimskie 202, 02-486 Warsaw, Poland

  reply	other threads:[~2015-09-07 14:04 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-07 10:55 I.MX6 HDMI support in v4.2 Krzysztof Hałasa
2015-09-07 11:25 ` Russell King - ARM Linux
2015-09-07 14:04   ` Krzysztof Hałasa [this message]
2015-09-08  9:16     ` Russell King - ARM Linux
2015-09-08 11:01       ` Krzysztof Hałasa
2015-09-08 12:57         ` Russell King - ARM Linux
2015-09-08 14:59           ` Krzysztof Hałasa
2015-09-10 10:25           ` Krzysztof Hałasa
2015-09-10 10:49             ` Russell King - ARM Linux
2015-09-10 11:29               ` Krzysztof Hałasa
2015-09-17  7:21               ` Philipp Zabel
2015-09-17  8:38                 ` Krzysztof Hałasa
2015-09-17  9:23                 ` Russell King - ARM Linux
2015-09-08 10:45   ` Krzysztof Hałasa
2015-09-08 10:56     ` Lucas Stach
2015-09-08 11:01       ` Russell King - ARM Linux
2015-09-08 11:07         ` Lucas Stach
2015-09-08 11:29           ` Russell King - ARM Linux
2015-09-08 12:43             ` Lucas Stach
2015-09-08 13:40               ` Russell King - ARM Linux
2015-09-08 14:17               ` Robert Nelson
2015-09-08 14:45                 ` Krzysztof Hałasa
2015-09-08 14:48                 ` Lucas Stach
2015-09-08 15:55                 ` Russell King - ARM Linux
2015-09-08 17:07                   ` Jon Nettleton
2015-09-08 11:06       ` Krzysztof Hałasa
2015-09-14  8:39       ` Krzysztof Hałasa
2015-09-15  8:24         ` Krzysztof Hałasa
2015-09-15 10:12           ` Russell King - ARM Linux
2015-09-15 11:01             ` Krzysztof Hałasa
2015-09-15 14:29               ` Russell King - ARM Linux
2015-09-15 16:53                 ` Krzysztof Hałasa
2015-09-15 15:53         ` Lucas Stach
2015-09-15 16:36           ` Russell King - ARM Linux
2015-09-15 16:53             ` Lucas Stach
2015-09-15 17:04               ` Russell King - ARM Linux
2015-09-15 19:01                 ` Lucas Stach
2015-09-28 14:48                 ` xf86-video-armada + etnaviv (Was: Re: I.MX6 HDMI support in v4.2) Lucas Stach
2015-09-28 15:24                   ` Russell King - ARM Linux
2015-09-28 15:40                     ` Lucas Stach
2015-09-28 16:50                       ` Russell King - ARM Linux
2015-09-29  8:28                         ` Lucas Stach
2015-09-29  8:41                           ` Russell King - ARM Linux
2015-09-29  9:01                             ` Lucas Stach
2015-09-15 16:57           ` I.MX6 HDMI support in v4.2 Krzysztof Hałasa
2015-09-16  7:57           ` Krzysztof Hałasa
2015-09-16 15:52             ` Lucas Stach

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m37fo25nrl.fsf@t19.piap.pl \
    --to=khalasa@piap.pl \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.