Please squash this with your other patch. One more comment inline


Am 2022-03-17 um 16:24 schrieb Tushar Patel:
---
  drivers/gpu/drm/amd/amdkfd/kfd_device.c | 10 +---------
  1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device.c 
b/drivers/gpu/drm/amd/amdkfd/kfd_device.c
index 39073f72fe5f..f95904d38d24 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_device.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_device.c
@@ -485,15 +485,7 @@ bool kgd2kfd_device_init(struct kfd_dev *kfd,
        /* Verify module parameters regarding mapped process number*/
        kfd->max_proc_per_quantum = kfd->vm_info.vmid_num_kfd;
        if (hws_max_conc_proc != -1) {
-               if ((hws_max_conc_proc > 0)
-                               && (hws_max_conc_proc < 
kfd->vm_info.vmid_num_kfd)) {
-                       kfd->max_proc_per_quantum = hws_max_conc_proc;
-               } else {
-                                       dev_err(kfd_device,
-                               "hws_max_conc_proc %d must be between 0 and %d, use 
%d instead\n",
-                               hws_max_conc_proc, kfd->vm_info.vmid_num_kfd,
-                               kfd->vm_info.vmid_num_kfd);
-               }
+               kfd->max_proc_per_quantum = min(hws_max_conc_proc, 
kfd->vm_info.vmid_num_kfd);
        }

You can remove the braces {}.

Regards,
  Felix


/* calculate max size of mqds needed for queues */

Reply via email to