Bug 97029 - cik_sdma_copy_texture broken on Carrizo (mesa 12)
Summary: cik_sdma_copy_texture broken on Carrizo (mesa 12)
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Gallium/radeonsi (show other bugs)
Version: git
Hardware: Other All
: medium major
Assignee: Default DRI bug account
QA Contact: Default DRI bug account
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-21 18:13 UTC by Thomas J. Moore
Modified: 2016-08-25 12:57 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
xwd output with bug (640.54 KB, application/octet-stream)
2016-07-21 18:13 UTC, Thomas J. Moore
Details
distorted screenshot image (989.98 KB, image/png)
2016-07-22 19:27 UTC, Franklin Titus
Details
xwud results (132.32 KB, image/jpeg)
2016-07-23 01:42 UTC, Thomas J. Moore
Details

Description Thomas J. Moore 2016-07-21 18:13:53 UTC
Created attachment 125240 [details]
xwd output with bug

Mesa 12 corrupts large image displays in X on my hardware, using xf86-video-amdgpu 1.1.0 (glamor).  To reproduce, xwd | xwud.  The xwd capture is garbled (see attached), and xwud sprays the garbled mess in disconnected chunks to its right.  I noticed this in pre-12 git as well, but didn't report because I have limited net access and limited machine availability and hoped someone better equipped would discover and deal with it.  The commit which caused this is 70934de00eb42ba6fc43d104875962dfb260a1b3.  Removing the call to cik_sdma_copy_texture "fixes" it.  This was observed on two different machines, but similar hardware (A10 Carrizo).  Verfied still broken as of 4f89cf4941db0a5cd8a85b943121840000cf8e4f.
Comment 1 Nicolai Hähnle 2016-07-22 08:07:41 UTC
This could be related to the GPUVM faults discussed in this mailing list thread: https://lists.freedesktop.org/archives/amd-gfx/2016-June/000047.html
Comment 2 Franklin Titus 2016-07-22 19:27:09 UTC
Created attachment 125260 [details]
distorted screenshot image
Comment 3 Franklin Titus 2016-07-22 19:31:33 UTC
I have similar issue since upgrading to Mesa 12 on the same AMD hardware (A10 Carrizo). See attachment.
Comment 4 Thomas J. Moore 2016-07-23 01:42:20 UTC
Created attachment 125266 [details]
xwud results

Sorry for the poor quality, late posting, and the reflections in the image.  This is what the xwud output looks like.  Notice the perfectly fine rxvt on the left (except for the blue crap in it; that was caused by xwud).  The window in the middle is where xwud is supposed to put its output.  Instead, it lays wide stripes to its right (far enough to reach around back to the left).  Looks a lot like the stride and offset are wrong, but it also corrupts pixels in the top button bar.  Also, I wanted to make it clear that this affects xv, ImageMagick-display, xpdf, and many other apps, not just some ancient screen capture program.  The only thing keeping this from being a "major" issue is that it's easy to cure.
Comment 5 Michel Dänzer 2016-08-24 13:34:59 UTC
*** Bug 97119 has been marked as a duplicate of this bug. ***
Comment 6 Johannes Hirte 2016-08-24 19:33:56 UTC
Additional info here, as 97119 is a duplicate of this. The flickering happens even with R600_DEBUG=nodma. I don't even need to put the video to fullscreen. This time flickering was just starting with the video. I've seen similar flickering on a kabini system. Don't know, if this could be related. I've never seen this on r600 systems (cedar, sumo), so I don't think it's a KDE bug.
Comment 7 Marek Olšák 2016-08-24 21:35:58 UTC
Do you have the latest amdgpu firmware from http://git.kernel.org/cgit/linux/kernel/git/firmware/linux-firmware.git ?
Comment 8 Thomas J. Moore 2016-08-24 22:58:04 UTC
(In reply to Marek Olšák from comment #7)
> Do you have the latest amdgpu firmware from
> http://git.kernel.org/cgit/linux/kernel/git/firmware/linux-firmware.git ?

Do you know of a specific change to a carrizo firmware image that fixes this bug?  Because if not, I will not spend effort updating it.  A check against the current git head shows that I am not running the latest carrizo_vce.bin, but all others are up-to-date (including the ones suspiciously containing "sdma" in the name).  Unless you can verify that the vce image will magically fix this, I won't try it until it gets included in an official gentoo linux-firmware update.  Even if it is a firmware revision issue, there should be barrier code in the function to prevent old firmware from screwing up.

In the mean time, I strongly suggest disabling this function call entirely before releasing yet another broken Mesa.  Having random memory copies spray bytes all over the place based on size and alignment is completely unacceptable.
Comment 9 Marek Olšák 2016-08-25 00:16:09 UTC
If I had known about the issue, we wouldn't have committed the change.

Right now the plan is to disable SDMA texture copying for Carrizo on master and Mesa 12.0.
Comment 10 Thomas J. Moore 2016-08-25 01:09:44 UTC
(In reply to Marek Olšák from comment #9)
> Right now the plan is to disable SDMA texture copying for Carrizo on master
> and Mesa 12.0.

Fine by me.  Just wanted to make sure it was taken care of before the next Mesa release, in case you decide to wait more than a month to respond again, given approx. 2 months between Mesa releases.
Comment 11 Michel Dänzer 2016-08-25 05:55:09 UTC
(In reply to Johannes Hirte from comment #6)
> The flickering happens even with R600_DEBUG=nodma.

The flickering should be tracked separately from this report then. Feel free to re-open bug 97119 for that, but you'll need to provide more information about the flickering.
Comment 12 Marek Olšák 2016-08-25 12:57:35 UTC
SDMA texture copying was disabled on Carrizo by: 3ff0b67e1b6b492d5793c1580f4be0c6f58a1bc2

Closing.


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.