summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/tsg_gk20a.c
diff options
context:
space:
mode:
authorRichard Zhao <rizhao@nvidia.com>2018-04-12 19:06:02 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-04-16 13:49:43 -0400
commitcc9f3d80e32c63ae003a8dc66016a035100a6359 (patch)
tree50fc79abb1c314a76f576ba3571e877d9c84e2d7 /drivers/gpu/nvgpu/gk20a/tsg_gk20a.c
parenta0dfb2b91112a766fb4b3e2aaafa99167151c3da (diff)
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 <rizhao@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1694145 GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/tsg_gk20a.c b/drivers/gpu/nvgpu/gk20a/tsg_gk20a.c
index ccb456cf..05b8fc61 100644
--- a/drivers/gpu/nvgpu/gk20a/tsg_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/tsg_gk20a.c
@@ -267,7 +267,7 @@ static struct tsg_gk20a *gk20a_tsg_acquire_unused_tsg(struct fifo_gk20a *f)
267 return tsg; 267 return tsg;
268} 268}
269 269
270struct tsg_gk20a *gk20a_tsg_open(struct gk20a *g) 270struct tsg_gk20a *gk20a_tsg_open(struct gk20a *g, pid_t pid)
271{ 271{
272 struct tsg_gk20a *tsg; 272 struct tsg_gk20a *tsg;
273 int err; 273 int err;
@@ -286,7 +286,7 @@ struct tsg_gk20a *gk20a_tsg_open(struct gk20a *g)
286 tsg->timeslice_timeout = 0; 286 tsg->timeslice_timeout = 0;
287 tsg->timeslice_scale = 0; 287 tsg->timeslice_scale = 0;
288 tsg->runlist_id = ~0; 288 tsg->runlist_id = ~0;
289 tsg->tgid = nvgpu_current_pid(g); 289 tsg->tgid = pid;
290 290
291 if (g->ops.fifo.init_eng_method_buffers) 291 if (g->ops.fifo.init_eng_method_buffers)
292 g->ops.fifo.init_eng_method_buffers(g, tsg); 292 g->ops.fifo.init_eng_method_buffers(g, tsg);