Skip to contentSkip to conversation

drm/amdgpu: fix incorrect vm flags to map bo

PATCH In review Jack Xiao 2 participants 2 messages Aug 12, 2025

Subsystems (2)
lore
Share & tools
lore

Jack Xiao

author
#0 lore raw

PATCH 1/1 drm/amdgpu: fix incorrect vm flags to map bo

It should use vm flags instead of pte flags
to specify bo vm attributes.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c +2 -2
index 02138aa55793..dfb6cfd83760 100644
@@ -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);
Signature · 1 line
2.41.0
Reviewed-by on v1 1/1
#1 lore raw

[AMD Official Use Only - AMD Internal Distribution Only]

Regards,
Likun

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Jack Xiao
Sent: Tuesday, August 12, 2025 11:57 AM
To: [email protected]
Cc: Xiao, Jack <[email protected]>
Subject: [PATCH] drm/amdgpu: fix incorrect vm flags to map bo

It should use vm flags instead of pte flags to specify bo vm attributes.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c +2 -2
index 02138aa55793..dfb6cfd83760 100644
@@ -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);

--
2.41.0