summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/ce2_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/ce2_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/ce2_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/ce2_gk20a.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/ce2_gk20a.c b/drivers/gpu/nvgpu/gk20a/ce2_gk20a.c
index 87eff813..6da65abd 100644
--- a/drivers/gpu/nvgpu/gk20a/ce2_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/ce2_gk20a.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * GK20A Graphics Copy Engine (gr host) 2 * GK20A Graphics Copy Engine (gr host)
3 * 3 *
4 * Copyright (c) 2011-2017, NVIDIA CORPORATION. All rights reserved. 4 * Copyright (c) 2011-2018, NVIDIA CORPORATION. All rights reserved.
5 * 5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a 6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the "Software"), 7 * copy of this software and associated documentation files (the "Software"),
@@ -24,6 +24,7 @@
24 24
25#include <nvgpu/kmem.h> 25#include <nvgpu/kmem.h>
26#include <nvgpu/dma.h> 26#include <nvgpu/dma.h>
27#include <nvgpu/os_sched.h>
27 28
28#include "gk20a.h" 29#include "gk20a.h"
29 30
@@ -430,7 +431,7 @@ u32 gk20a_ce_create_context(struct gk20a *g,
430 ce_ctx->vm = g->mm.ce.vm; 431 ce_ctx->vm = g->mm.ce.vm;
431 432
432 /* allocate a tsg if needed */ 433 /* allocate a tsg if needed */
433 ce_ctx->tsg = gk20a_tsg_open(g); 434 ce_ctx->tsg = gk20a_tsg_open(g, nvgpu_current_pid(g));
434 if (!ce_ctx->tsg) { 435 if (!ce_ctx->tsg) {
435 nvgpu_err(g, "ce: gk20a tsg not available"); 436 nvgpu_err(g, "ce: gk20a tsg not available");
436 err = -ENOMEM; 437 err = -ENOMEM;
@@ -438,7 +439,8 @@ u32 gk20a_ce_create_context(struct gk20a *g,
438 } 439 }
439 440
440 /* always kernel client needs privileged channel */ 441 /* always kernel client needs privileged channel */
441 ce_ctx->ch = gk20a_open_new_channel(g, runlist_id, true); 442 ce_ctx->ch = gk20a_open_new_channel(g, runlist_id, true,
443 nvgpu_current_pid(g), nvgpu_current_tid(g));
442 if (!ce_ctx->ch) { 444 if (!ce_ctx->ch) {
443 nvgpu_err(g, "ce: gk20a channel not available"); 445 nvgpu_err(g, "ce: gk20a channel not available");
444 err = -ENOMEM; 446 err = -ENOMEM;