summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/linux/ioctl_tsg.c
diff options
context:
space:
mode:
authorDeepak Nibade <dnibade@nvidia.com>2017-11-08 04:57:14 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2017-11-08 12:09:54 -0500
commit3cb65f57d532d596bfb931f3e4b995004e36a129 (patch)
tree5583ef2ed72a9fdface37011b22f72ae12e78079 /drivers/gpu/nvgpu/common/linux/ioctl_tsg.c
parentc22a5af9137394524f76e1f54b4e48fe92714fec (diff)
gpu: nvgpu: define runlist level in common code
All the runlist levels NVGPU_RUNLIST_INTERLEAVE_LEVEL_* are declared in linux specific uapi header and used in common code But since common code should be linux-independent, move these uses out of common code Define new runlist levels NVGPU_FIFO_RUNLIST_INTERLEAVE_LEVEL_* in common code and use them wherever required Add new API nvgpu_get_common_runlist_level() to get common runlist level of the form NVGPU_FIFO_RUNLIST_INTERLEAVE_LEVEL_* from linux specific runlist level of the form NVGPU_RUNLIST_INTERLEAVE_LEVEL_* Jira NVGPU-259 Change-Id: Ic19239f0f8275683d5d1b981df530acd90e6dfbb Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1594327 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/ioctl_tsg.c')
-rw-r--r--drivers/gpu/nvgpu/common/linux/ioctl_tsg.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/ioctl_tsg.c b/drivers/gpu/nvgpu/common/linux/ioctl_tsg.c
index 681a5e66..eb223382 100644
--- a/drivers/gpu/nvgpu/common/linux/ioctl_tsg.c
+++ b/drivers/gpu/nvgpu/common/linux/ioctl_tsg.c
@@ -328,6 +328,7 @@ static int gk20a_tsg_ioctl_set_runlist_interleave(struct gk20a *g,
328{ 328{
329 struct nvgpu_os_linux *l = nvgpu_os_linux_from_gk20a(g); 329 struct nvgpu_os_linux *l = nvgpu_os_linux_from_gk20a(g);
330 struct gk20a_sched_ctrl *sched = &l->sched_ctrl; 330 struct gk20a_sched_ctrl *sched = &l->sched_ctrl;
331 u32 level = arg->level;
331 int err; 332 int err;
332 333
333 gk20a_dbg(gpu_dbg_fn | gpu_dbg_sched, "tsgid=%u", tsg->tsgid); 334 gk20a_dbg(gpu_dbg_fn | gpu_dbg_sched, "tsgid=%u", tsg->tsgid);
@@ -343,7 +344,8 @@ static int gk20a_tsg_ioctl_set_runlist_interleave(struct gk20a *g,
343 goto done; 344 goto done;
344 } 345 }
345 346
346 err = gk20a_tsg_set_runlist_interleave(tsg, arg->level); 347 level = nvgpu_get_common_runlist_level(level);
348 err = gk20a_tsg_set_runlist_interleave(tsg, level);
347 349
348 gk20a_idle(g); 350 gk20a_idle(g);
349done: 351done: