Re: [PATCH] drm/amdgpu: add condition check for trace_amdgpu_cs()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 17.08.20 um 11:04 schrieb Kevin Wang:
add trace event enabled check to avoid nop loop when submit multi ibs
in amdgpu_cs_ioctl() function.

Maybe we should change the trace point instead to trace all IBs with just a single call.


Signed-off-by: Kevin Wang <kevin1.wang@xxxxxxx>
---
  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)

_______________________________________________
amd-gfx mailing list
amd-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/amd-gfx



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux