]> www.infradead.org Git - users/hch/misc.git/commitdiff
Reapply "drm/amdgpu: fix incorrect vm flags to map bo"
authorJack Xiao <Jack.Xiao@amd.com>
Mon, 25 Aug 2025 17:41:23 +0000 (13:41 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 27 Aug 2025 17:57:50 +0000 (13:57 -0400)
It should use vm flags instead of pte flags
to specify bo vm attributes.

This reverts commit 1263ceea2a1327014d9de2858a122f3c27dfa4dd.

Reapply this patch with the proper fixes tag.

Fixes: 6716a823d18d ("drm/amdgpu: rework how PTE flags are generated v3")
Signed-off-by: Jack Xiao <Jack.Xiao@amd.com>
Reviewed-by: Likun Gao <Likun.Gao@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c

index 02138aa557935e4c483484480b9ed4d05689bb71..dfb6cfd83760697ab229b9cb1453248fe8df09d6 100644 (file)
@@ -88,8 +88,8 @@ int amdgpu_map_static_csa(struct amdgpu_device *adev, struct amdgpu_vm *vm,
        }
 
        r = amdgpu_vm_bo_map(adev, *bo_va, csa_addr, 0, size,
-                            AMDGPU_PTE_READABLE | AMDGPU_PTE_WRITEABLE |
-                            AMDGPU_PTE_EXECUTABLE);
+                            AMDGPU_VM_PAGE_READABLE | AMDGPU_VM_PAGE_WRITEABLE |
+                            AMDGPU_VM_PAGE_EXECUTABLE);
 
        if (r) {
                DRM_ERROR("failed to do bo_map on static CSA, err=%d\n", r);