diff options
author | Alex Xie <AlexBin.Xie@amd.com> | 2017-05-30 17:10:16 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-05-31 14:16:38 -0400 |
commit | dd684d313e280c3bad2ebb7b33e7688ab5409bc9 (patch) | |
tree | 4963987a0c85ab514b9c317944ed5fc369c46ef9 /drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | |
parent | 1410f64651e35411b4bb7a10f32eb6225925110a (diff) |
drm/amdgpu: Optimize a function called by every IB sheduling
Move several if statements and a loop statment from
run time to initialization time.
Signed-off-by: Alex Xie <AlexBin.Xie@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h index a9223a8de8c2..334307efac8b 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | |||
@@ -185,6 +185,7 @@ struct amdgpu_ring { | |||
185 | u64 cond_exe_gpu_addr; | 185 | u64 cond_exe_gpu_addr; |
186 | volatile u32 *cond_exe_cpu_addr; | 186 | volatile u32 *cond_exe_cpu_addr; |
187 | unsigned vm_inv_eng; | 187 | unsigned vm_inv_eng; |
188 | bool has_compute_vm_bug; | ||
188 | #if defined(CONFIG_DEBUG_FS) | 189 | #if defined(CONFIG_DEBUG_FS) |
189 | struct dentry *ent; | 190 | struct dentry *ent; |
190 | #endif | 191 | #endif |
@@ -207,4 +208,9 @@ static inline void amdgpu_ring_clear_ring(struct amdgpu_ring *ring) | |||
207 | 208 | ||
208 | } | 209 | } |
209 | 210 | ||
211 | static inline bool amdgpu_ring_has_compute_vm_bug(struct amdgpu_ring *ring) | ||
212 | { | ||
213 | return ring->has_compute_vm_bug; | ||
214 | } | ||
215 | |||
210 | #endif | 216 | #endif |