diff options
author | Konsta Holtta <kholtta@nvidia.com> | 2018-05-22 05:59:02 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-05-25 18:16:26 -0400 |
commit | cae514120b2c6420127ac6102a2d3fd5023218d0 (patch) | |
tree | 32d844f3224ed823172d8136d0279c1f7487df97 /drivers/gpu/nvgpu/gk20a/fifo_gk20a.h | |
parent | 45d0a9c711d50290eb3e8297ab9b5c4a5161f242 (diff) |
gpu: nvgpu: abstract submit profiling
Add gk20a_fifo_profile_snapshot() to store the submit time in a
profiling entry that was acquired from gk20a_fifo_profile_acquire().
Also get rid of ifdef CONFIG_DEBUG_FS by stubbing the acquire and free
functions when debugfs is not enabled. This reduces some cyclomatic
complexity in the submit path.
Jira NVGPU-708
Change-Id: I39829a6475cfe3aa582620219e420bde62228e52
Signed-off-by: Konsta Holtta <kholtta@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1729545
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/fifo_gk20a.h')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/fifo_gk20a.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h index cf3ac167..bccd15f6 100644 --- a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h | |||
@@ -349,6 +349,21 @@ bool gk20a_is_fault_engine_subid_gpc(struct gk20a *g, u32 engine_subid); | |||
349 | struct fifo_profile_gk20a *gk20a_fifo_profile_acquire(struct gk20a *g); | 349 | struct fifo_profile_gk20a *gk20a_fifo_profile_acquire(struct gk20a *g); |
350 | void gk20a_fifo_profile_release(struct gk20a *g, | 350 | void gk20a_fifo_profile_release(struct gk20a *g, |
351 | struct fifo_profile_gk20a *profile); | 351 | struct fifo_profile_gk20a *profile); |
352 | void gk20a_fifo_profile_snapshot(struct fifo_profile_gk20a *profile, int idx); | ||
353 | #else | ||
354 | static inline struct fifo_profile_gk20a * | ||
355 | gk20a_fifo_profile_acquire(struct gk20a *g) | ||
356 | { | ||
357 | return NULL; | ||
358 | } | ||
359 | static inline void gk20a_fifo_profile_release(struct gk20a *g, | ||
360 | struct fifo_profile_gk20a *profile) | ||
361 | { | ||
362 | } | ||
363 | static inline void gk20a_fifo_profile_snapshot( | ||
364 | struct fifo_profile_gk20a *profile, int idx) | ||
365 | { | ||
366 | } | ||
352 | #endif | 367 | #endif |
353 | 368 | ||
354 | void gk20a_dump_channel_status_ramfc(struct gk20a *g, | 369 | void gk20a_dump_channel_status_ramfc(struct gk20a *g, |