Skip to contentSkip to conversation

drm/amdgpu: revert "use CPU for page table update if SDMA is unavailable"

PATCH In review Christian König 3 participants 3 messages Aug 27, 2024 – Aug 29, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu: revert "use CPU for page table update if SDMA is unavailable"

That is clearly not something we should do upstream. The SDMA is mandatory for the driver to work correctly.

We could do this for emulation and bringup, but in those cases the engineer should probably enabled CPU based updates manually.

This reverts commit 23335f9577e0b509c20ad8d65d9fdedd14545b55.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 6 ------
 1 file changed, 6 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +0 -6
index 3464a7a880f0..f0ccc560fd5c 100644
@@ -2392,7 +2392,6 @@ void amdgpu_vm_set_task_info(struct amdgpu_vm *vm)
 int amdgpu_vm_init(struct amdgpu_device *adev, struct amdgpu_vm *vm,
 		   int32_t xcp_id)
 {
-	struct amdgpu_ip_block *ip_block;
 	struct amdgpu_bo *root_bo;
 	struct amdgpu_bo_vm *root;
 	int r, i;
@@ -2422,11 +2421,6 @@ int amdgpu_vm_init(struct amdgpu_device *adev, struct amdgpu_vm *vm,
 	vm->use_cpu_for_update = !!(adev->vm_manager.vm_update_mode &
 				    AMDGPU_VM_USE_CPU_FOR_GFX);
 
-	/* use CPU for page table update if SDMA is unavailable */
-	ip_block = amdgpu_device_ip_get_ip_block(adev, AMD_IP_BLOCK_TYPE_SDMA);
-	if (!ip_block || ip_block->status.valid == false)
-		vm->use_cpu_for_update = true;
-
 	DRM_DEBUG_DRIVER("VM update mode is %s\n",
 			 vm->use_cpu_for_update ? "CPU" : "SDMA");
 	WARN_ONCE((vm->use_cpu_for_update &&
Signature · 1 line
2.34.1
Acked-by on v1 1/1
#1 lore raw
Quoted 9 lines · Christian König

That is clearly not something we should do upstream. The SDMA is mandatory for the driver to work correctly.

We could do this for emulation and bringup, but in those cases the engineer should probably enabled CPU based updates manually.

This reverts commit 23335f9577e0b509c20ad8d65d9fdedd14545b55.

Quoted 28 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 6 ------
  1 file changed, 6 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +0 -6
index 3464a7a880f0..f0ccc560fd5c 100644
@@ -2392,7 +2392,6 @@ void amdgpu_vm_set_task_info(struct amdgpu_vm *vm)
  int amdgpu_vm_init(struct amdgpu_device *adev, struct amdgpu_vm *vm,
  		   int32_t xcp_id)
  {
-	struct amdgpu_ip_block *ip_block;
  	struct amdgpu_bo *root_bo;
  	struct amdgpu_bo_vm *root;
  	int r, i;
@@ -2422,11 +2421,6 @@ int amdgpu_vm_init(struct amdgpu_device *adev, struct amdgpu_vm *vm,
  	vm->use_cpu_for_update = !!(adev->vm_manager.vm_update_mode &
  				    AMDGPU_VM_USE_CPU_FOR_GFX);
 
-	/* use CPU for page table update if SDMA is unavailable */
-	ip_block = amdgpu_device_ip_get_ip_block(adev, AMD_IP_BLOCK_TYPE_SDMA);
-	if (!ip_block || ip_block->status.valid == false)
-		vm->use_cpu_for_update = true;
-
  	DRM_DEBUG_DRIVER("VM update mode is %s\n",
  			 vm->use_cpu_for_update ? "CPU" : "SDMA");
  	WARN_ONCE((vm->use_cpu_for_update &&
Reviewed-by on v1 1/1
#2 lore raw
In reply to Christian König

[AMD Official Use Only - AMD Internal Distribution Only]

Best Regards,
Yifan

-----Original Message-----
From: Christian König <[email protected]>
Sent: Tuesday, August 27, 2024 10:16 PM
To: [email protected]
Cc: Zhang, Yifan <[email protected]>
Subject: [PATCH] drm/amdgpu: revert "use CPU for page table update if SDMA is unavailable"

That is clearly not something we should do upstream. The SDMA is mandatory for the driver to work correctly.

We could do this for emulation and bringup, but in those cases the engineer should probably enabled CPU based updates manually.

This reverts commit 23335f9577e0b509c20ad8d65d9fdedd14545b55.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 6 ------
 1 file changed, 6 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +0 -6
index 3464a7a880f0..f0ccc560fd5c 100644
@@ -2392,7 +2392,6 @@ void amdgpu_vm_set_task_info(struct amdgpu_vm *vm)  int amdgpu_vm_init(struct amdgpu_device *adev, struct amdgpu_vm *vm,
                   int32_t xcp_id)
 {
-       struct amdgpu_ip_block *ip_block;
        struct amdgpu_bo *root_bo;
        struct amdgpu_bo_vm *root;
        int r, i;
@@ -2422,11 +2421,6 @@ int amdgpu_vm_init(struct amdgpu_device *adev, struct amdgpu_vm *vm,
        vm->use_cpu_for_update = !!(adev->vm_manager.vm_update_mode &
                                    AMDGPU_VM_USE_CPU_FOR_GFX);
 
-       /* use CPU for page table update if SDMA is unavailable */
-       ip_block = amdgpu_device_ip_get_ip_block(adev, AMD_IP_BLOCK_TYPE_SDMA);
-       if (!ip_block || ip_block->status.valid == false)
-               vm->use_cpu_for_update = true;
-
        DRM_DEBUG_DRIVER("VM update mode is %s\n",
                         vm->use_cpu_for_update ? "CPU" : "SDMA");
        WARN_ONCE((vm->use_cpu_for_update &&

--
2.34.1