diff options
author | Christian König <christian.koenig@amd.com> | 2016-05-06 16:14:00 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-05-11 13:30:32 -0400 |
commit | 758ac17f963f3497aae4e767d3a9eb68fea71f71 (patch) | |
tree | e2007d7fa5077f91d7b6b5a05437fc0c1faef41d /drivers/gpu/drm/amd/amdgpu/amdgpu.h | |
parent | d88bf583bd06eecb31f82871c90ef6a5a09b5766 (diff) |
drm/amdgpu: fix and cleanup user fence handling v2
We leaked the BO in the error pass, additional to that we only have
one user fence for all IBs in a job.
v2: remove white space changes
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.h')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu.h | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h index d4c1eb7816f0..2a009c398dcb 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h | |||
@@ -368,13 +368,6 @@ struct amdgpu_fence_driver { | |||
368 | #define AMDGPU_FENCE_FLAG_64BIT (1 << 0) | 368 | #define AMDGPU_FENCE_FLAG_64BIT (1 << 0) |
369 | #define AMDGPU_FENCE_FLAG_INT (1 << 1) | 369 | #define AMDGPU_FENCE_FLAG_INT (1 << 1) |
370 | 370 | ||
371 | struct amdgpu_user_fence { | ||
372 | /* write-back bo */ | ||
373 | struct amdgpu_bo *bo; | ||
374 | /* write-back address offset to bo start */ | ||
375 | uint32_t offset; | ||
376 | }; | ||
377 | |||
378 | int amdgpu_fence_driver_init(struct amdgpu_device *adev); | 371 | int amdgpu_fence_driver_init(struct amdgpu_device *adev); |
379 | void amdgpu_fence_driver_fini(struct amdgpu_device *adev); | 372 | void amdgpu_fence_driver_fini(struct amdgpu_device *adev); |
380 | void amdgpu_fence_driver_force_completion(struct amdgpu_device *adev); | 373 | void amdgpu_fence_driver_force_completion(struct amdgpu_device *adev); |
@@ -741,10 +734,7 @@ struct amdgpu_ib { | |||
741 | uint32_t length_dw; | 734 | uint32_t length_dw; |
742 | uint64_t gpu_addr; | 735 | uint64_t gpu_addr; |
743 | uint32_t *ptr; | 736 | uint32_t *ptr; |
744 | struct amdgpu_user_fence *user; | ||
745 | uint32_t flags; | 737 | uint32_t flags; |
746 | /* resulting sequence number */ | ||
747 | uint64_t sequence; | ||
748 | }; | 738 | }; |
749 | 739 | ||
750 | enum amdgpu_ring_type { | 740 | enum amdgpu_ring_type { |
@@ -1219,7 +1209,7 @@ void amdgpu_ring_fini(struct amdgpu_ring *ring); | |||
1219 | struct amdgpu_cs_chunk { | 1209 | struct amdgpu_cs_chunk { |
1220 | uint32_t chunk_id; | 1210 | uint32_t chunk_id; |
1221 | uint32_t length_dw; | 1211 | uint32_t length_dw; |
1222 | uint32_t *kdata; | 1212 | void *kdata; |
1223 | }; | 1213 | }; |
1224 | 1214 | ||
1225 | struct amdgpu_cs_parser { | 1215 | struct amdgpu_cs_parser { |
@@ -1263,7 +1253,12 @@ struct amdgpu_job { | |||
1263 | uint32_t gds_base, gds_size; | 1253 | uint32_t gds_base, gds_size; |
1264 | uint32_t gws_base, gws_size; | 1254 | uint32_t gws_base, gws_size; |
1265 | uint32_t oa_base, oa_size; | 1255 | uint32_t oa_base, oa_size; |
1266 | struct amdgpu_user_fence uf; | 1256 | |
1257 | /* user fence handling */ | ||
1258 | struct amdgpu_bo *uf_bo; | ||
1259 | uint32_t uf_offset; | ||
1260 | uint64_t uf_sequence; | ||
1261 | |||
1267 | }; | 1262 | }; |
1268 | #define to_amdgpu_job(sched_job) \ | 1263 | #define to_amdgpu_job(sched_job) \ |
1269 | container_of((sched_job), struct amdgpu_job, base) | 1264 | container_of((sched_job), struct amdgpu_job, base) |