From 478f914edb5e830e58ff4cdabc35e0ac420572f3 Mon Sep 17 00:00:00 2001 From: user Date: Wed, 18 Sep 2024 16:46:53 +0800 Subject: [PATCH] anolis: Close AMDGPU_GEM_CREATE_CPU_GTT_USWC if amd bo is not created on VRAM ANBZ: #33992 Close AMDGPU_GEM_CREATE_CPU_GTT_USWC if the AMD BO is not created in VRAM. Signed-off-by: user Signed-off-by: Juxin Gao --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c index 4e9ae52ef9fd..46c0fcfcb7a0 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c @@ -600,7 +600,7 @@ int amdgpu_bo_create(struct amdgpu_device *adev, /* For GPUs without spatial partitioning */ bo->xcp_id = 0; - if (!amdgpu_bo_support_uswc(bo->flags)) + if (!amdgpu_bo_support_uswc(bo->flags) || !(bp->domain & AMDGPU_GEM_DOMAIN_VRAM)) bo->flags &= ~AMDGPU_GEM_CREATE_CPU_GTT_USWC; if (adev->ras_enabled) -- Gitee