diff options
author | Chunming Zhou <David1.Zhou@amd.com> | 2017-05-11 14:52:48 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-05-24 17:40:35 -0400 |
commit | b9bf33d5ac55aa9f23b60b4d03017b2e59d02f02 (patch) | |
tree | c7a96a865aa57fd9ede91b02c9c49aa01364875f /drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | |
parent | df83d1ebc9e304fa3ba4bf79dba76418789a77cf (diff) |
drm/amdgpu: make pipeline sync be in same place v2
v2: directly return for 'if' case.
Signed-off-by: Chunming Zhou <David1.Zhou@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c index 631a9f77b973..cb9472f52e8c 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | |||
@@ -121,7 +121,7 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned num_ibs, | |||
121 | { | 121 | { |
122 | struct amdgpu_device *adev = ring->adev; | 122 | struct amdgpu_device *adev = ring->adev; |
123 | struct amdgpu_ib *ib = &ibs[0]; | 123 | struct amdgpu_ib *ib = &ibs[0]; |
124 | struct dma_fence *tmp; | 124 | struct dma_fence *tmp = NULL; |
125 | bool skip_preamble, need_ctx_switch; | 125 | bool skip_preamble, need_ctx_switch; |
126 | unsigned patch_offset = ~0; | 126 | unsigned patch_offset = ~0; |
127 | struct amdgpu_vm *vm; | 127 | struct amdgpu_vm *vm; |
@@ -163,8 +163,8 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned num_ibs, | |||
163 | } | 163 | } |
164 | 164 | ||
165 | if (ring->funcs->emit_pipeline_sync && job && | 165 | if (ring->funcs->emit_pipeline_sync && job && |
166 | (tmp = amdgpu_sync_get_fence(&job->sched_sync))) { | 166 | ((tmp = amdgpu_sync_get_fence(&job->sched_sync)) || |
167 | job->need_pipeline_sync = true; | 167 | amdgpu_vm_need_pipeline_sync(ring, job))) { |
168 | amdgpu_ring_emit_pipeline_sync(ring); | 168 | amdgpu_ring_emit_pipeline_sync(ring); |
169 | dma_fence_put(tmp); | 169 | dma_fence_put(tmp); |
170 | } | 170 | } |