From c21f5bca9ae81804130e30ea3e6f7a18d51203dc Mon Sep 17 00:00:00 2001 From: Alex Waterman Date: Wed, 10 May 2017 02:34:54 +0100 Subject: gpu: nvgpu: Remove extraneous VM init/deinit APIs Support only VM pointers and ref-counting for maintaining VMs. This dramatically reduces the complexity of the APIs, avoids the API abuse that has existed, and ensures that future VM usage is consistent with current usage. Also remove the combined VM free/instance block deletion. Any place where this was done is now replaced with an explict free of the instance block and a nvgpu_vm_put(). JIRA NVGPU-12 JIRA NVGPU-30 Change-Id: Ib73e8d574ecc9abf6dad0b40a2c5795d6396cc8c Signed-off-by: Alex Waterman Reviewed-on: http://git-master/r/1480227 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/ce2_gk20a.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a/ce2_gk20a.c') diff --git a/drivers/gpu/nvgpu/gk20a/ce2_gk20a.c b/drivers/gpu/nvgpu/gk20a/ce2_gk20a.c index c905bedb..8e600c18 100644 --- a/drivers/gpu/nvgpu/gk20a/ce2_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/ce2_gk20a.c @@ -451,7 +451,7 @@ u32 gk20a_ce_create_context_with_cb(struct gk20a *g, ce_ctx->submitted_seq_number = 0; ce_ctx->completed_seq_number = 0; - ce_ctx->vm = &g->mm.ce.vm; + ce_ctx->vm = g->mm.ce.vm; /* always kernel client needs privileged channel */ ce_ctx->ch = gk20a_open_new_channel_with_cb(g, gk20a_ce_finished_ctx_cb, @@ -465,7 +465,7 @@ u32 gk20a_ce_create_context_with_cb(struct gk20a *g, ce_ctx->ch->wdt_enabled = false; /* bind the channel to the vm */ - err = __gk20a_vm_bind_channel(&g->mm.ce.vm, ce_ctx->ch); + err = __gk20a_vm_bind_channel(g->mm.ce.vm, ce_ctx->ch); if (err) { nvgpu_err(g, "ce: could not bind vm"); goto end; -- cgit v1.2.2