summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h
diff options
context:
space:
mode:
authorAlex Xie <AlexBin.Xie@amd.com>2017-05-30 17:10:16 -0400
committerAlex Deucher <alexander.deucher@amd.com>2017-05-31 14:16:38 -0400
commitdd684d313e280c3bad2ebb7b33e7688ab5409bc9 (patch)
tree4963987a0c85ab514b9c317944ed5fc369c46ef9 /drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h
parent1410f64651e35411b4bb7a10f32eb6225925110a (diff)
downloadtalos-op-linux-dd684d313e280c3bad2ebb7b33e7688ab5409bc9.tar.gz
talos-op-linux-dd684d313e280c3bad2ebb7b33e7688ab5409bc9.zip
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.h6
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 {
u64 cond_exe_gpu_addr;
volatile u32 *cond_exe_cpu_addr;
unsigned vm_inv_eng;
+ bool has_compute_vm_bug;
#if defined(CONFIG_DEBUG_FS)
struct dentry *ent;
#endif
@@ -207,4 +208,9 @@ static inline void amdgpu_ring_clear_ring(struct amdgpu_ring *ring)
}
+static inline bool amdgpu_ring_has_compute_vm_bug(struct amdgpu_ring *ring)
+{
+ return ring->has_compute_vm_bug;
+}
+
#endif
OpenPOWER on IntegriCloud