From 771f742703bb56598bc341ec4eaee5ff7c036d4d Mon Sep 17 00:00:00 2001 From: Deepak Nibade Date: Wed, 27 Apr 2016 19:02:43 +0530 Subject: gpu: nvgpu: add supported preemptions to gpu characteristics Add below flag fields to gpu characteristics to indicate supported and default preemption modes on platform for graphics and compute __u32 graphics_preemption_mode_flags; __u32 compute_preemption_mode_flags; __u32 default_graphics_preempt_mode; __u32 default_compute_preempt_mode; Add struct nvgpu_preemption_modes_rec to struct gr_gk20a to store these values locally Use platform specific get_preemption_mode_flags() to get the flags and define gk20a/gm20b specific get_preemption_mode_flags() API Bug 1646259 Change-Id: I80193c0d988dc93bd96585f9aa631fd817f4dfa3 Signed-off-by: Deepak Nibade Reviewed-on: http://git-master/r/1133595 Reviewed-by: Terje Bergstrom Tested-by: Terje Bergstrom --- drivers/gpu/nvgpu/gk20a/gr_gk20a.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'drivers/gpu/nvgpu/gk20a/gr_gk20a.h') diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.h b/drivers/gpu/nvgpu/gk20a/gr_gk20a.h index 10997c17..15d1ea7d 100644 --- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.h @@ -188,6 +188,14 @@ struct gr_gk20a_isr_data { u32 class_num; }; +struct nvgpu_preemption_modes_rec { + u32 graphics_preemption_mode_flags; /* supported preemption modes */ + u32 compute_preemption_mode_flags; /* supported preemption modes */ + + u32 default_graphics_preempt_mode; /* default mode */ + u32 default_compute_preempt_mode; /* default mode */ +}; + struct gr_gk20a { struct gk20a *g; struct { @@ -325,6 +333,7 @@ struct gr_gk20a { bool sw_ready; bool skip_ucode_init; + struct nvgpu_preemption_modes_rec preemption_mode_rec; #ifdef CONFIG_ARCH_TEGRA_18x_SOC struct gr_t18x t18x; #endif -- cgit v1.2.2