summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/linux/channel.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/channel.h')
-rw-r--r--drivers/gpu/nvgpu/common/linux/channel.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/channel.h b/drivers/gpu/nvgpu/common/linux/channel.h
index 785c03d6..ba1935f3 100644
--- a/drivers/gpu/nvgpu/common/linux/channel.h
+++ b/drivers/gpu/nvgpu/common/linux/channel.h
@@ -16,6 +16,8 @@
16#ifndef __NVGPU_CHANNEL_H__ 16#ifndef __NVGPU_CHANNEL_H__
17#define __NVGPU_CHANNEL_H__ 17#define __NVGPU_CHANNEL_H__
18 18
19#include <linux/workqueue.h>
20
19#include <nvgpu/types.h> 21#include <nvgpu/types.h>
20 22
21struct channel_gk20a; 23struct channel_gk20a;
@@ -24,6 +26,36 @@ struct nvgpu_submit_gpfifo_args;
24struct nvgpu_fence; 26struct nvgpu_fence;
25struct gk20a_fence; 27struct gk20a_fence;
26struct fifo_profile_gk20a; 28struct fifo_profile_gk20a;
29struct nvgpu_os_linux;
30
31struct nvgpu_channel_completion_cb {
32 /*
33 * Signal channel owner via a callback, if set, in job cleanup with
34 * schedule_work. Means that something finished on the channel (perhaps
35 * more than one job).
36 */
37 void (*fn)(struct channel_gk20a *, void *);
38 void *user_data;
39 /* Make access to the two above atomic */
40 struct nvgpu_spinlock lock;
41 /* Per-channel async work task, cannot reschedule itself */
42 struct work_struct work;
43};
44
45struct nvgpu_channel_linux {
46 struct channel_gk20a *ch;
47
48 struct nvgpu_channel_completion_cb completion_cb;
49};
50
51int nvgpu_init_channel_support_linux(struct nvgpu_os_linux *l);
52void nvgpu_remove_channel_support_linux(struct nvgpu_os_linux *l);
53
54struct channel_gk20a *gk20a_open_new_channel_with_cb(struct gk20a *g,
55 void (*update_fn)(struct channel_gk20a *, void *),
56 void *update_fn_data,
57 int runlist_id,
58 bool is_privileged_channel);
27 59
28int gk20a_submit_channel_gpfifo(struct channel_gk20a *c, 60int gk20a_submit_channel_gpfifo(struct channel_gk20a *c,
29 struct nvgpu_gpfifo *gpfifo, 61 struct nvgpu_gpfifo *gpfifo,