Bug 94220

Summary: AccelMethod "none" breaks DRI2 and VDPAU on amdgpu
Product: xorg Reporter: csaba.halasz
Component: Driver/AMDgpuAssignee: xf86-video-ati maintainers <xorg-driver-ati>
Status: RESOLVED MOVED QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium    
Version: git   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
Xorg log none

Description csaba.halasz 2016-02-19 17:47:00 UTC
Created attachment 121847 [details]
Xorg log

As far as I understand accelmethod none should just disable 2D (glamor). The man page says:

"Setting this option to none disables use of the glamor acceleration architecture. In that case, all 2D rendering is done by the CPU, but 3D and video hardware acceleration can still work."

Also Xorg log seems to confirm this:

[ 55521.565] (II) AMDGPU(0): [DRI2] Setup complete
[ 55521.565] (II) AMDGPU(0): [DRI2]   DRI driver: radeonsi
[ 55521.565] (II) AMDGPU(0): [DRI2]   VDPAU driver: radeonsi
[ 55521.565] (II) AMDGPU(0): Front buffer pitch: 15360 bytes
[ 55521.566] (==) AMDGPU(0): DRI3 disabled
[ 55521.566] (==) AMDGPU(0): Backing store enabled
[ 55521.566] (II) AMDGPU(0): Direct rendering enabled
[ 55521.566] (II) AMDGPU(0): 2D acceleration disabled

Nevertheless running glxgears produces the following error:

X Error of failed request:  BadDrawable (invalid Pixmap or Window parameter)
  Major opcode of failed request:  152 (DRI2)
  Minor opcode of failed request:  8 (DRI2SwapBuffers           )
  Resource id in failed request:  0xe00002
  Serial number of failed request:  48
  Current serial number in output stream:  49

With this in the Xorg log:

[ 55718.984] (EE) AMDGPU(0): [DRI2] DRI2SwapBuffers: drawable has no back or front?

Running mplayer with -vo vdpau shows errors:

[vdpau] Error when calling vdp_presentation_queue_display: An invalid handle value was provided. Either the handle does not exist at all, or refers to an object of an incorrect type.
X11 error: BadAlloc (insufficient resources for operation)

Version info: Xorg 1.18, amdgpu git a3eac85d
Comment 1 Andy Furniss 2016-02-20 01:04:18 UTC
Using Xserver 1.18.1 + git amsgpu I don't get the fails.

It's really slow, though. 

glxgears apparently using h/w (says synced to refresh) but 12 fps, vdpau about 1 fps.
Comment 2 Michel Dänzer 2016-02-22 06:59:53 UTC
(In reply to Andy Furniss from comment #1)
> Using Xserver 1.18.1 + git amsgpu I don't get the fails.
> 
> It's really slow, though. 
> 
> glxgears apparently using h/w (says synced to refresh) but 12 fps, vdpau
> about 1 fps.

That's because of

(In reply to csaba.halasz from comment #0)
> "Setting this option to none disables use of the glamor acceleration
> architecture. In that case, all 2D rendering is done by the CPU, [...]

"All 2D rendering" includes the copies for DRI2SwapBuffers, used for GLX buffer swaps and VDPAU presentation.

Generally, this option is only intended for bringing up a 3D driver, not for normal usage. So the bad news is that fixing this problem has very low priority, but the good news is that you're not really missing anything. :)
Comment 3 Martin Peres 2019-11-19 07:20:01 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xorg/driver/xf86-video-amdgpu/issues/2.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.