Kodi Community Forum
Linux Radeon OSS with vdpau (howto) - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: Linux (https://forum.kodi.tv/forumdisplay.php?fid=52)
+---- Thread: Linux Radeon OSS with vdpau (howto) (/showthread.php?tid=174854)



RE: Radeon OSS with vdpau (howto) - fritsch - 2013-12-19

@Mysqo: Please post the logfiles from the first page, thx


Sv: RE: Radeon OSS with vdpau (howto) - Mysqo - 2013-12-19

(2013-12-19, 21:46)jaapp Wrote: Did you purge the previous 3.13 kernel?

No I didn't just installed using dpkg -i


(2013-12-19, 21:47)fritsch Wrote: @Mysqo: Please post the logfiles from the first page, thx
Will do so...

dmesg : http://paste.ubuntu.com/6601465/
xbmclog: http://paste.ubuntu.com/6601471/
Xorg: http://paste.ubuntu.com/6601475/
Display: http://paste.ubuntu.com/6601477/
dpkg: http://paste.ubuntu.com/6601480/


RE: Radeon OSS with vdpau (howto) - fritsch - 2013-12-19

Remove your asound.conf - whereever you got it, not by this howto.


RE: Radeon OSS with vdpau (howto) - EricV - 2013-12-20

(2013-12-17, 18:49)pyrodex Wrote:
(2013-12-17, 18:36)locomot1f Wrote: thanks for confirming, @pyrodex. wondering if it's the driver that I'm trying to compile... i'm unable to compile as well.

Spoke a little to soon... One of my two IDENTICAL machines, minus the TV configuration setup threw the following error in the kernel:

Code:
[    8.092214] BUG: unable to handle kernel paging request at ffffec2000000900
[    8.092273] IP: [<ffffffff8119c356>] kfree+0x56/0x130
[    8.092312] PGD 0
[    8.092328] Oops: 0000 [#1] SMP
[    8.092353] Modules linked in: snd_hda_codec_realtek(F) snd_hda_codec_hdmi(F) snd_seq_midi(F) snd_seq_midi_event(F) snd_rawmidi(F) kvm_amd(F) kvm(F) snd_hda_intel(F) snd_hda_codec(F) snd_hwdep(F) ir_lirc_codec(F) lirc_dev(F) ir_mce_kbd_decoder(F) ir_sanyo_decoder(F) ir_sony_decoder(F) ir_jvc_decoder(F) microcode(F) ir_rc6_decoder(F) ir_rc5_decoder(F) ir_nec_decoder(F) snd_pcm(F) psmouse(F) snd_seq(F) serio_raw(F) rc_rc6_mce(F) k10temp(F) mceusb(F) rc_core(F) snd_page_alloc(F) i2c_piix4(F) snd_timer(F) snd_seq_device(F) radeon(F) i2c_algo_bit(F) drm_kms_helper(F) snd(F) ttm(F) drm(F) mac_hid(F) soundcore(F) lp(F) parport(F) nls_iso8859_1(F) ext2(F) pata_acpi(F) r8169(F) mii(F) pata_atiixp(F) ahci(F) libahci(F)
[    8.092821] CPU: 2 PID: 1096 Comm: Xorg Tainted: GF            3.13.0-rc4-custom #1
[    8.092870] Hardware name: To Be Filled By O.E.M. To Be Filled By O.E.M./A75M-ITX, BIOS P1.60 05/29/2012
[    8.092929] task: ffff88022262b000 ti: ffff88021f4b0000 task.ti: ffff88021f4b0000
[    8.092975] RIP: 0010:[<ffffffff8119c356>]  [<ffffffff8119c356>] kfree+0x56/0x130
[    8.093025] RSP: 0000:ffff88021f4b1a60  EFLAGS: 00010286
[    8.093058] RAX: 0000022000000900 RBX: 0000100000024414 RCX: 0000000000000000
[    8.093103] RDX: 000077ff80000000 RSI: 0000000000005f78 RDI: 0000100000024414
[    8.093147] RBP: ffff88021f4b1a78 R08: 0000000000000018 R09: 0000000000000017
[    8.093190] R10: ffffec2000000900 R11: ffffffffa013e481 R12: 0000000000000000
[    8.093234] R13: ffffffffa019a892 R14: 0000000000000000 R15: ffff880222a06800
[    8.093279] FS:  00007ff8e4e87980(0000) GS:ffff88022ed00000(0000) knlGS:0000000000000000
[    8.093329] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    8.093364] CR2: ffffec2000000900 CR3: 0000000222b15000 CR4: 00000000000007e0
[    8.093408] Stack:
[    8.093422]  ffff880222ad0000 0000000000000000 ffff880222ad0000 ffff88021f4b1b38
[    8.093475]  ffffffffa019a892 0000000000000003 ffff88021f4b1ab0 ffff880200007048
[    8.093527]  000070440000712c ffff880222df4a00 0000100000024414 0000188000024414
[    8.093579] Call Trace:
[    8.093634]  [<ffffffffa019a892>] evergreen_hdmi_setmode+0x832/0x960 [radeon]
[    8.093697]  [<ffffffffa008d51e>] ? drm_detect_hdmi_monitor+0x6e/0xb0 [drm]
[    8.093765]  [<ffffffffa01a1b98>] radeon_atom_encoder_mode_set+0x158/0x2d0 [radeon]
[    8.093817]  [<ffffffffa00c0a90>] drm_crtc_helper_set_mode+0x490/0x500 [drm_kms_helper]
[    8.093887]  [<ffffffffa014c635>] radeon_property_change_mode.isra.1+0x35/0x40 [radeon]
[    8.093955]  [<ffffffffa014c7ce>] radeon_connector_set_property+0x18e/0x300 [radeon]
[    8.094016]  [<ffffffffa008a6d2>] drm_mode_obj_set_property_ioctl+0x142/0x340 [drm]
[    8.094074]  [<ffffffffa008a900>] drm_mode_connector_property_set_ioctl+0x30/0x40 [drm]
[    8.094132]  [<ffffffffa0079c02>] drm_ioctl+0x502/0x630 [drm]
[    8.094172]  [<ffffffff8170aedc>] ? __do_page_fault+0x1ec/0x560
[    8.094226]  [<ffffffffa010e0fe>] radeon_drm_ioctl+0x4e/0x90 [radeon]
[    8.094268]  [<ffffffff811c8230>] do_vfs_ioctl+0x2e0/0x4c0
[    8.094306]  [<ffffffff8109afc4>] ? vtime_account_user+0x54/0x60
[    8.094345]  [<ffffffff811c8491>] SyS_ioctl+0x81/0xa0
[    8.094378]  [<ffffffff8170faff>] tracesys+0xe1/0xe6
[    8.094409] Code: 00 00 00 80 ff 77 00 00 49 ba 00 00 00 00 00 ea ff ff 48 01 d8 48 0f 42 15 c8 8c a7 00 48 01 d0 48 c1 e8 0c 48 c1 e0 06 49 01 c2 <49> 8b 02 f6 c4 80 0f 85 be 00 00 00 49 8b 02 a8 80 0f 84 92 00
[    8.094635] RIP  [<ffffffff8119c356>] kfree+0x56/0x130
[    8.094670]  RSP <ffff88021f4b1a60>
[    8.094693] CR2: ffffec2000000900

I had to revert it back to rc3 for it to work.

I have exactly the same bug on rc4 on a custom amd machine:

BUG: unable to handle kernel paging request at ffffec2000000900
[ 39.507099] IP: [<ffffffff810a78ee>] kfree+0x41/0xe2
[ 39.507118] PGD 0
[ 39.507126] Oops: 0000 [#1] PREEMPT SMP
[ 39.507135] Modules linked in: radeon drm_kms_helper ttm drm cfbfillrect cfbimgblt cfbcopyarea i2c_algo_bit fb fbdev
[ 39.507166] CPU: 1 PID: 3777 Comm: Xorg Not tainted 3.13.0-rc4 #4
[ 39.507175] Hardware name: To be filled by O.E.M. To be filled by O.E.M./Inagua CRB, BIOS 4.6.4 06/15/2011
[ 39.507184] task: ffff88013b9ed940 ti: ffff880099790000 task.ti: ffff880099790000
[ 39.507192] RIP: 0010:[<ffffffff810a78ee>] [<ffffffff810a78ee>] kfree+0x41/0xe2
[ 39.507206] RSP: 0000:ffff880099791a40 EFLAGS: 00010286
[ 39.507213] RAX: ffffea0000000000 RBX: 0000100000024414 RCX: 0000000000000000
[ 39.507220] RDX: 0000000000010005 RSI: 0000000000005f78 RDI: 0000100000024414
[ 39.507227] RBP: 0000000000000c00 R08: ffffec2000000900 R09: 0000000000000c00
[ 39.507234] R10: ffffffffa00a5dba R11: ffffffffa00a5f1d R12: ffff8800a3712c00
[ 39.507240] R13: ffff8800a2f20000 R14: 0000000000000000 R15: ffff8800a19f0400
[ 39.507249] FS: 00007f737efc3980(0000) GS:ffff88013fd00000(0000) knlGS:0000000000000000
[ 39.507256] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[ 39.507263] CR2: ffffec2000000900 CR3: 0000000099a7f000 CR4: 00000000000007e0
[ 39.507267] Stack:
[ 39.507273] ffff8800a2f20000 ffffffffa00ef1c8 00007c44a00f42a4 00007d2c00007c48
[ 39.507284] ffff8800a3712c00 0000000000000003 0000000000000000 ffffffffa0173091
[ 39.507294] 0000100000024414 0000188000024414 0000180000028488 ffffffff00024414
[ 39.507304] Call Trace:
[ 39.507411] [<ffffffffa00ef1c8>] ? evergreen_hdmi_setmode+0x3cc/0x7e1 [radeon]
[ 39.507431] [<ffffffffa0086732>] ? drm_crtc_helper_set_mode+0x30a/0x40a [drm_kms_helper]
[ 39.507451] [<ffffffffa008748c>] ? drm_crtc_helper_set_config+0x5ff/0x842 [drm_kms_helper]
[ 39.507522] [<ffffffffa00b23a7>] ? radeon_crtc_set_config+0x41/0xe8 [radeon]
[ 39.507570] [<ffffffffa00323e7>] ? drm_mode_set_config_internal+0x44/0xac [drm]
[ 39.507611] [<ffffffffa00348cb>] ? drm_mode_setcrtc+0x3e8/0x499 [drm]
[ 39.507644] [<ffffffffa00298b3>] ? drm_ioctl+0x26f/0x394 [drm]
[ 39.507684] [<ffffffffa00344e3>] ? drm_mode_setplane+0x335/0x335 [drm]
[ 39.507739] [<ffffffffa0094045>] ? radeon_drm_ioctl+0x45/0x77 [radeon]
[ 39.507752] [<ffffffff810b9598>] ? do_vfs_ioctl+0x356/0x421
[ 39.507763] [<ffffffff810b96b1>] ? SyS_ioctl+0x4e/0x7b
[ 39.507775] [<ffffffff8147aba2>] ? system_call_fastpath+0x16/0x1b
[ 39.507781] Code: 00 00 00 80 ff 77 00 00 49 01 f8 48 0f 42 05 3a 87 96 00 49 01 c0 48 b8 00 00 00 00 00 ea ff ff 49 c1 e8 0c 49 c1 e0 06 49 01 c0 <49> 8b 00 f6 c4 80 74 04 4d 8b 40 30 49 8b 00 a8 80 75 22 49 f7
[ 39.507871] RIP [<ffffffff810a78ee>] kfree+0x41/0xe2
[ 39.507882] RSP <ffff880099791a40>
[ 39.507887] CR2: ffffec2000000900
[ 39.507895] ---[ end trace bf1d9379f65c36f8 ]--


RE: Radeon OSS with vdpau (howto) - fritsch - 2013-12-20

Try the kernel version in here: https://github.com/fritsch/linux/commits/drm-fixes-3.13
whichs is: http://cgit.freedesktop.org/~agd5f/linux/log/?h=drm-fixes-3.13 + the latest artifacts patch


RE: Radeon OSS with vdpau (howto) - ixbeemce - 2013-12-20

(2013-12-13, 13:11)fritsch Wrote: Works for me on Marantz. So, as long as you need to stick to 60hz. Just disable all the hd audio codecs (DTS-Hd, TrueHD) - it will put out as LCPM, when your speaker config is set correctly. TrueHD without quality loss, for DTS-HD we use the DTS and decoder that one as ffmpeg does not have a DTS-HD decoder.

It's worth filing a bug with the alsa people for it - but i have seen really bad things with Denon AVRs to no available ...

@fritsch

Back with the DTS-HD problem:

Of course it’s are workaround to switch to DTS, but not really satisfying.

I tried to localize were the problem could be.
So I installed in parallel Windows8 (with newest patches and drivers) and XBMC 13 on my HTPC.
If I configure in XBMC system the audio, XBMC offers two different HDMI interfaces:
1. Direct-Sound: HDMI-1-Denon-AVAMP
2. WASAPI: HDMI-1-Denon-AVAMP
If I configure 1 there if the same behaviour as in Linux-XBMC: periodic distortions and gaps in DTS-HD
If configure 2 DTS-HD runs perfect. The AVR signals DTS-HD and it works on all frame-rates, so the DENON-AVR is capable the handle DTS-HD at all frame rates.

Conclusion:
For my understanding the problem is located somewhere in XBMC or in the Linux audio drivers (ALSA?)
May be ALSA should perform like WASAPI.


RE: Radeon OSS with vdpau (howto) - fritsch - 2013-12-20

It's a driver thing. We cannot do anything about it. Retry with latest / greatest - see the updated kernels I posted. Also make sure, you edit your init script, I added one line to priorize the Sink which writes the Audio data. If all that does not help, which I think it does not, post your problems on the ALSA user mailing list.

As you don't get any dts-hd also in plain system with != 60hz, it's not an xbmc fault. Make some tests with aplay to confirm.


RE: Radeon OSS with vdpau (howto) - Kablam - 2013-12-20

I see the glitches to with the latest kernel check vids ( can be hard to see)

playback of 720p mkv glitch video (hard to see here small glitches)

playback of rarcompressed 720p mkv glitch video (easier to see here large glitches)

my log files:
dmesg | pastebinit -> http://paste.ubuntu.com/6605418/
cat ~/.xbmc/temp/xbmc.log | pastebinit -> http://paste.ubuntu.com/6605418/
cat /var/log/Xorg.0.log | pastebinit -> http://paste.ubuntu.com/6605413/
DISPLAY=:0 vdpauinfo | pastebinit -> http://paste.ubuntu.com/6605416/
dpkg -l |grep mesa | pastebinit -> http://paste.ubuntu.com/6605418/


RE: Radeon OSS with vdpau (howto) - ixbeemce - 2013-12-20

(2013-12-20, 12:12)fritsch Wrote: It's a driver thing. We cannot do anything about it. Retry with latest / greatest - see the updated kernels I posted. Also make sure, you edit your init script, I added one line to priorize the Sink which writes the Audio data. If all that does not help, which I think it does not, post your problems on the ALSA user mailing list.

As you don't get any dts-hd also in plain system with != 60hz, it's not an xbmc fault. Make some tests with aplay to confirm.

@fritsch
Thx for answering.

I installed the actual kernel, but now I run into a forther problem. I have also running VMware Workstation on my HTPC and with linux kernel 3.12 it works. But now with kernel 3.13.0-rc3-drm-fixes14-v999-na+
I got errors if VMware tries to build its drivers.
see error log:
http://paste.ubuntu.com/6605402/

any idea&


RE: Radeon OSS with vdpau (howto) - deadite66 - 2013-12-20

vmware drivers won't build with 3.13 yet.
unlikely they will fix them until 3.13 is official, though sometimes you can find a patch someone has made.


RE: Radeon OSS with vdpau (howto) - libgradev - 2013-12-20

(2013-12-19, 08:59)fritsch Wrote: Okay :-)

Now, that we have solved that issue, I will update the first post. From a technical point of view, we are done now. xbmc on AMD will be working fine after 3.13 ist released and those patches are in. Xbmc will be ready with gotham. Mesa is ready as of 10.1. Yeah, was a nice partnership. Thanks all for boosting xbmc, mesa and amd hardware on linux.

Have you heard anything from the AMD guys about looking into the MPEG-2 lockups?


RE: Radeon OSS with vdpau (howto) - deadite66 - 2013-12-20

didn't the last patch work for you libgradev?, it should be fixed in newer kernels.
drm/radeon: fix typo in fetching mpll params


RE: Radeon OSS with vdpau (howto) - EricV - 2013-12-20

(2013-12-20, 00:21)fritsch Wrote: Try the kernel version in here: https://github.com/fritsch/linux/commits/drm-fixes-3.13
whichs is: http://cgit.freedesktop.org/~agd5f/linux/log/?h=drm-fixes-3.13 + the latest artifacts patch

@fritsch Will do over the week-end. Thanks for suggestion.

Is there someone using a sapphire edge vs8? I consider buying one once the price and availability will be more favorable but would like to know if it works almots out of the box.


RE: Radeon OSS with vdpau (howto) - libgradev - 2013-12-20

(2013-12-20, 16:43)deadite66 Wrote: didn't the last patch work for you libgradev?, it should be fixed in newer kernels.
drm/radeon: fix typo in fetching mpll params

Nope, I posted back a while ago about that patch. Tried fritsch's kernel with it in and a later rc3 that I compiled - both caused worse issues.

I posted back to the bug tracker but there's been no response Sad


RE: Radeon OSS with vdpau (howto) - deadite66 - 2013-12-20

Christian just pushed a new patch (dri.devel list) for UVD, no idea if it effects anyone here.

Code:
[PATCH] drm/radeon: fix UVD 256MB check
From: Christian König
Date: Friday 20 Dec 2013 16:48:54
To: [email protected]
Groups: gmane.comp.video.dri.devel

Otherwise the kernel might reject our decoding requests.

Signed-off-by: Christian König
Cc: [email protected]
---
 drivers/gpu/drm/radeon/radeon_uvd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/radeon/radeon_uvd.c b/drivers/gpu/drm/radeon/radeon_uvd.c
index 373d088..b9c0529 100644
--- a/drivers/gpu/drm/radeon/radeon_uvd.c
+++ b/drivers/gpu/drm/radeon/radeon_uvd.c
@@ -473,7 +473,7 @@ static int radeon_uvd_cs_reloc(struct radeon_cs_parser *p,
                return -EINVAL;
        }
 
-       if ((start >> 28) != (end >> 28)) {
+       if ((start >> 28) != ((end - 1) >> 28)) {
                DRM_ERROR("reloc %LX-%LX crossing 256MB boundary!\n",
                          start, end);
                return -EINVAL;
1.8.1.2