diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/channel_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/channel_gk20a.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c index f228110e..68e43259 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c | |||
@@ -986,7 +986,7 @@ static void gk20a_free_channel(struct channel_gk20a *ch, bool force) | |||
986 | memset(&ch->ramfc, 0, sizeof(struct mem_desc_sub)); | 986 | memset(&ch->ramfc, 0, sizeof(struct mem_desc_sub)); |
987 | 987 | ||
988 | gk20a_gmmu_unmap_free(ch_vm, &ch->gpfifo.mem); | 988 | gk20a_gmmu_unmap_free(ch_vm, &ch->gpfifo.mem); |
989 | nvgpu_big_free(ch->gpfifo.pipe); | 989 | nvgpu_big_free(g, ch->gpfifo.pipe); |
990 | memset(&ch->gpfifo, 0, sizeof(struct gpfifo_desc)); | 990 | memset(&ch->gpfifo, 0, sizeof(struct gpfifo_desc)); |
991 | 991 | ||
992 | #if defined(CONFIG_GK20A_CYCLE_STATS) | 992 | #if defined(CONFIG_GK20A_CYCLE_STATS) |
@@ -1856,7 +1856,7 @@ int gk20a_alloc_channel_gpfifo(struct channel_gk20a *c, | |||
1856 | } | 1856 | } |
1857 | 1857 | ||
1858 | if (c->gpfifo.mem.aperture == APERTURE_VIDMEM || g->mm.force_pramin) { | 1858 | if (c->gpfifo.mem.aperture == APERTURE_VIDMEM || g->mm.force_pramin) { |
1859 | c->gpfifo.pipe = nvgpu_big_malloc( | 1859 | c->gpfifo.pipe = nvgpu_big_malloc(g, |
1860 | gpfifo_size * sizeof(struct nvgpu_gpfifo)); | 1860 | gpfifo_size * sizeof(struct nvgpu_gpfifo)); |
1861 | if (!c->gpfifo.pipe) { | 1861 | if (!c->gpfifo.pipe) { |
1862 | err = -ENOMEM; | 1862 | err = -ENOMEM; |
@@ -1927,7 +1927,7 @@ clean_up_sync: | |||
1927 | c->sync = NULL; | 1927 | c->sync = NULL; |
1928 | } | 1928 | } |
1929 | clean_up_unmap: | 1929 | clean_up_unmap: |
1930 | nvgpu_big_free(c->gpfifo.pipe); | 1930 | nvgpu_big_free(g, c->gpfifo.pipe); |
1931 | gk20a_gmmu_unmap_free(ch_vm, &c->gpfifo.mem); | 1931 | gk20a_gmmu_unmap_free(ch_vm, &c->gpfifo.mem); |
1932 | clean_up: | 1932 | clean_up: |
1933 | memset(&c->gpfifo, 0, sizeof(struct gpfifo_desc)); | 1933 | memset(&c->gpfifo, 0, sizeof(struct gpfifo_desc)); |
@@ -2057,12 +2057,12 @@ static void trace_write_pushbuffer_range(struct channel_gk20a *c, | |||
2057 | if (!g) { | 2057 | if (!g) { |
2058 | size = count * sizeof(struct nvgpu_gpfifo); | 2058 | size = count * sizeof(struct nvgpu_gpfifo); |
2059 | if (size) { | 2059 | if (size) { |
2060 | g = nvgpu_big_malloc(size); | 2060 | g = nvgpu_big_malloc(c->g, size); |
2061 | if (!g) | 2061 | if (!g) |
2062 | return; | 2062 | return; |
2063 | 2063 | ||
2064 | if (copy_from_user(g, user_gpfifo, size)) { | 2064 | if (copy_from_user(g, user_gpfifo, size)) { |
2065 | nvgpu_big_free(g); | 2065 | nvgpu_big_free(c->g, g); |
2066 | return; | 2066 | return; |
2067 | } | 2067 | } |
2068 | } | 2068 | } |
@@ -2074,7 +2074,7 @@ static void trace_write_pushbuffer_range(struct channel_gk20a *c, | |||
2074 | trace_write_pushbuffer(c, gp); | 2074 | trace_write_pushbuffer(c, gp); |
2075 | 2075 | ||
2076 | if (gpfifo_allocated) | 2076 | if (gpfifo_allocated) |
2077 | nvgpu_big_free(g); | 2077 | nvgpu_big_free(c->g, g); |
2078 | } | 2078 | } |
2079 | 2079 | ||
2080 | static void __gk20a_channel_timeout_start(struct channel_gk20a *ch) | 2080 | static void __gk20a_channel_timeout_start(struct channel_gk20a *ch) |