diff options
author | Lucas Stach <l.stach@pengutronix.de> | 2017-12-06 11:49:39 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-12-07 11:51:56 -0500 |
commit | 1b1f42d8fde4fef1ed7873bf5aa91755f8c3de35 (patch) | |
tree | 3039b957f8ef645419b5649d28dc7ece3e9ceecd /drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | |
parent | 9ce6aae12c66adf87b5861f8fa5705ea11d0b6ee (diff) |
drm: move amd_gpu_scheduler into common location
This moves and renames the AMDGPU scheduler to a common location in DRM
in order to facilitate re-use by other drivers. This is mostly a straight
forward rename with no code changes.
One notable exception is the function to_drm_sched_fence(), which is no
longer a inline header function to avoid the need to export the
drm_sched_fence_ops_scheduled and drm_sched_fence_ops_finished structures.
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c index 952e0bf3bc84..7db9556b389b 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | |||
@@ -76,7 +76,7 @@ static int amdgpu_ttm_global_init(struct amdgpu_device *adev) | |||
76 | { | 76 | { |
77 | struct drm_global_reference *global_ref; | 77 | struct drm_global_reference *global_ref; |
78 | struct amdgpu_ring *ring; | 78 | struct amdgpu_ring *ring; |
79 | struct amd_sched_rq *rq; | 79 | struct drm_sched_rq *rq; |
80 | int r; | 80 | int r; |
81 | 81 | ||
82 | adev->mman.mem_global_referenced = false; | 82 | adev->mman.mem_global_referenced = false; |
@@ -108,8 +108,8 @@ static int amdgpu_ttm_global_init(struct amdgpu_device *adev) | |||
108 | mutex_init(&adev->mman.gtt_window_lock); | 108 | mutex_init(&adev->mman.gtt_window_lock); |
109 | 109 | ||
110 | ring = adev->mman.buffer_funcs_ring; | 110 | ring = adev->mman.buffer_funcs_ring; |
111 | rq = &ring->sched.sched_rq[AMD_SCHED_PRIORITY_KERNEL]; | 111 | rq = &ring->sched.sched_rq[DRM_SCHED_PRIORITY_KERNEL]; |
112 | r = amd_sched_entity_init(&ring->sched, &adev->mman.entity, | 112 | r = drm_sched_entity_init(&ring->sched, &adev->mman.entity, |
113 | rq, amdgpu_sched_jobs, NULL); | 113 | rq, amdgpu_sched_jobs, NULL); |
114 | if (r) { | 114 | if (r) { |
115 | DRM_ERROR("Failed setting up TTM BO move run queue.\n"); | 115 | DRM_ERROR("Failed setting up TTM BO move run queue.\n"); |
@@ -131,7 +131,7 @@ error_mem: | |||
131 | static void amdgpu_ttm_global_fini(struct amdgpu_device *adev) | 131 | static void amdgpu_ttm_global_fini(struct amdgpu_device *adev) |
132 | { | 132 | { |
133 | if (adev->mman.mem_global_referenced) { | 133 | if (adev->mman.mem_global_referenced) { |
134 | amd_sched_entity_fini(adev->mman.entity.sched, | 134 | drm_sched_entity_fini(adev->mman.entity.sched, |
135 | &adev->mman.entity); | 135 | &adev->mman.entity); |
136 | mutex_destroy(&adev->mman.gtt_window_lock); | 136 | mutex_destroy(&adev->mman.gtt_window_lock); |
137 | drm_global_item_unref(&adev->mman.bo_global_ref.ref); | 137 | drm_global_item_unref(&adev->mman.bo_global_ref.ref); |