mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
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 <dnibade@nvidia.com> Reviewed-on: http://git-master/r/1133595 Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
This commit is contained in:
committed by
Terje Bergstrom
parent
d868b65441
commit
771f742703
@@ -2142,6 +2142,17 @@ int gk20a_init_gpu_characteristics(struct gk20a *g)
|
||||
if (platform->clk_round_rate)
|
||||
gpu->max_freq = platform->clk_round_rate(g->dev, UINT_MAX);
|
||||
|
||||
g->ops.gr.get_preemption_mode_flags(g, &g->gr.preemption_mode_rec);
|
||||
gpu->graphics_preemption_mode_flags =
|
||||
g->gr.preemption_mode_rec.graphics_preemption_mode_flags;
|
||||
gpu->compute_preemption_mode_flags =
|
||||
g->gr.preemption_mode_rec.compute_preemption_mode_flags;
|
||||
gpu->default_graphics_preempt_mode =
|
||||
g->gr.preemption_mode_rec.default_graphics_preempt_mode;
|
||||
gpu->default_compute_preempt_mode =
|
||||
g->gr.preemption_mode_rec.default_compute_preempt_mode;
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user