summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/gk20a.c
diff options
context:
space:
mode:
authorDeepak Nibade <dnibade@nvidia.com>2017-11-10 08:02:37 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2017-11-14 07:58:39 -0500
commit90aeab9dee07a63e4bac6d92646dfd80e65d2edd (patch)
treea175a1724590dc14c599db9c23f04d79a8f3ac79 /drivers/gpu/nvgpu/gk20a/gk20a.c
parentfd2cac59f3491cb5b4f5d1f3fc97df94734bd682 (diff)
gpu: nvgpu: define preemption modes in common code
We use linux specific graphics/compute preemption modes defined in uapi header (and of below form) in all over common code NVGPU_GRAPHICS_PREEMPTION_MODE_* NVGPU_COMPUTE_PREEMPTION_MODE_* Since common code should be independent of linux specific code, define new modes of the form in common code and used them everywhere NVGPU_PREEMPTION_MODE_GRAPHICS_* NVGPU_PREEMPTION_MODE_COMPUTE_* Add required parser functions to convert both the modes into each other For linux IOCTL NVGPU_IOCTL_CHANNEL_SET_PREEMPTION_MODE, we need to convert linux specific modes into common modes first before passing them to common code And to pass gpu characteristics to user space we need to first convert common modes into linux specific modes and then pass them to user space Jira NVGPU-392 Change-Id: I8c62c6859bdc1baa5b44eb31c7020e42d2462c8c Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1596930 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gk20a.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c
index 1d594d29..ab3d86be 100644
--- a/drivers/gpu/nvgpu/gk20a/gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/gk20a.c
@@ -468,16 +468,6 @@ int gk20a_init_gpu_characteristics(struct gk20a *g)
468 if (g->ops.clk.get_maxrate) 468 if (g->ops.clk.get_maxrate)
469 gpu->max_freq = g->ops.clk.get_maxrate(&g->clk); 469 gpu->max_freq = g->ops.clk.get_maxrate(&g->clk);
470 470
471 g->ops.gr.get_preemption_mode_flags(g, &g->gr.preemption_mode_rec);
472 gpu->graphics_preemption_mode_flags =
473 g->gr.preemption_mode_rec.graphics_preemption_mode_flags;
474 gpu->compute_preemption_mode_flags =
475 g->gr.preemption_mode_rec.compute_preemption_mode_flags;
476 gpu->default_graphics_preempt_mode =
477 g->gr.preemption_mode_rec.default_graphics_preempt_mode;
478 gpu->default_compute_preempt_mode =
479 g->gr.preemption_mode_rec.default_compute_preempt_mode;
480
481 gpu->local_video_memory_size = g->mm.vidmem.size; 471 gpu->local_video_memory_size = g->mm.vidmem.size;
482 472
483 gpu->pci_vendor_id = g->pci_vendor_id; 473 gpu->pci_vendor_id = g->pci_vendor_id;