summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/include
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/include')
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/comptags.h20
1 files changed, 19 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/include/nvgpu/comptags.h b/drivers/gpu/nvgpu/include/nvgpu/comptags.h
index 99e2d657..679a0f9e 100644
--- a/drivers/gpu/nvgpu/include/nvgpu/comptags.h
+++ b/drivers/gpu/nvgpu/include/nvgpu/comptags.h
@@ -74,6 +74,24 @@ int gk20a_alloc_or_get_comptags(struct gk20a *g,
74 struct gk20a_comptags *comptags); 74 struct gk20a_comptags *comptags);
75void gk20a_get_comptags(struct nvgpu_os_buffer *buf, 75void gk20a_get_comptags(struct nvgpu_os_buffer *buf,
76 struct gk20a_comptags *comptags); 76 struct gk20a_comptags *comptags);
77void gk20a_mark_comptags_cleared(struct nvgpu_os_buffer *buf); 77
78/*
79 * These functions must be used to synchronize comptags clear. The usage:
80 *
81 * if (gk20a_comptags_start_clear(os_buf)) {
82 * // we now hold the buffer lock for clearing
83 *
84 * bool successful = hw_clear_comptags();
85 *
86 * // mark the buf cleared (or not) and release the buffer lock
87 * gk20a_comptags_finish_clear(os_buf, successful);
88 * }
89 *
90 * If gk20a_start_comptags_clear() returns false, another caller has
91 * already cleared the comptags.
92 */
93bool gk20a_comptags_start_clear(struct nvgpu_os_buffer *buf);
94void gk20a_comptags_finish_clear(struct nvgpu_os_buffer *buf,
95 bool clear_successful);
78 96
79#endif 97#endif