[PATCH] drm/amdkfd: keep create queue success if cwsr save area doesn't match

Yifan Zhang yifan1.zhang at amd.com
Thu Aug 8 08:44:21 UTC 2024


If HSA_OVERRIDE_GFX_VERSION is used in ROCm workload, user space
and kernel use different spec to calculate cwsr save area, current
check may fail create queue ioctl. Change error to warn to make
create queue succeed in that case.

Signed-off-by: Yifan Zhang <yifan1.zhang at amd.com>
---
 drivers/gpu/drm/amd/amdkfd/kfd_queue.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_queue.c b/drivers/gpu/drm/amd/amdkfd/kfd_queue.c
index e0a073ae4a49..9f283aff057a 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_queue.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_queue.c
@@ -295,11 +295,9 @@ int kfd_queue_acquire_buffers(struct kfd_process_device *pdd, struct queue_prope
 	}
 
 	if (properties->ctx_save_restore_area_size != topo_dev->node_props.cwsr_size) {
-		pr_debug("queue cwsr size 0x%x not equal to node cwsr size 0x%x\n",
+		pr_warn("queue cwsr size 0x%x not equal to node cwsr size 0x%x\n",
 			properties->ctx_save_restore_area_size,
 			topo_dev->node_props.cwsr_size);
-		err = -EINVAL;
-		goto out_err_unreserve;
 	}
 
 	total_cwsr_size = (topo_dev->node_props.cwsr_size + topo_dev->node_props.debug_memory_size)
-- 
2.37.3



More information about the amd-gfx mailing list