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/common/linux/ioctl_tsg.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/gpu/nvgpu/common/linux/ioctl_tsg.c') 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 @@ #include #include +#include #include "gk20a/gk20a.h" #include "gk20a/tsg_gk20a.h" @@ -370,7 +371,7 @@ int nvgpu_ioctl_tsg_open(struct gk20a *g, struct file *filp) goto free_ref; } - tsg = gk20a_tsg_open(g); + tsg = gk20a_tsg_open(g, nvgpu_current_pid(g)); if (!tsg) { nvgpu_kfree(g, priv); err = -ENOMEM; -- cgit v1.2.2