mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 01:50:07 +03:00
gpu: nvgpu: remove nvgpu_preemption_modes_rec struct
g->ops.gr.get_preemption_mode_flags() hal is used to fetch information on supported preemption modes and default preemption mode Temporary struct nvgpu_preemption_modes_rec is used for this purpose and is defined in gk20a/gr_gk20a.h right now. Split above hal into two separate hals and move them to hal.gr.init unit g->ops.gr.init.get_supported__preemption_modes() g->ops.gr.init.get_default_preemption_modes() These hals now return respective flags in pointers passed in function parameter list, so there is no need to use temporary structure anymore Hence delete struct nvgpu_preemption_modes_rec Implement gm20b/gp10b chip specific hals in hal.gr.init unit. Delete g->ops.gr.get_preemption_mode_flags() hal Jira NVGPU-3126 Change-Id: I84f507fcd8d122bb7f0ecf697e8b4f16c9339ce1 Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2102455 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
55615829e5
commit
fed6ee1afc
@@ -250,23 +250,31 @@ static u64 nvgpu_ctrl_ioctl_gpu_characteristics_flags(struct gk20a *g)
|
||||
static void nvgpu_set_preemption_mode_flags(struct gk20a *g,
|
||||
struct nvgpu_gpu_characteristics *gpu)
|
||||
{
|
||||
struct nvgpu_preemption_modes_rec preemption_mode_rec;
|
||||
u32 graphics_preemption_mode_flags = 0U;
|
||||
u32 compute_preemption_mode_flags = 0U;
|
||||
u32 default_graphics_preempt_mode = 0U;
|
||||
u32 default_compute_preempt_mode = 0U;
|
||||
|
||||
g->ops.gr.get_preemption_mode_flags(g, &preemption_mode_rec);
|
||||
g->ops.gr.init.get_supported__preemption_modes(
|
||||
&graphics_preemption_mode_flags,
|
||||
&compute_preemption_mode_flags);
|
||||
g->ops.gr.init.get_default_preemption_modes(
|
||||
&default_graphics_preempt_mode,
|
||||
&default_compute_preempt_mode);
|
||||
|
||||
gpu->graphics_preemption_mode_flags =
|
||||
nvgpu_get_ioctl_graphics_preempt_mode_flags(
|
||||
preemption_mode_rec.graphics_preemption_mode_flags);
|
||||
graphics_preemption_mode_flags);
|
||||
gpu->compute_preemption_mode_flags =
|
||||
nvgpu_get_ioctl_compute_preempt_mode_flags(
|
||||
preemption_mode_rec.compute_preemption_mode_flags);
|
||||
compute_preemption_mode_flags);
|
||||
|
||||
gpu->default_graphics_preempt_mode =
|
||||
nvgpu_get_ioctl_graphics_preempt_mode(
|
||||
preemption_mode_rec.default_graphics_preempt_mode);
|
||||
default_graphics_preempt_mode);
|
||||
gpu->default_compute_preempt_mode =
|
||||
nvgpu_get_ioctl_compute_preempt_mode(
|
||||
preemption_mode_rec.default_compute_preempt_mode);
|
||||
default_compute_preempt_mode);
|
||||
}
|
||||
|
||||
static long
|
||||
|
||||
Reference in New Issue
Block a user