Bug 98097

Summary: [Regression, bissected] [EXA, TearFree] Visual corruption
Product: xorg Reporter: Artem Chudinov <arzeth0>
Component: Driver/RadeonAssignee: xf86-video-ati maintainers <xorg-driver-ati>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: critical    
Priority: medium    
Version: git   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
errors in dmesg (1366x768 (LVDS) and 1920x1080 (VGA) monitors) on linux 4.4.0-36
none
Restore location of radeon_set_pixmap_bo call in drmmode_create_bo_pixmap none

Description Artem Chudinov 2016-10-05 16:00:24 UTC
Created attachment 127030 [details]
errors in dmesg (1366x768 (LVDS) and 1920x1080 (VGA) monitors) on linux 4.4.0-36

GPU: Mobility Radeon HD 5470 512MB (I don't have any integrated GPU).
Linux kernel 4.4.0-36-lowlatency x86_64. Also the same happens on 4.8.0.
Ubuntu 16.04 with Padoka PPA.

If "AccelMethod" is "Glamor" and "TearFree" is "Off", then all is ok.
If "AccelMethod" is "Glamor" and "TearFree" is "On", then all is ok.
If "AccelMethod" is "EXA"    and "TearFree" is "Off", then all is ok.
If "AccelMethod" is "EXA"    and "TearFree" is "On", then every ~0.1-~3.0 seconds (I guess some app is rerendering something...) my display shows one of 2-3 almost random visual messes (I guess it's random parts of random images from VRAM... And at one time 100% of my screen was RGB noise.).
The mouse cursor and its animation always looks ok unless I set Option "SWcursor" "on".

Option "DRI" "3" doesn't fix the bug.
Option "EXAPixmaps" "off" doesn't fix the bug.

No errors in Xorg.log.

(I selected bug severity=critical because I think a tear-free experience is a must-have in 2016.)

8523a733b6a5de6116a6332fefc871d4c32652d8 is the first bad commit
commit 8523a733b6a5de6116a6332fefc871d4c32652d8
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Mon Sep 12 18:54:33 2016 +0900

    Propagate failure from radeon_set_pixmap_bo
    
    (Ported from amdgpu commits c315c00e44afc91a7c8e2eab5af836d9643ebb88
     and 0d42082108c264568e2aadd15ace70e72388bc65)
Comment 1 Michel Dänzer 2016-10-12 09:58:25 UTC
Created attachment 127235 [details] [review]
Restore location of radeon_set_pixmap_bo call in drmmode_create_bo_pixmap

Does this patch fix the problem?
Comment 2 Artem Chudinov 2016-10-12 21:34:32 UTC
(In reply to Michel Dänzer from comment #1)
> Created attachment 127235 [details] [review] [review]
> Restore location of radeon_set_pixmap_bo call in drmmode_create_bo_pixmap
> 
> Does this patch fix the problem?

Yes, it does. I've tried videos (mpv with vaapi and vdpau), glxgears, glmark2, games with Wine - now everything works fine (and FPS didn't decrease). No more errors in dmesg.
Comment 3 Michel Dänzer 2016-10-14 01:12:46 UTC
Fixed in Git, thanks for the report and testing the fix.

commit d016f20b14ffe4f90f7457375b2d9f5cf0f5650f
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu Oct 13 16:33:45 2016 +0900

    Restore location of radeon_set_pixmap_bo call in drmmode_create_bo_pixmap

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.