From 00ba4c0b0b2e8ded7349f419cbfdaf7b124af4b1 Mon Sep 17 00:00:00 2001 From: Konsta Holtta Date: Thu, 16 Feb 2017 13:31:03 +0200 Subject: gpu: nvgpu: assign ce_ctx->vm during ctx creation Commit 7e403974d3584ab8880e42d422ee3afb7f49d6f3 ("gpu: nvgpu: Simplify ref-counting on VMs") accidentally broke the CE context creation while moving away from direct ch->vm assignments. ce_ctx->vm isn't part of that simplification, so initialize it because it's used elsewhere and were left NULL. Bug 1846718 Change-Id: I6219880227b881d2175005b7eaf6e6e08a6f888e Signed-off-by: Konsta Holtta Reviewed-on: http://git-master/r/1306221 Reviewed-by: Deepak Nibade Reviewed-by: Terje Bergstrom Reviewed-by: svccoveritychecker GVS: Gerrit_Virtual_Submit --- drivers/gpu/nvgpu/gk20a/ce2_gk20a.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/gpu/nvgpu/gk20a') diff --git a/drivers/gpu/nvgpu/gk20a/ce2_gk20a.c b/drivers/gpu/nvgpu/gk20a/ce2_gk20a.c index 62b0a05e..023c959e 100644 --- a/drivers/gpu/nvgpu/gk20a/ce2_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/ce2_gk20a.c @@ -441,6 +441,8 @@ u32 gk20a_ce_create_context_with_cb(struct device *dev, ce_ctx->submitted_seq_number = 0; ce_ctx->completed_seq_number = 0; + 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, ce_ctx, -- cgit v1.2.2