summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/radeon/radeon_object.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2016-02-18 17:10:59 +0300
committerMark Brown <broonie@kernel.org>2016-02-18 17:10:59 +0300
commit499e49b6d3a4c2ba21c175aa43a7d296724643c3 (patch)
treeefc6616cbfb571af30b37f203b26e49d1ccafbd9 /drivers/gpu/drm/radeon/radeon_object.c
parent6aa800ca65b1788e8c2e4ffd1e57a4c4355fe0ed (diff)
parent4dd638f8ac6b4ed020297b5d994d9346b84f2009 (diff)
downloadlinux-499e49b6d3a4c2ba21c175aa43a7d296724643c3.tar.xz
Merge tag 'spi-fix-v4.5-rc4' into spi-imx
spi: Fixes for v4.5 A small clutch of driver specific fixes. The OMAP one is a bit worrying since it seems to be triggered by some changes in the runtime PM core code and I suspect there's other drivers across that are going to be using the same pattern outside of OMAP but nothing seems to be coming up in the testing people are doing.
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_object.c')
-rw-r--r--drivers/gpu/drm/radeon/radeon_object.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_object.c b/drivers/gpu/drm/radeon/radeon_object.c
index 84d45633d28c..fb6ad143873f 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,12 @@ 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);