Bug 89720 - DRI PRIME offloading corrupts image in fullscreen with DRI3
Summary: DRI PRIME offloading corrupts image in fullscreen with DRI3
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/Radeon (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: xf86-video-ati maintainers
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-22 22:07 UTC by Adam Honse
Modified: 2015-04-03 02:06 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Don't attempt to flip to a pixmap from a different screen (442 bytes, patch)
2015-03-25 07:34 UTC, Michel Dänzer
no flags Details | Splinter Review
Xorg.0.log with change applied (86.60 KB, text/plain)
2015-03-30 22:13 UTC, Adam Honse
no flags Details
Don't flip between BOs with different tiling parameters (3.58 KB, patch)
2015-03-31 04:13 UTC, Michel Dänzer
no flags Details | Splinter Review

Description Adam Honse 2015-03-22 22:07:31 UTC
I have been running Oibaf's driver PPA and Sarnex's DRI3 testing PPA for the past few months, mainly to be able to play Windows games on Wine with Gallium-Nine support.

My system is an AMD A8-3870K APU (6550D integrated GPU) with a discrete Radeon HD 5870 2GB card as well.  The display (a 1080p TV) is connected via VGA to the integrated port on the motherboard.  I use the 5870 for gaming with DRI_PRIME=1.

I had been using EXA acceleration, kernels 3.19 and 4.0, and MATE desktop with no compositing just fine.  Offloading worked correctly for OpenGL and D3D9 alike.

With the recent changes to DRI3, I now am having graphical corruption when using PRIME to offload a fullscreen window.  It only affects fullscreen programs, windowed programs offload just fine.  I have tried both glamor and exa acceleration methods but the issue persists on both.  Corruption takes the form of blocky tiles which appear out of order and constant flickering.  If I use the integrated GPU both windowed and fullscreen programs work just fine.

I will upload a short video of the issue to demonstrate it.
Comment 1 Michel Dänzer 2015-03-25 07:34:54 UTC
Created attachment 114611 [details] [review]
Don't attempt to flip to a pixmap from a different screen

Does this patch fix the problem?

If not, please attach the full /var/log/Xorg.0.log file.
Comment 2 Adam Honse 2015-03-29 16:57:54 UTC
What package is this patch for?
Comment 3 Michel Dänzer 2015-03-30 01:13:07 UTC
(In reply to Adam Honse from comment #2)
> What package is this patch for?

xf86-video-ati, the one this bug report is assigned to.
Comment 4 Adam Honse 2015-03-30 22:12:50 UTC
It does not appear to fix the problem.

I will attach Xorg.0.log.
Comment 5 Adam Honse 2015-03-30 22:13:24 UTC
Created attachment 114738 [details]
Xorg.0.log with change applied
Comment 6 Adam Honse 2015-03-30 22:44:29 UTC
If I force that function to always return FALSE then the corruption goes away.
Comment 7 Michel Dänzer 2015-03-31 04:13:48 UTC
Created attachment 114742 [details] [review]
Don't flip between BOs with different tiling parameters

Does this patch help?
Comment 8 Adam Honse 2015-04-02 01:22:28 UTC
That patch did the trick, it's working great now!  I tested the same open source games I had the issue on before - OpenArena, SuperTuxKart, and Minetest as well as Skyrim running with Gallium Nine.  All of them seem to be working fine with PRIME now.
Comment 9 Michel Dänzer 2015-04-03 02:05:57 UTC
commit 5921ba4ca705a0d919515626088f3948cc4848c1
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Tue Mar 31 15:14:52 2015 +0900

    present: Don't flip between BOs with different tiling parameters
    
    The kernel driver doesn't handle that correctly yet.
    
    Fixes or at least avoids issues with OpenGL fullscreen apps with DRI3
    enabled and using PRIME or with (2D) tiling disabled.


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.