From: Nils Holland <nholland@tisys.org>
To: dri-devel@lists.freedesktop.org
Cc: linux-kernel@vger.kernel.org
Subject: amdgpu: Corrupted video on 32 bit systems (possible fix)
Date: Thu, 19 Jan 2017 20:35:38 +0100 [thread overview]
Message-ID: <20170119193537.GA3296@teela.fritz.box> (raw)
Hi folks,
there seems to be an issue on 32 bit kernels which makes graphics
output look all messed up under X when using the amdgpu drm kernel
driver.
In fact, the same issue was present at some time in 2015 using the
radeon driver too, but it has been fixed a long time ago, as can be
seen here:
https://bugs.freedesktop.org/show_bug.cgi?id=84627#c35
Now, I reported the same issue in conjunction with the amdgpu driver
back when I first noticed it back then. Nothing has happened since
then, but my bug report can still be found here:
https://bugs.freedesktop.org/show_bug.cgi?id=91831
Personally, I had been using the (working) radeon driver again, and
only today I decided to check if the issue in amdgpu still exists. And
yes, it seems so: I still get garbled output when using a current
kernel with a current version of the amdgpu driver.
Now, I've tried to just "port" the fix that had been done to the radeon
driver in 2015 (see the first link above) to the amdgpu driver and created
myself the following little patch:
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c 2016-12-11 20:17:54.000000000 +0100
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c 2017-01-19 15:38:56.972034489 +0100
@@ -372,6 +372,10 @@
if (!drm_arch_can_wc_memory())
bo->flags &= ~AMDGPU_GEM_CREATE_CPU_GTT_USWC;
+ #ifdef CONFIG_X86_32
+ bo->flags &= ~AMDGPU_GEM_CREATE_CPU_GTT_USWC;
+ #endif
+
amdgpu_fill_placement_to_bo(bo, placement);
/* Kernel allocation are uninterruptible */
r = ttm_bo_init(&adev->mman.bdev, &bo->tbo, size, type,
With this patch, the amdgpu driver works fine for me on my 32 bit
kernel: All graphics output looks the way it's supposed to, even with
full acceleration enabled - great!
I'd suggest that it might be a good idea to put to apply the above
patch or something similar to the official sources.
Note that I've only experienced the issue and successfully tried the
patch on one GPU, namely my...:
00:01.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Kabini [Radeon HD 8210]
...and cannot say anything about how things look with 32 bit and other
cards supported by amdgpu, except for the fact that another user has
reported the same issue with a Tonga GPU (see the comments in the
second link above), and I'm pretty sure that this change would help in
his and similar cases, too.
Greetings
Nils
next reply other threads:[~2017-01-19 19:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-19 19:35 Nils Holland [this message]
2017-01-20 2:47 ` Michel Dänzer
2017-01-20 7:44 ` Nils Holland
2017-01-20 9:11 ` Christian König
2017-01-20 9:11 ` Michel Dänzer
2017-01-20 12:07 ` Nils Holland
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170119193537.GA3296@teela.fritz.box \
--to=nholland@tisys.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome