Kodi Community Forum

Full Version: [i.MX6] XBMC running on Freescale SoC's
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
@wolfgar,

OK. The kernel that GeeXbox used was unclear to me. I cannot switch VTs on the prebuilt image. I had a look at the packaging and found that I didn't understand it as it wasn't one of the more common systems. However, it does seem to me that the the userspace libraries are not the ones that come with BSP 4.1.0. See for example here: http://hg.openbricks.org/openbricks/file...phics/meta That would explain why the md5sum I gave above is different to the files in the prebuilt image.

I'm not too worried about software rendering. Though I'm not sure why my mpeg2 videos are using it. I thought the vpu could do mpeg2.

I'm wondering about this Keying transparency issue though. What do you mean by "pure framebuffer libs"? Do you mean linking /usr/lib/libVIVANTE.so and friends to the "-fb" library and not "-dfb" nor "-x11" or whatever? That I have confirmed. I have also supplied an md5sum from the binary blob I'm using in a previous post.

My framebuffer is set to:

Quote:$ sudo fbset

mode "1920x1080-60"
# D: 148.500 MHz, H: 67.500 kHz, V: 60.000 Hz
geometry 1920 1080 1920 1080 16
timings 6734 148 88 36 4 44 5
hsync high
vsync high
rgba 5/11,6/5,5/0,0/0
endmode
Hi Wolfgar

Did you already tried not using V4L for output but using XBMC's standard EGL route?
If not mistaken, the VPU outputs YUV420 frames which can be simply passed to XBMC.

That'd make the code much simpler, avoid hacks, allow, e.g., 3D support to work and (probably) allow the code to be reused for Android.
Has anyone tried running a 1080p movie? I get some flickering issues, my TV goes blank (as if the HDMI signal is lost) and video returns after a while. At least it is not halting anymore, as it did in the previous version of XBMC I had compiled.

VLC reports the following information for the file I'm trying to watch:
  • Codec: H264 - MPEG-4 AVC (part 10) (avc1)
  • Resolution: 1920x800
  • Framerate: 23.976216
  • Decoded format: Planar 4:2:0 YUV

I think I get the following kernel warnings due to the 1080p playback:
Quote:[ 94.064973] mxc_v4l2_output mxc_v4l2_output.0: Bypass IC.
[ 108.508354] imx-ipuv3 imx-ipuv3.0: IPU Warning - IPU_INT_STAT_10 = 0x00100000

Also, if I stop the playback, I cannot play afterwards any video file at all. I can hear the audio, but only the XBMC menu appears. The kernel currently running is 3.0.35_4.1.0-5-ARCH+, imx-vpu and gpu-viv-bin-mx6q-fb 3.10.17_1.0.0-1 (by CruX's PKGBUILDs). I have also compiled XBMC via CruX's PKGBUILD, it checked out from Wolfgar's repo, the imx-wip branch (04f006c).
@stephan,

I just built your commit 04f006cfb4 and this looks really good now :-) Thanks a lot!

Miro
(2014-02-08, 14:58)Koying Wrote: [ -> ]Hi Wolfgar

Did you already tried not using V4L for output but using XBMC's standard EGL route?
If not mistaken, the VPU outputs YUV420 frames which can be simply passed to XBMC.

That'd make the code much simpler, avoid hacks, allow, e.g., 3D support to work and (probably) allow the code to be reused for Android.

Hi Koying,

No I have not yet tried this because I was not familiar with Vivante direct texture extensions which allow efficient way of working with VPU output...
Also, the V4L2 path was the reference solution which was demonstrated in fsl BSP (and with natural plug for IPU hw functions like deinterlacing) so it seemed a safer way as a first implementation.
I have voluntary isolated most of V4L stuff in a dedicated class so that switching should not be so intrusive for core decoding function

But I know it is a path that would be interesting to explore... (On my todo list)

Best regards
Stephan

(2014-02-10, 01:14)mijanek Wrote: [ -> ]@stephan,

I just built your commit 04f006cfb4 and this looks really good now :-) Thanks a lot!

Miro

Thanks Miro Wink

@joko

Which target and which kernel do you use ?
(As far as I can tell 1080p movies work just perfectly on all the targets I support...)

Regards
Stephan
Quote:[ 108.508354] imx-ipuv3 imx-ipuv3.0: IPU Warning - IPU_INT_STAT_10 = 0x00100000

I get this warning too. Is it safe to ignore?
(2014-02-10, 03:00)wolfgar Wrote: [ -> ]No I have not yet tried this because I was not familiar with Vivante direct texture extensions which allow efficient way of working with VPU output...
Also, the V4L2 path was the reference solution which was demonstrated in fsl BSP (and with natural plug for IPU hw functions like deinterlacing) so it seemed a safer way as a first implementation.
I have voluntary isolated most of V4L stuff in a dedicated class so that switching should not be so intrusive for core decoding function

But I know it is a path that would be interesting to explore... (On my todo list)
Okido.
I'll start working on it.

In https://github.com/koying/xbmc/commits/imx , I've squashed your commits up to now (not the 1080i fixes) and I've baselined pure software rendering.
Too slow, unfortunately, but there might be bugs.
(2014-02-10, 03:00)wolfgar Wrote: [ -> ]Which target and which kernel do you use ?
(As far as I can tell 1080p movies work just perfectly on all the targets I support...)

Hello, Stephan,

And many thanks for your work! I'm using a Wandboard Quad and Arch Linux ARM. The reported kernel is 3.0.35_4.1.0-5-ARCH+, it's b8d0163 from the wandboard_imx_3.0.35_4.1.0 branch of your linux repo on GH along with a couple of patches to support the newest GPU blobs from Freescale (I'm using CruX's PKGBUILD from here).

I would like also to add that XBMC accesses files from SMB shares mostly. Maybe setting up some NFS shares would be better?
(2014-02-10, 14:14)Koying Wrote: [ -> ]Okido.
I'll start working on it.

In https://github.com/koying/xbmc/commits/imx , I've squashed your commits up to now (not the 1080i fixes) and I've baselined pure software rendering.
Too slow, unfortunately, but there might be bugs.

Oki, have you tried to use the vivante direct extension I mentioned ? I mean using glTexDirectVIVMap...

Regards
Stéphan
(2014-02-10, 20:27)wolfgar Wrote: [ -> ]Oki, have you tried to use the vivante direct extension I mentioned ? I mean using glTexDirectVIVMap...
That's what meant by "start working on it" Wink
(2014-02-10, 14:54)joko Wrote: [ -> ]And many thanks for your work! I'm using a Wandboard Quad and Arch Linux ARM. The reported kernel is 3.0.35_4.1.0-5-ARCH+, it's b8d0163 from the wandboard_imx_3.0.35_4.1.0 branch of your linux repo on GH along with a couple of patches to support the newest GPU blobs from Freescale (I'm using CruX's PKGBUILD from here).

I would like also to add that XBMC accesses files from SMB shares mostly. Maybe setting up some NFS shares would be better?

OK,, I asked because the reported IPU error is a sync error which occurs when the IPU does not get the display data on time to display them (kind of underrun). Harmless issue as long as your don't loose screen sync. This issue is largely mitigated by boosting IPU exchanges on the AXI bus (that's why I asked which kernel you use : I little patch enables this tweak but you have it...)
Have you tried another image before the archi linux arm one ? I ask to be sure we are safe regarding hw setup (board+screen) but it should work fine based on crux packaging.
Regarding SMB I use it everyday flawlessly even for demanding bitrates so I don't think it is the issue but you can try to play a file stored locally to be sure it is not about network...

Stephan

(2014-02-10, 20:31)Koying Wrote: [ -> ]That's what meant by "start working on it" Wink
ok, I get it !
It makes sense as you already switched to gpu rendering 3 days ago... Wink
I cross my fingers but I am confident it will really help...
Hello,

I have a wandboard quad and I am using a TV Sony KDL32W656 as monitor. The rootfs is in a HD. The movies are in the same HD. The command line is:

console=ttymxc0,115200 consoleblank=0 fixrtc root=/dev/sda3 rootfstype=ext4 rootwait video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB24,bpp=16 dmfc=3

I tested the xbmc using archlinux and this pkgbuilds: https://github.com/CrawX/PKGBUILDs

So, after some minutes using the menus, the video hangs. Sometimes, the audio still play. Sometimes, all xbmc hangs.

I have this errors in dmesg and logs:

Code:
[root@alarm ~]# [  635.321399] __dma_free_remap: trying to free invalid coherent area:   (null)
[  635.328461] Backtrace:
[  635.330976] [<c0044cf8>] (dump_backtrace+0x0/0x104) from [<c05008e4>] (dump_stack+0x18/0x1c)
[  635.339421]  r6:00000000 r5:00040000 r4:00000000 r3:00000001
[  635.345161] [<c05008cc>] (dump_stack+0x0/0x1c) from [<c004bc58>] (dma_free_coherent+0x9c/0x1c8)
[  635.353888] [<c004bbbc>] (dma_free_coherent+0x0/0x1c8) from [<c03b3e5c>] (vpu_free_dma_buffer+0xd4/0xe4)
[  635.363394] [<c03b3d88>] (vpu_free_dma_buffer+0x0/0xe4) from [<c03b41a8>] (vpu_release+0x1f8/0x28c)
[  635.372454]  r8:00100100 r7:c06e74fc r6:de6c7d40 r5:00000000 r4:c0730fb8
[  635.379040] r3:00200200
[  635.381720] [<c03b3fb0>] (vpu_release+0x0/0x28c) from [<c0103a98>] (fput+0x118/0x1d4)
[  635.389553]  r9:e9bd2788 r8:e9fc7260 r7:e600ae60 r6:00000008 r5:e9ccfa78
[  635.396149] r4:e9bd2780
[  635.398805] [<c0103980>] (fput+0x0/0x1d4) from [<c0100100>] (filp_close+0x78/0x84)
[  635.406405] [<c0100088>] (filp_close+0x0/0x84) from [<c0077200>] (put_files_struct+0x9c/0xf4)
[  635.414946]  r6:0000004f r5:00000001 r4:de178de0 r3:e99598bc
[  635.420673] [<c0077164>] (put_files_struct+0x0/0xf4) from [<c00772e0>] (exit_files+0x40/0x44)
[  635.429228]  r9:de405060 r8:00000002 r7:de6c6018 r6:e994b5f0 r5:de178de0
[  635.435828] r4:e994b2c0
[  635.438484] [<c00772a0>] (exit_files+0x0/0x44) from [<c0077a68>] (do_exit+0x238/0x6ac)
[  635.446417]  r6:00000001 r5:de2a3120 r4:e994b2c0 r3:de666f0c
[  635.452152] [<c0077830>] (do_exit+0x0/0x6ac) from [<c0077f74>] (do_group_exit+0x5c/0xc4)
[  635.460247]  r7:e9b8b564
[  635.462819] [<c0077f18>] (do_group_exit+0x0/0xc4) from [<c00832c4>] (get_signal_to_deliver+0x3b0/0x3f0)
[  635.472225]  r7:e9b8b564 r6:de6c6030 r5:de6c7ee8 r4:00000009
[  635.477952] [<c0082f14>] (get_signal_to_deliver+0x0/0x3f0) from [<c00440e0>] (do_signal+0xc8/0x540)
[  635.487045] [<c0044018>] (do_signal+0x0/0x540) from [<c0044854>] (do_notify_resume+0x20/0x58)
[  635.495594] [<c0044834>] (do_notify_resume+0x0/0x58) from [<c00415d8>] (work_pending+0x24/0x28)
[  635.504306]  r4:00002710 r3:e9bcdf40



[ 1364.074696] Backtrace:
[ 1364.077194] [<c0044cf8>] (dump_backtrace+0x0/0x104) from [<c05008e4>] (dump_stack+0x18/0x1c)
[ 1364.085708]  r6:00000000 r5:00040000 r4:00000000 r3:00000000
[ 1364.094281] [<c05008cc>] (dump_stack+0x0/0x1c) from [<c004bc58>] (dma_free_coherent+0x9c/0x1c8)
[ 1364.103021] [<c004bbbc>] (dma_free_coherent+0x0/0x1c8) from [<c03b3e5c>] (vpu_free_dma_buffer+0xd4/0xe4)
[ 1364.112555] [<c03b3d88>] (vpu_free_dma_buffer+0x0/0xe4) from [<c03b41a8>] (vpu_release+0x1f8/0x28c)
[ 1364.121623]  r8:00100100 r7:c06e74fc r6:de5dbef8 r5:00000000 r4:c0730fb8
[ 1364.128208] r3:00000018
[ 1364.130888] [<c03b3fb0>] (vpu_release+0x0/0x28c) from [<c0103a98>] (fput+0x118/0x1d4)
[ 1364.138721]  r9:e9b63328 r8:e9fc7260 r7:e600ae60 r6:00000008 r5:e9ccfa78
[ 1364.145319] r4:e9b63320
[ 1364.147975] [<c0103980>] (fput+0x0/0x1d4) from [<c0100100>] (filp_close+0x78/0x84)
[ 1364.155571] [<c0100088>] (filp_close+0x0/0x84) from [<c01001a0>] (sys_close+0x94/0xcc)
[ 1364.163506]  r6:de4244a0 r5:de424460 r4:00000032 r3:00000000
[ 1364.169230] [<c010010c>] (sys_close+0x0/0xcc) from [<c0041580>] (ret_fast_syscall+0x0/0x30)
[ 1364.177605]  r7:00000006 r6:4127b31c r5:4127b30c r4:4127b44c


[ 1500.807506] [galcore]: GPU[0] hang, automatic recovery.
[ 1619.847016] [galcore]: GPU[0] hang, automatic recovery.

After that, the screen goes blank / standby.


And I got this error:

Code:
[INFO]  Product Info: i.MX6Q/D/S
[INFO]  bitstreamMode 1, chromaInterleave 0, mapType 0, tiled2LinearEnable 0
[  114.512172] mxc_v4l2_output mxc_v4l2_output.0: Bypass IC.
  [INFO]        Product Info: i.MX6Q/D/S
[INFO]  bitstreamMode 1, chromaInterleave 0, mapType 0, tiled2LinearEnable 0
[  172.972175] mxc_v4l2_output mxc_v4l2_output.0: Bypass IC.
[INFO]  Product Info: i.MX6Q/D/S
[INFO]  bitstreamMode 1, chromaInterleave 0, mapType 0, tiled2LinearEnable 0
[  231.213010] Physical memory allocation error!
[ERR]   mem allocation failed!
[INFO]  Product Info: i.MX6Q/D/S
[INFO]  bitstreamMode 1, chromaInterleave 0, mapType 0, tiled2LinearEnable 0
[  258.144263] Physical memory allocation error!
[ERR]   mem allocation failed!
[INFO]  Product Info: i.MX6Q/D/S
[INFO]  bitstreamMode 1, chromaInterleave 0, mapType 0, tiled2LinearEnable 0
[  298.715775] Physical memory allocation error!
[ERR]   mem allocation failed!

I have make a video showing the problem. Its happen at 2:20 .

Link: https://mega.co.nz/#!tMtDgIiS!gmHq5zonfI...LAzu7lJ-0Y
Hi LeoKesler

I fear it is a regression with VPU allocations.
In fact I have applied the patch provided by wandboard team here : https://github.com/wandboard-org/linux/c...990bc69233 (you can also refer to the post "January 17 2014 - Video playback using the Wandboard VPU, part 1" on http://wandboard.org/) and it seems it is responsible for this crash...
You can revert my commit https://github.com/wolfgar/linux/commit/...a41883ca5e and give it a try without this change

Generally speaking I thing we should move to the new wandboard kernel and only apply the few relevant patches I have done to improve xbmc behavior on top of this one to check whether it helps regarding stability ..

Regards
Hi Stephan,

steven@tbs reported the same issue with the same patch, so I seems to make some troubles with hdtv playback. In fact I didn't tried this one out yet, but I guess it will endup same..

Regarding to xbmc, so using still the same build as I reported last, I'm having on some interlaced SDTV Videos stottering behaviour, like it was on the HDTV (but not so heavy) I will try out to find some exaple video for you..

Miro
Hi Miro,

Yes I had private mail exchange with steven.
So as immediate action I would advise to revert this commit.
I am trying to reproduce the issue to investigate and try to solve it for good.
I pushed this wandboard commit because many users reported VPU allocation issues and I hoped to improve their experience ... I guess I missed my point Wink

Kind regards
Stephan
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39