Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amdkfd: Minor cleanups

These were missed previously when rebasing changes for upstreaming.

v2: Remove redundant sched_policy conditions

Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com>
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>

authored by

Felix Kuehling and committed by
Oded Gabbay
894a8293 096d1a3e

+7 -7
+4 -6
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
··· 389 389 if (sched_policy != KFD_SCHED_POLICY_NO_HWS) { 390 390 retval = unmap_queues_cpsch(dqm, 391 391 KFD_UNMAP_QUEUES_FILTER_DYNAMIC_QUEUES, 0); 392 - if (retval != 0) { 392 + if (retval) { 393 393 pr_err("unmap queue failed\n"); 394 394 goto out_unlock; 395 395 } 396 - } else if (sched_policy == KFD_SCHED_POLICY_NO_HWS && 397 - prev_active && 396 + } else if (prev_active && 398 397 (q->properties.type == KFD_QUEUE_TYPE_COMPUTE || 399 398 q->properties.type == KFD_QUEUE_TYPE_SDMA)) { 400 399 retval = mqd->destroy_mqd(mqd, q->mqd, ··· 420 421 421 422 if (sched_policy != KFD_SCHED_POLICY_NO_HWS) 422 423 retval = map_queues_cpsch(dqm); 423 - else if (sched_policy == KFD_SCHED_POLICY_NO_HWS && 424 - q->properties.is_active && 424 + else if (q->properties.is_active && 425 425 (q->properties.type == KFD_QUEUE_TYPE_COMPUTE || 426 426 q->properties.type == KFD_QUEUE_TYPE_SDMA)) 427 427 retval = mqd->load_mqd(mqd, q->mqd, q->pipe, q->queue, ··· 830 832 831 833 if (q->properties.type == KFD_QUEUE_TYPE_SDMA) { 832 834 retval = allocate_sdma_queue(dqm, &q->sdma_id); 833 - if (retval != 0) 835 + if (retval) 834 836 goto out; 835 837 q->properties.sdma_queue_id = 836 838 q->sdma_id / CIK_SDMA_QUEUES_PER_ENGINE;
+2
drivers/gpu/drm/amd/amdkfd/kfd_priv.h
··· 507 507 * In any process, the thread that started main() is the lead 508 508 * thread and outlives the rest. 509 509 * It is here because amd_iommu_bind_pasid wants a task_struct. 510 + * It can also be used for safely getting a reference to the 511 + * mm_struct of the process. 510 512 */ 511 513 struct task_struct *lead_thread; 512 514
+1 -1
drivers/gpu/drm/amd/amdkfd/kfd_process.c
··· 416 416 err = amd_iommu_bind_pasid(dev->pdev, p->pasid, 417 417 p->lead_thread); 418 418 if (err < 0) { 419 - pr_err("unexpected pasid %d binding failure\n", 419 + pr_err("Unexpected pasid %d binding failure\n", 420 420 p->pasid); 421 421 mutex_unlock(&p->mutex); 422 422 break;