summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/linux/ioctl_tsg.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/common/linux/ioctl_tsg.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/common/linux/ioctl_tsg.c')
-rw-r--r--drivers/gpu/nvgpu/common/linux/ioctl_tsg.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/ioctl_tsg.c b/drivers/gpu/nvgpu/common/linux/ioctl_tsg.c
index 60aca5ec..be2315bd 100644
--- a/drivers/gpu/nvgpu/common/linux/ioctl_tsg.c
+++ b/drivers/gpu/nvgpu/common/linux/ioctl_tsg.c
@@ -24,6 +24,7 @@
24 24
25#include <nvgpu/kmem.h> 25#include <nvgpu/kmem.h>
26#include <nvgpu/log.h> 26#include <nvgpu/log.h>
27#include <nvgpu/os_sched.h>
27 28
28#include "gk20a/gk20a.h" 29#include "gk20a/gk20a.h"
29#include "gk20a/tsg_gk20a.h" 30#include "gk20a/tsg_gk20a.h"
@@ -370,7 +371,7 @@ int nvgpu_ioctl_tsg_open(struct gk20a *g, struct file *filp)
370 goto free_ref; 371 goto free_ref;
371 } 372 }
372 373
373 tsg = gk20a_tsg_open(g); 374 tsg = gk20a_tsg_open(g, nvgpu_current_pid(g));
374 if (!tsg) { 375 if (!tsg) {
375 nvgpu_kfree(g, priv); 376 nvgpu_kfree(g, priv);
376 err = -ENOMEM; 377 err = -ENOMEM;