diff options
author | Peter Daifuku <pdaifuku@nvidia.com> | 2017-03-17 14:36:19 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-03-24 12:08:17 -0400 |
commit | fd02ab4d540ef473df1fe189653cc521876663d6 (patch) | |
tree | 1c61ea5b63900808cf79903e72a0bf462814b077 /drivers/gpu/nvgpu/gk20a/gk20a.h | |
parent | a9fb2a4824a48f4ff193a1a54d1143ac0395aa95 (diff) |
gpu: nvgpu: vgpu: profiler reservation support
Support for hwpm reservations in the virtual case:
- Add session ops for checking and setting global and context reservations, and
releasing reservations
- in the native case, these just update reservation counts and flags
- in the vgpu case, when the reservation count is 0, check with the RM server
that a reservation is possible: for global reservations, no other guest
can have a reservation; for context reservations, no other guest can have
a global reservation
- in the vgpu case, when the reservation count is decremented to 0, notify
the RM server that the guest no longer has any reservations
Bug 1775465
JIRA VFND-3428
Change-Id: Idf115b730e465e35d0745c96a8f8ab6b645c7cae
Signed-off-by: Peter Daifuku <pdaifuku@nvidia.com>
Reviewed-on: http://git-master/r/1323375
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.h')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h index 25bcd895..30f1b371 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gk20a.h | |||
@@ -28,6 +28,7 @@ struct gk20a_fecs_trace; | |||
28 | struct gk20a_ctxsw_trace; | 28 | struct gk20a_ctxsw_trace; |
29 | struct acr_desc; | 29 | struct acr_desc; |
30 | struct nvgpu_mem_alloc_tracker; | 30 | struct nvgpu_mem_alloc_tracker; |
31 | struct dbg_profiler_object_data; | ||
31 | 32 | ||
32 | #include <linux/sched.h> | 33 | #include <linux/sched.h> |
33 | #include <nvgpu/lock.h> | 34 | #include <nvgpu/lock.h> |
@@ -758,6 +759,15 @@ struct gpu_ops { | |||
758 | u64 num_ops); | 759 | u64 num_ops); |
759 | int (*dbg_set_powergate)(struct dbg_session_gk20a *dbg_s, | 760 | int (*dbg_set_powergate)(struct dbg_session_gk20a *dbg_s, |
760 | u32 mode); | 761 | u32 mode); |
762 | bool (*check_and_set_global_reservation)( | ||
763 | struct dbg_session_gk20a *dbg_s, | ||
764 | struct dbg_profiler_object_data *prof_obj); | ||
765 | bool (*check_and_set_context_reservation)( | ||
766 | struct dbg_session_gk20a *dbg_s, | ||
767 | struct dbg_profiler_object_data *prof_obj); | ||
768 | void (*release_profiler_reservation)( | ||
769 | struct dbg_session_gk20a *dbg_s, | ||
770 | struct dbg_profiler_object_data *prof_obj); | ||
761 | } dbg_session_ops; | 771 | } dbg_session_ops; |
762 | struct { | 772 | struct { |
763 | void (*get_program_numbers)(struct gk20a *g, | 773 | void (*get_program_numbers)(struct gk20a *g, |