On Thu, 10 Jan 2019 at 17:14, Carsten Haitzler Carsten.Haitzler@arm.com wrote:
On 09/01/2019 21:10, Ard Biesheuvel wrote:
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c @@ -180,7 +180,9 @@ void amdgpu_bo_placement_from_domain(struct amdgpu_bo *abo, u32 domain) places[c].fpfn = 0; places[c].lpfn = 0; places[c].flags = TTM_PL_FLAG_SYSTEM;
if (flags & AMDGPU_GEM_CREATE_CPU_GTT_USWC)
if (!IS_ENABLED(CONFIG_ARM64) &&
!IS_ENABLED(CONFIG_ARM) &&
(flags & AMDGPU_GEM_CREATE_CPU_GTT_USWC)) places[c].flags |= TTM_PL_FLAG_WC | TTM_PL_FLAG_UNCACHED; else
Patch fails against my mainline Linux tree. which section does it modify?
if (domain & AMDGPU_GEM_DOMAIN_GTT) {
or
if (domain & AMDGPU_GEM_DOMAIN_CPU) {
it looks like it should be the latter. You'd need similar changes to radeon as well right?
This is the radeon change that fixes things for me carried over to amdgpu.
Instead, you could test the patch I posted, which amounts to the same thing (i.e., ignore the WC flag, since afaict, it is only ever used to downgrade from cached mappings, rather than upgrade from uncached)