From cc9f3d80e32c63ae003a8dc66016a035100a6359 Mon Sep 17 00:00:00 2001 From: Richard Zhao Date: Thu, 12 Apr 2018 16:06:02 -0700 Subject: gpu: nvgpu: pass pid/tid from os specific code to common code linux driver runs in user's process but qnx driver has dedicate driver process, so they have different way to get user pid. nvgpu common code expect calls from os specific code pass pid/tid. ce/cde open channel for internal use, we use driver pid. Jira VQRM-3534 Change-Id: I892372ac5f1dc4d25f9928d16992bcc659d12a56 Signed-off-by: Richard Zhao Reviewed-on: https://git-master.nvidia.com/r/1694145 GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/channel_gk20a.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a/channel_gk20a.c') diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c index f50c37a7..2f5514a8 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c @@ -615,7 +615,8 @@ void __gk20a_channel_kill(struct channel_gk20a *ch) struct channel_gk20a *gk20a_open_new_channel(struct gk20a *g, s32 runlist_id, - bool is_privileged_channel) + bool is_privileged_channel, + pid_t pid, pid_t tid) { struct fifo_gk20a *f = &g->fifo; struct channel_gk20a *ch; @@ -645,8 +646,8 @@ struct channel_gk20a *gk20a_open_new_channel(struct gk20a *g, /* Channel privilege level */ ch->is_privileged_channel = is_privileged_channel; - ch->pid = nvgpu_current_tid(g); - ch->tgid = nvgpu_current_pid(g); /* process granularity for FECS traces */ + ch->pid = tid; + ch->tgid = pid; /* process granularity for FECS traces */ if (g->ops.fifo.alloc_inst(g, ch)) { ch->g = NULL; -- cgit v1.2.2