Bug 91831 - Corrupted video output with 32bit kernel
Summary: Corrupted video output with 32bit kernel
Status: RESOLVED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/AMDgpu (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-31 23:39 UTC by Nils Holland
Modified: 2018-10-04 16:00 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Nils Holland 2015-08-31 23:39:40 UTC
I'm not entirely sure if this is the right place to mention this issue, but I'm fairly confident that the right people will see it here:

I'm using a Kabini GPU on a 32-bit (kernel + userland) system using linux 4.2 and have just decided to give the amdgpu kernel drm driver and xf86-video-amdgpu a try (previously I was using radeon). What I noticed is that screen output in X11 is garbled using these drivers - i.e. pixels are messed up / missing / corrupt in various places all over the screen.

I've seen this issue before in the radeon driver, there's actually a (resolved) bug report about it at https://bugs.freedesktop.org/show_bug.cgi?id=84627.

Back then, the bug was fixed in the kernel in linux/drivers/gpu/drm/radeon/radeon_object.c. Here's the relevant section (from radeon_bo_create()):

#ifdef CONFIG_X86_32
        /* XXX: Write-combined CPU mappings of GTT seem broken on 32-bit
         * See https://bugs.freedesktop.org/show_bug.cgi?id=84627
         */
        bo->flags &= ~RADEON_GEM_GTT_WC;

I'm not into this stuff enough, but I believe that in contrast to the radeon driver, the amdgpu driver does not disable write-combined CPU mappings on 32 bit kernels. The question is: Would it be possible and reasonable to change amdgpu to follow radeon in this regard and thus - hopefully - fix the garbled screen problem on 32 bit?

As a side note, the problem goes away when disabling hardware acceleration:

Option "NoAccel" "true"

Screen output looks good then. Still, this is probably not the best solution.
Comment 1 Dave Gregorich 2016-08-12 00:09:09 UTC
Exactly the same behavior occurs with Slackware 14.2, Kernel 4.4.14 32 bit, using the amdgpu driver on a Tonga GPU. The 64 bit Slackware system works properly.  Same question as previous report...
Comment 2 Nils Holland 2016-08-12 07:19:43 UTC
As the original reporter of this bug, I'd like to add that when enabling the xorg.conf option "ShadowPrimary" (see the amdgpu manpage), things also looked good again, without a need to disable hardware acceleration completely. I have to admit, though, that I'm not entirely sure about the (negative?) consequences of enabling this option.

I'm actually back on radeon for the time being, but the last time I checked this issue still seemed to happen on 32 bit systems using amdgpu.
Comment 3 Michel Dänzer 2018-10-04 16:00:03 UTC
This is fixed since kernel 4.11.


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.