diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2017-12-15 12:04:15 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-01-17 15:29:09 -0500 |
commit | 2f6698b863c9cc1db6455637b7c72e812b470b93 (patch) | |
tree | d0c8abf32d6994b9f54bf5eddafd8316e038c829 /drivers/gpu/nvgpu/gk20a/tsg_gk20a.c | |
parent | 6a73114788ffafe4c53771c707ecbd9c9ea0a117 (diff) |
gpu: nvgpu: Make graphics context property of TSG
Move graphics context ownership to TSG instead of channel. Combine
channel_ctx_gk20a and gr_ctx_desc to one structure, because the split
between them was arbitrary. Move context header to be property of
channel.
Bug 1842197
Change-Id: I410e3262f80b318d8528bcbec270b63a2d8d2ff9
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1639532
Reviewed-by: Seshendra Gadagottu <sgadagottu@nvidia.com>
Tested-by: Seshendra Gadagottu <sgadagottu@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Konsta Holtta <kholtta@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/tsg_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/tsg_gk20a.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/tsg_gk20a.c b/drivers/gpu/nvgpu/gk20a/tsg_gk20a.c index d9ddc011..19d0ecce 100644 --- a/drivers/gpu/nvgpu/gk20a/tsg_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/tsg_gk20a.c | |||
@@ -280,7 +280,6 @@ struct tsg_gk20a *gk20a_tsg_open(struct gk20a *g) | |||
280 | tsg->num_active_channels = 0; | 280 | tsg->num_active_channels = 0; |
281 | nvgpu_ref_init(&tsg->refcount); | 281 | nvgpu_ref_init(&tsg->refcount); |
282 | 282 | ||
283 | tsg->tsg_gr_ctx = NULL; | ||
284 | tsg->vm = NULL; | 283 | tsg->vm = NULL; |
285 | tsg->interleave_level = NVGPU_FIFO_RUNLIST_INTERLEAVE_LEVEL_LOW; | 284 | tsg->interleave_level = NVGPU_FIFO_RUNLIST_INTERLEAVE_LEVEL_LOW; |
286 | tsg->timeslice_us = 0; | 285 | tsg->timeslice_us = 0; |
@@ -319,10 +318,8 @@ void gk20a_tsg_release(struct nvgpu_ref *ref) | |||
319 | if (g->ops.fifo.tsg_release) | 318 | if (g->ops.fifo.tsg_release) |
320 | g->ops.fifo.tsg_release(tsg); | 319 | g->ops.fifo.tsg_release(tsg); |
321 | 320 | ||
322 | if (tsg->tsg_gr_ctx) { | 321 | if (nvgpu_mem_is_valid(&tsg->gr_ctx.mem)) |
323 | gr_gk20a_free_tsg_gr_ctx(tsg); | 322 | gr_gk20a_free_tsg_gr_ctx(tsg); |
324 | tsg->tsg_gr_ctx = NULL; | ||
325 | } | ||
326 | 323 | ||
327 | if (g->ops.fifo.deinit_eng_method_buffers) | 324 | if (g->ops.fifo.deinit_eng_method_buffers) |
328 | g->ops.fifo.deinit_eng_method_buffers(g, tsg); | 325 | g->ops.fifo.deinit_eng_method_buffers(g, tsg); |