I.MX6 HDMI support in v4.2

Krzysztof Hałasa khalasa at piap.pl
Thu Sep 17 01:38:41 PDT 2015


Philipp Zabel <p.zabel at pengutronix.de> writes:

> The IDMAC has a few funny restrictions for multiplanar formats, and the
> current code silently assumes that the U and V planes follow right after
> Y.
>
> I have a patch to enforce the same base address:
> http://lists.freedesktop.org/archives/dri-devel/2015-August/089293.html
> but it still doesn't check the offset/pitch limitations properly.

Do you mean the current code as in e.g. v4.2?
I'm passing it (the i.MX6 IMX DRM overlay) a 1024x768 buffer:

ipu_plane_mode_set pitches 1024 512 512 0 offsets 0 786432 983040 0

so the U and V planes closely follow Y, and it doesn't work. The screen
is green to magenta, sometimes there are diagonal stripes (color only,
Y is fine).

Also, e.g. mplayer shows a greenish output.

I've posted a short test program:
http://lists.infradead.org/pipermail/linux-arm-kernel/2015-September/369988.html

You will need to set xv_port = 0 (it will then use the first
YUV420-capable adapter, which on my system is IMX DRM overlay) and you
may want to stick "XSync(display, 0);" after the XvShmPutImage() call.

Also, you may change the "memset(image->data, count, image->data_size)"
into something smaller, e.g. to a subset of Y plane, leaving UV alone.
For example:
	memset(image->data, count % 0x100, 12345);
	memset(image->data + image->pitches[0] * h, 0, (image->pitches[1] + image->pitches[2]) * h / 2);

will set the first 12345 bytes of Y plane, while the U and V will be
zero.

Thanks for looking into this.
-- 
Krzysztof Halasa

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



More information about the linux-arm-kernel mailing list