diff options
author | Deepak Nibade <dnibade@nvidia.com> | 2017-11-08 04:57:14 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-11-08 12:09:54 -0500 |
commit | 3cb65f57d532d596bfb931f3e4b995004e36a129 (patch) | |
tree | 5583ef2ed72a9fdface37011b22f72ae12e78079 /drivers/gpu/nvgpu/gk20a/channel_gk20a.c | |
parent | c22a5af9137394524f76e1f54b4e48fe92714fec (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/gk20a/channel_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/channel_gk20a.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c index 6c607ae2..229e3782 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c | |||
@@ -322,9 +322,9 @@ int gk20a_channel_set_runlist_interleave(struct channel_gk20a *ch, | |||
322 | } | 322 | } |
323 | 323 | ||
324 | switch (level) { | 324 | switch (level) { |
325 | case NVGPU_RUNLIST_INTERLEAVE_LEVEL_LOW: | 325 | case NVGPU_FIFO_RUNLIST_INTERLEAVE_LEVEL_LOW: |
326 | case NVGPU_RUNLIST_INTERLEAVE_LEVEL_MEDIUM: | 326 | case NVGPU_FIFO_RUNLIST_INTERLEAVE_LEVEL_MEDIUM: |
327 | case NVGPU_RUNLIST_INTERLEAVE_LEVEL_HIGH: | 327 | case NVGPU_FIFO_RUNLIST_INTERLEAVE_LEVEL_HIGH: |
328 | ret = g->ops.fifo.set_runlist_interleave(g, ch->chid, | 328 | ret = g->ops.fifo.set_runlist_interleave(g, ch->chid, |
329 | false, 0, level); | 329 | false, 0, level); |
330 | break; | 330 | break; |
@@ -858,7 +858,7 @@ struct channel_gk20a *gk20a_open_new_channel(struct gk20a *g, | |||
858 | ch->has_timedout = false; | 858 | ch->has_timedout = false; |
859 | ch->wdt_enabled = true; | 859 | ch->wdt_enabled = true; |
860 | ch->obj_class = 0; | 860 | ch->obj_class = 0; |
861 | ch->interleave_level = NVGPU_RUNLIST_INTERLEAVE_LEVEL_LOW; | 861 | ch->interleave_level = NVGPU_FIFO_RUNLIST_INTERLEAVE_LEVEL_LOW; |
862 | ch->timeslice_us = g->timeslice_low_priority_us; | 862 | ch->timeslice_us = g->timeslice_low_priority_us; |
863 | #ifdef CONFIG_TEGRA_19x_GPU | 863 | #ifdef CONFIG_TEGRA_19x_GPU |
864 | memset(&ch->t19x, 0, sizeof(struct channel_t19x)); | 864 | memset(&ch->t19x, 0, sizeof(struct channel_t19x)); |