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

drm/amdgpu:no gpu scheduler for KIQ

KIQ is used for interaction between driver and
CP, and not exposed to outside client, as such it
doesn't need to be handled by GPU scheduler.

Signed-off-by: Monk Liu <Monk.Liu@amd.com>
Signed-off-by: Xiangliang Yu <Xiangliang.Yu@amd.com>
Signed-off-by: Trigger Huang <trigger.huang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Trigger Huang and committed by
Alex Deucher
e2250442 2068751d

+21 -18
+21 -18
drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
··· 382 382 if (!ring->fence_drv.fences) 383 383 return -ENOMEM; 384 384 385 - timeout = msecs_to_jiffies(amdgpu_lockup_timeout); 386 - if (timeout == 0) { 387 - /* 388 - * FIXME: 389 - * Delayed workqueue cannot use it directly, 390 - * so the scheduler will not use delayed workqueue if 391 - * MAX_SCHEDULE_TIMEOUT is set. 392 - * Currently keep it simple and silly. 393 - */ 394 - timeout = MAX_SCHEDULE_TIMEOUT; 395 - } 396 - r = amd_sched_init(&ring->sched, &amdgpu_sched_ops, 397 - num_hw_submission, 398 - timeout, ring->name); 399 - if (r) { 400 - DRM_ERROR("Failed to create scheduler on ring %s.\n", 401 - ring->name); 402 - return r; 385 + /* No need to setup the GPU scheduler for KIQ ring */ 386 + if (ring->funcs->type != AMDGPU_RING_TYPE_KIQ) { 387 + timeout = msecs_to_jiffies(amdgpu_lockup_timeout); 388 + if (timeout == 0) { 389 + /* 390 + * FIXME: 391 + * Delayed workqueue cannot use it directly, 392 + * so the scheduler will not use delayed workqueue if 393 + * MAX_SCHEDULE_TIMEOUT is set. 394 + * Currently keep it simple and silly. 395 + */ 396 + timeout = MAX_SCHEDULE_TIMEOUT; 397 + } 398 + r = amd_sched_init(&ring->sched, &amdgpu_sched_ops, 399 + num_hw_submission, 400 + timeout, ring->name); 401 + if (r) { 402 + DRM_ERROR("Failed to create scheduler on ring %s.\n", 403 + ring->name); 404 + return r; 405 + } 403 406 } 404 407 405 408 return 0;