From: Oded Gabbay <oded.gabbay@gmail.com>
To: dri-devel@lists.freedesktop.org, alexdeucher@gmail.com
Cc: michel.daenzer@amd.com
Subject: [PATCH 2/3] drm/radeon: mask out WC from BO on unsupported arches
Date: Sat, 30 Jan 2016 07:59:33 +0200 [thread overview]
Message-ID: <1454133574-20527-2-git-send-email-oded.gabbay@gmail.com> (raw)
In-Reply-To: <1454133574-20527-1-git-send-email-oded.gabbay@gmail.com>
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
---
drivers/gpu/drm/radeon/radeon_object.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/gpu/drm/radeon/radeon_object.c b/drivers/gpu/drm/radeon/radeon_object.c
index 84d4563..255faf6 100644
--- a/drivers/gpu/drm/radeon/radeon_object.c
+++ b/drivers/gpu/drm/radeon/radeon_object.c
@@ -33,6 +33,7 @@
#include <linux/slab.h>
#include <drm/drmP.h>
#include <drm/radeon_drm.h>
+#include <drm/drm_cache.h>
#include "radeon.h"
#include "radeon_trace.h"
@@ -245,6 +246,13 @@ int radeon_bo_create(struct radeon_device *rdev,
DRM_INFO_ONCE("Please enable CONFIG_MTRR and CONFIG_X86_PAT for "
"better performance thanks to write-combining\n");
bo->flags &= ~(RADEON_GEM_GTT_WC | RADEON_GEM_GTT_UC);
+#else
+ /*
+ * For architectures that don't support WC memory,
+ * mask out the WC flag from the BO
+ */
+ if (!drm_arch_can_wc_memory())
+ bo->flags &= ~RADEON_GEM_GTT_WC;
#endif
radeon_ttm_placement_from_domain(bo, domain);
--
2.5.0
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2016-01-30 5:59 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-30 5:59 [PATCH 1/3] drm: add helper to check for wc memory support Oded Gabbay
2016-01-30 5:59 ` Oded Gabbay [this message]
2016-01-30 8:11 ` [PATCH 2/3] drm/radeon: mask out WC from BO on unsupported arches Michel Dänzer
2016-01-30 10:58 ` Oded Gabbay
2016-01-30 5:59 ` [PATCH 3/3] drm/amdgpu: " Oded Gabbay
2016-01-30 9:57 ` [PATCH 1/3] drm: add helper to check for wc memory support Christian König
2016-02-01 17:01 ` Alex Deucher
2016-02-02 12:01 ` Oded Gabbay
2016-02-02 15:07 ` Alex Deucher
2016-02-03 8:17 ` Oded Gabbay
2016-02-03 13:53 ` Alex Deucher
2016-02-03 14:00 ` Oded Gabbay
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=1454133574-20527-2-git-send-email-oded.gabbay@gmail.com \
--to=oded.gabbay@gmail.com \
--cc=alexdeucher@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=michel.daenzer@amd.com \
/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