summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/include
diff options
context:
space:
mode:
authorVaibhav Kachore <vkachore@nvidia.com>2018-08-20 05:18:33 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-08-31 15:16:01 -0400
commiteb97fc52a96887d9d85cbdc18eaa7d72eade43b2 (patch)
treea909a9d48a062db33ffa44162377274aa05dcdd7 /drivers/gpu/nvgpu/include
parent8c8cdacf7a022d1326ec519daa8b8da174aa8f3d (diff)
gpu: nvgpu: remove use of nvgpu_ctxsw_trace_entry
- Remove the usage of nvgpu_ctxsw_trace_entry splattered across nvgpu, and replace with a struct defined in common code. The usage is still inside Linux, but this helps the subsequent unification efforts, e.g. to unify the fecs trace path. - Remove "asm/barrier.h" as "nvgpu/barrier.h" is already included. EVLR-3078 Change-Id: Iabfb105b891b0078ed326a8047ef14ebe1888cf2 Signed-off-by: Vaibhav Kachore <vkachore@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1803208 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/include')
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/ctxsw_trace.h20
1 files changed, 17 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/include/nvgpu/ctxsw_trace.h b/drivers/gpu/nvgpu/include/nvgpu/ctxsw_trace.h
index cc6edb49..6e54d1cc 100644
--- a/drivers/gpu/nvgpu/include/nvgpu/ctxsw_trace.h
+++ b/drivers/gpu/nvgpu/include/nvgpu/ctxsw_trace.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved. 2 * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
3 * 3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a 4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"), 5 * copy of this software and associated documentation files (the "Software"),
@@ -28,7 +28,21 @@
28struct gk20a; 28struct gk20a;
29struct tsg_gk20a; 29struct tsg_gk20a;
30struct channel_gk20a; 30struct channel_gk20a;
31struct nvgpu_ctxsw_trace_entry; 31
32/*
33 * The binary format of 'struct nvgpu_gpu_ctxsw_trace_entry' introduced here
34 * should match that of 'struct nvgpu_ctxsw_trace_entry' defined in uapi
35 * header, since this struct is intended to be a mirror copy of the uapi
36 * struct.
37 */
38struct nvgpu_gpu_ctxsw_trace_entry {
39 u8 tag;
40 u8 vmid;
41 u16 seqno; /* sequence number to detect drops */
42 u32 context_id; /* context_id as allocated by FECS */
43 u64 pid; /* 64-bit is max bits of different OS pid */
44 u64 timestamp; /* 64-bit time */
45};
32 46
33int gk20a_ctxsw_trace_init(struct gk20a *g); 47int gk20a_ctxsw_trace_init(struct gk20a *g);
34 48
@@ -37,7 +51,7 @@ void gk20a_ctxsw_trace_tsg_reset(struct gk20a *g, struct tsg_gk20a *tsg);
37 51
38void gk20a_ctxsw_trace_cleanup(struct gk20a *g); 52void gk20a_ctxsw_trace_cleanup(struct gk20a *g);
39int gk20a_ctxsw_trace_write(struct gk20a *g, 53int gk20a_ctxsw_trace_write(struct gk20a *g,
40 struct nvgpu_ctxsw_trace_entry *entry); 54 struct nvgpu_gpu_ctxsw_trace_entry *entry);
41void gk20a_ctxsw_trace_wake_up(struct gk20a *g, int vmid); 55void gk20a_ctxsw_trace_wake_up(struct gk20a *g, int vmid);
42 56
43#ifdef CONFIG_GK20A_CTXSW_TRACE 57#ifdef CONFIG_GK20A_CTXSW_TRACE