Thursday, February 3, 2011

PXA27x overlay in mplayer

Last week I was busy getting PXA27x overlay working, as it was pretty broken in mainline kernel. There were two problems: overlay driver somehow corrupted memory on second access to it, and actually it does not work. So I got following messages on dmesg, and of course no visible overlay plane:

[ 93.679574] overlay1fb_disable: timeout disabling overlay1
[ 95.601537] BUG: Bad page state in process sh pfn:a1b60
[ 95.601645] page:c0456c00 count:0 mapcount:0 mapping: (null) index:0x0
[ 95.601698] page flags: 0x200(arch_1)

First bug was successfully fixed by Russel King, here you can find his patch. It fixed memory corruption, but overlay still did not work.

Problem was in selecting planes Z-ordering in wrong time, so overlay was under main plane, and main plane has no transparency bit (rgb565 colorspace), so there was no way to make it visible. I fixed this issue, added some cosmetical fixes, and produced patch.

To use 2nd overlay (one with yuv colospace available) I created mplayer vo driver, here you can find patch for mplayer-1.0rc2, however it's easy to port it to newer mplayer versions (but I was not able to crosscompile mplayer-1.0rc3 nor mplayer-1.0rc4, did not investigate issues yet)

As result Zipit Z2@208mhz is now able to play mpeg4 video with qvga resolution without problems :) Of course, without scaler (so you can't down/up scale your video) - scaler from mplayer is _really_ slow.

Next point is getting some powersaving stuff working on Z2.

1 comment:

Pedro said...

nice work!! This is great for the zipit community. Keep on hackin' .