From fd02ab4d540ef473df1fe189653cc521876663d6 Mon Sep 17 00:00:00 2001 From: Peter Daifuku Date: Fri, 17 Mar 2017 11:36:19 -0700 Subject: 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 Reviewed-on: http://git-master/r/1323375 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/gk20a.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.h') 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; struct gk20a_ctxsw_trace; struct acr_desc; struct nvgpu_mem_alloc_tracker; +struct dbg_profiler_object_data; #include #include @@ -758,6 +759,15 @@ struct gpu_ops { u64 num_ops); int (*dbg_set_powergate)(struct dbg_session_gk20a *dbg_s, u32 mode); + bool (*check_and_set_global_reservation)( + struct dbg_session_gk20a *dbg_s, + struct dbg_profiler_object_data *prof_obj); + bool (*check_and_set_context_reservation)( + struct dbg_session_gk20a *dbg_s, + struct dbg_profiler_object_data *prof_obj); + void (*release_profiler_reservation)( + struct dbg_session_gk20a *dbg_s, + struct dbg_profiler_object_data *prof_obj); } dbg_session_ops; struct { void (*get_program_numbers)(struct gk20a *g, -- cgit v1.2.2