drm/amdkfd: Return proper error code for gws alloc API
Subsystems (3)
PATCH 1/1 drm/amdkfd: Return proper error code for gws alloc API
--- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 2 +- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 2 +- drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c +1 -1
@@ -2124,7 +2124,7 @@ int amdgpu_amdkfd_add_gws_to_process(void *info, void *gws, struct kgd_mem **mem *mem =kzalloc (sizeof (struct kgd_mem ),GFP_KERNEL );if (!*mem) -return -EINVAL ; +return -ENOMEM ;mutex_init (&(*mem)->lock); (*mem)->bo =amdgpu_bo_ref (gws_bo);
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c +1 -1
@@ -1576,7 +1576,7 @@ static int kfd_ioctl_alloc_queue_gws(struct file *filep,if (!hws_gws_support || dev->dqm->sched_policy ==KFD_SCHED_POLICY_NO_HWS ) -return -EINVAL ; +return -ENODEV ; dev =kfd_device_by_id (args->gpu_id);if (!dev) {
drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c +1 -1
@@ -103,7 +103,7 @@ int pqm_set_gws(struct process_queue_manager *pqm, unsigned int qid,/* Only allow one queue per process can have GWS assigned */ if (gws && pdd->qpd.num_gws) -return -EINVAL ; +return -EBUSY ;if (!gws && pdd->qpd.num_gws ==0 )return -EINVAL ;
Signature · 6 lines
2.7.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 1559073185-26048-1-git-send-email-Oak.Zeng-5C7GfCeVMHo@public.gmane.org
Deucher, Alexander
Reviewed-by________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of Zeng, Oak <[email protected]>
Sent: Tuesday, May 28, 2019 3:53 PM
To: [email protected]
Cc: Kuehling, Felix; Zeng, Oak
Subject: [PATCH] drm/amdkfd: Return proper error code for gws alloc API
--- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 2 +- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 2 +- drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c +1 -1
@@ -2124,7 +2124,7 @@ int amdgpu_amdkfd_add_gws_to_process(void *info, void *gws, struct kgd_mem **mem *mem =kzalloc (sizeof (struct kgd_mem ),GFP_KERNEL );if (!*mem) -return -EINVAL ; +return -ENOMEM ;mutex_init (&(*mem)->lock); (*mem)->bo =amdgpu_bo_ref (gws_bo);
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c +1 -1
@@ -1576,7 +1576,7 @@ static int kfd_ioctl_alloc_queue_gws(struct file *filep,if (!hws_gws_support || dev->dqm->sched_policy ==KFD_SCHED_POLICY_NO_HWS ) -return -EINVAL ; +return -ENODEV ; dev =kfd_device_by_id (args->gpu_id);if (!dev) {
drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c +1 -1
@@ -103,7 +103,7 @@ int pqm_set_gws(struct process_queue_manager *pqm, unsigned int qid,/* Only allow one queue per process can have GWS assigned */ if (gws && pdd->qpd.num_gws) -return -EINVAL ; +return -EBUSY ;if (!gws && pdd->qpd.num_gws ==0 )return -EINVAL ;
--
2.7.4
_______________________________________________
amd-gfx mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx