diff options
Diffstat (limited to 'drivers/gpu/nvgpu/include')
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/ctxsw_trace.h | 20 |
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 @@ | |||
28 | struct gk20a; | 28 | struct gk20a; |
29 | struct tsg_gk20a; | 29 | struct tsg_gk20a; |
30 | struct channel_gk20a; | 30 | struct channel_gk20a; |
31 | struct 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 | */ | ||
38 | struct 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 | ||
33 | int gk20a_ctxsw_trace_init(struct gk20a *g); | 47 | int 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 | ||
38 | void gk20a_ctxsw_trace_cleanup(struct gk20a *g); | 52 | void gk20a_ctxsw_trace_cleanup(struct gk20a *g); |
39 | int gk20a_ctxsw_trace_write(struct gk20a *g, | 53 | int gk20a_ctxsw_trace_write(struct gk20a *g, |
40 | struct nvgpu_ctxsw_trace_entry *entry); | 54 | struct nvgpu_gpu_ctxsw_trace_entry *entry); |
41 | void gk20a_ctxsw_trace_wake_up(struct gk20a *g, int vmid); | 55 | void gk20a_ctxsw_trace_wake_up(struct gk20a *g, int vmid); |
42 | 56 | ||
43 | #ifdef CONFIG_GK20A_CTXSW_TRACE | 57 | #ifdef CONFIG_GK20A_CTXSW_TRACE |