* [PATCH] drm/amdgpu: mask out WC from BO on unsupported arches
@ 2016-03-02 11:59 Oded Gabbay
2016-03-02 17:31 ` Greg KH
0 siblings, 1 reply; 2+ messages in thread
From: Oded Gabbay @ 2016-03-02 11:59 UTC (permalink / raw)
To: gregkh, stable; +Cc: Alex Deucher
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
sha-1 of upstream patch: a187f17f0e15a046aa5d7263b35df55230d92779
fwiw, the upstream patch applied cleanly
---
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
index c3ce103..3ebee3c 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
@@ -33,6 +33,7 @@
#include <linux/slab.h>
#include <drm/drmP.h>
#include <drm/amdgpu_drm.h>
+#include <drm/drm_cache.h>
#include "amdgpu.h"
#include "amdgpu_trace.h"
@@ -261,6 +262,13 @@ int amdgpu_bo_create_restricted(struct amdgpu_device *adev,
AMDGPU_GEM_DOMAIN_OA);
bo->flags = flags;
+
+ /* For architectures that don't support WC memory,
+ * mask out the WC flag from the BO
+ */
+ if (!drm_arch_can_wc_memory())
+ bo->flags &= ~AMDGPU_GEM_CREATE_CPU_GTT_USWC;
+
amdgpu_fill_placement_to_bo(bo, placement);
/* Kernel allocation are uninterruptible */
r = ttm_bo_init(&adev->mman.bdev, &bo->tbo, size, type,
--
2.5.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] drm/amdgpu: mask out WC from BO on unsupported arches
2016-03-02 11:59 [PATCH] drm/amdgpu: mask out WC from BO on unsupported arches Oded Gabbay
@ 2016-03-02 17:31 ` Greg KH
0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2016-03-02 17:31 UTC (permalink / raw)
To: Oded Gabbay; +Cc: stable, Alex Deucher
On Wed, Mar 02, 2016 at 01:59:08PM +0200, Oded Gabbay wrote:
> Reviewed-by: Christian K�nig <christian.koenig@amd.com>
> Reviewed-by: Michel D�nzer <michel.daenzer@amd.com>
> Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> Cc: stable@vger.kernel.org
>
> sha-1 of upstream patch: a187f17f0e15a046aa5d7263b35df55230d92779
>
> fwiw, the upstream patch applied cleanly
It did apply cleanly, odd, I wonder what went wrong here, maybe it
needed some other patches I hadn't applied yet?
Anyway, thanks for the backport, I'll queue it up for the next
4.4-stable release after this one.
greg k-h
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-03-02 17:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-02 11:59 [PATCH] drm/amdgpu: mask out WC from BO on unsupported arches Oded Gabbay
2016-03-02 17:31 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).