[PATCH] drm/amdgpu: add condition check for trace_amdgpu_cs()
Kevin Wang
kevin1.wang at amd.com
Mon Aug 17 09:04:45 UTC 2020
add trace event enabled check to avoid nop loop when submit multi ibs
in amdgpu_cs_ioctl() function.
Signed-off-by: Kevin Wang <kevin1.wang at amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
index ffbcaf4bfb8b..409694f074ac 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
@@ -1319,8 +1319,9 @@ int amdgpu_cs_ioctl(struct drm_device *dev, void *data, struct drm_file *filp)
reserved_buffers = true;
- for (i = 0; i < parser.job->num_ibs; i++)
- trace_amdgpu_cs(&parser, i);
+ if (trace_amdgpu_cs_enabled())
+ for (i = 0; i < parser.job->num_ibs; i++)
+ trace_amdgpu_cs(&parser, i);
r = amdgpu_cs_vm_handling(&parser);
if (r)
--
2.17.1
More information about the amd-gfx
mailing list