diff options
author | Christian König <christian.koenig@amd.com> | 2016-02-01 05:56:35 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-02-10 14:17:21 -0500 |
commit | ec72b8006c1e69f633e3def3e3b3c7c6318d271c (patch) | |
tree | 2be40bec1e855f1486bdec058c8099510e7ba9d0 /drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | |
parent | b07c60c0652c497af0c42c1278941f7c5a187fe9 (diff) |
drm/amdgpu: directly return fence from ib_schedule
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@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 | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c index 47196ec593fc..4b2c176b83f2 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | |||
@@ -104,6 +104,7 @@ void amdgpu_ib_free(struct amdgpu_device *adev, struct amdgpu_ib *ib) | |||
104 | * @num_ibs: number of IBs to schedule | 104 | * @num_ibs: number of IBs to schedule |
105 | * @ibs: IB objects to schedule | 105 | * @ibs: IB objects to schedule |
106 | * @owner: owner for creating the fences | 106 | * @owner: owner for creating the fences |
107 | * @f: fence created during this submission | ||
107 | * | 108 | * |
108 | * Schedule an IB on the associated ring (all asics). | 109 | * Schedule an IB on the associated ring (all asics). |
109 | * Returns 0 on success, error on failure. | 110 | * Returns 0 on success, error on failure. |
@@ -119,7 +120,8 @@ void amdgpu_ib_free(struct amdgpu_device *adev, struct amdgpu_ib *ib) | |||
119 | * to SI there was just a DE IB. | 120 | * to SI there was just a DE IB. |
120 | */ | 121 | */ |
121 | int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned num_ibs, | 122 | int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned num_ibs, |
122 | struct amdgpu_ib *ibs, void *owner) | 123 | struct amdgpu_ib *ibs, void *owner, |
124 | struct fence **f) | ||
123 | { | 125 | { |
124 | struct amdgpu_device *adev = ring->adev; | 126 | struct amdgpu_device *adev = ring->adev; |
125 | struct amdgpu_ib *ib = &ibs[0]; | 127 | struct amdgpu_ib *ib = &ibs[0]; |
@@ -200,6 +202,9 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned num_ibs, | |||
200 | AMDGPU_FENCE_FLAG_64BIT); | 202 | AMDGPU_FENCE_FLAG_64BIT); |
201 | } | 203 | } |
202 | 204 | ||
205 | if (f) | ||
206 | *f = fence_get(&ib->fence->base); | ||
207 | |||
203 | amdgpu_ring_commit(ring); | 208 | amdgpu_ring_commit(ring); |
204 | return 0; | 209 | return 0; |
205 | } | 210 | } |