drm/amdgpu: mask out WC from BO on unsupported arches
Subsystems (3)
PATCH 1/1 drm/amdgpu: mask out WC from BO on unsupported arches
Reviewed-by Christian König <[email protected]>
Reviewed-by Michel Dänzer <[email protected]>
Signed-off-by Oded Gabbay <[email protected]>
Signed-off-by Alex Deucher <[email protected]>
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(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +8 -0
@@ -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,
Signature · 1 line
2.5.0
Greg KH
maintainerQuoted 9 lines · Oded Gabbay
Reviewed-by Christian K�nig <[email protected]>Reviewed-by Michel D�nzer <[email protected]>Signed-off-by Oded Gabbay <[email protected]>Signed-off-by Alex Deucher <[email protected]>sha-1 of upstream patch:
a187f17f0e15a046aa5d7263b35df55230d92779fwiw, 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