From 907a43831513c2863e2f7fefc2d051f396d02354 Mon Sep 17 00:00:00 2001 From: Richard Zhao Date: Tue, 1 Mar 2016 11:28:44 -0800 Subject: gpu: nvgpu: vgpu: pass pid when allocate context Bug 1648908 Change-Id: I39b1becf0b00e930a180a5a8367c22ff4d495446 Signed-off-by: Richard Zhao Reviewed-on: http://git-master/r/1031860 (cherry picked from commit f1940e1438fb3494c3093f1ab6a11bed6deb2b93) Reviewed-on: http://git-master/r/1022182 Reviewed-by: Terje Bergstrom Tested-by: Terje Bergstrom --- drivers/gpu/nvgpu/vgpu/fifo_vgpu.c | 1 + include/linux/tegra_vgpu.h | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c b/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c index e636d5ae..9e40218d 100644 --- a/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c +++ b/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c @@ -81,6 +81,7 @@ static int vgpu_channel_alloc_inst(struct gk20a *g, struct channel_gk20a *ch) msg.cmd = TEGRA_VGPU_CMD_CHANNEL_ALLOC_HWCTX; msg.handle = platform->virt_handle; p->id = ch->hw_chid; + p->pid = (u64)current->pid; err = vgpu_comm_sendrecv(&msg, sizeof(msg), sizeof(msg)); if (err || msg.ret) { gk20a_err(dev_from_gk20a(g), "fail"); diff --git a/include/linux/tegra_vgpu.h b/include/linux/tegra_vgpu.h index d84d0c63..c4dd81dd 100644 --- a/include/linux/tegra_vgpu.h +++ b/include/linux/tegra_vgpu.h @@ -86,6 +86,7 @@ struct tegra_vgpu_connect_params { struct tegra_vgpu_channel_hwctx_params { u32 id; + u64 pid; u64 handle; }; -- cgit v1.2.2