diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2015-08-16 22:55:02 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2015-08-17 16:50:31 -0400 |
commit | b80d8475c1fdf5f4bcabb65168b2e8a9c3d77731 (patch) | |
tree | 0e07771878992e8e4d5bd5a3c2cc7c7f810aad4c /drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | |
parent | a72ce6f84109c1dec1ab236d65979d3250668af3 (diff) | |
download | lwn-b80d8475c1fdf5f4bcabb65168b2e8a9c3d77731.tar.gz lwn-b80d8475c1fdf5f4bcabb65168b2e8a9c3d77731.zip |
drm/amdgpu: add scheduler initialization
1. Add kernel parameter option, default 0
2. Add scheduler initialization for amdgpu
Signed-off-by: Chunming Zhou <David1.Zhou@amd.com>
Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com>
Acked-by: Christian K?nig <christian.koenig@amd.com>
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c index 1b0bc07d0c01..4edeb90e7227 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c @@ -902,6 +902,14 @@ void amdgpu_fence_driver_init_ring(struct amdgpu_ring *ring) INIT_DELAYED_WORK(&ring->fence_drv.lockup_work, amdgpu_fence_check_lockup); ring->fence_drv.ring = ring; + + if (amdgpu_enable_scheduler) { + ring->scheduler = amd_sched_create((void *)ring->adev, + NULL, ring->idx, 5, 0); + if (!ring->scheduler) + DRM_ERROR("Failed to create scheduler on ring %d.\n", + ring->idx); + } } /** @@ -950,6 +958,8 @@ void amdgpu_fence_driver_fini(struct amdgpu_device *adev) wake_up_all(&adev->fence_queue); amdgpu_irq_put(adev, ring->fence_drv.irq_src, ring->fence_drv.irq_type); + if (ring->scheduler) + amd_sched_destroy(ring->scheduler); ring->fence_drv.initialized = false; } mutex_unlock(&adev->ring_lock); |