diff options
author | Konsta Holtta <kholtta@nvidia.com> | 2017-11-22 08:57:11 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-11-22 20:18:56 -0500 |
commit | ba2e59dc41f593bb011e0ec58c969337a35f4cf1 (patch) | |
tree | 12a4fcec144516a0e903e5495898e9072d7db27c /drivers/gpu/nvgpu/gk20a/channel_gk20a.h | |
parent | b498f4c5c0a0a5f1a59a9210a1ee4d1d8ae98be7 (diff) |
gpu: nvgpu: use submit callback only in linux code
Move the implementation for channel job update callbacks that is based
on Linux specific work_struct usage to Linux-specific code.
This requires a bit of extra work for allocating OS-specific priv data
for channels which is also done in this patch. The priv data will be
used more when more OS-specific features are moved.
Jira NVGPU-259
Change-Id: I24bc0148a827f375b56a1c96044685affc2d1e8c
Signed-off-by: Konsta Holtta <kholtta@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1589321
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/channel_gk20a.h')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/channel_gk20a.h | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.h b/drivers/gpu/nvgpu/gk20a/channel_gk20a.h index d865849b..8c9095b2 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.h | |||
@@ -24,9 +24,6 @@ | |||
24 | #ifndef CHANNEL_GK20A_H | 24 | #ifndef CHANNEL_GK20A_H |
25 | #define CHANNEL_GK20A_H | 25 | #define CHANNEL_GK20A_H |
26 | 26 | ||
27 | /* TODO: To be removed when work_struct update_fn_work is moved out of common code */ | ||
28 | #include <linux/workqueue.h> | ||
29 | |||
30 | #include <nvgpu/list.h> | 27 | #include <nvgpu/list.h> |
31 | #include <nvgpu/lock.h> | 28 | #include <nvgpu/lock.h> |
32 | #include <nvgpu/timers.h> | 29 | #include <nvgpu/timers.h> |
@@ -288,16 +285,6 @@ struct channel_gk20a { | |||
288 | u64 virt_ctx; | 285 | u64 virt_ctx; |
289 | #endif | 286 | #endif |
290 | 287 | ||
291 | /* | ||
292 | * Signal channel owner via a callback, if set, in job cleanup with | ||
293 | * schedule_work. Means that something finished on the channel (perhaps | ||
294 | * more than one job). | ||
295 | */ | ||
296 | void (*update_fn)(struct channel_gk20a *, void *); | ||
297 | void *update_fn_data; | ||
298 | struct nvgpu_spinlock update_fn_lock; /* make access to the two above atomic */ | ||
299 | struct work_struct update_fn_work; | ||
300 | |||
301 | u32 interleave_level; | 288 | u32 interleave_level; |
302 | 289 | ||
303 | u32 runlist_id; | 290 | u32 runlist_id; |
@@ -306,6 +293,9 @@ struct channel_gk20a { | |||
306 | #ifdef CONFIG_TEGRA_19x_GPU | 293 | #ifdef CONFIG_TEGRA_19x_GPU |
307 | struct channel_t19x t19x; | 294 | struct channel_t19x t19x; |
308 | #endif | 295 | #endif |
296 | |||
297 | /* Any operating system specific data. */ | ||
298 | void *os_priv; | ||
309 | }; | 299 | }; |
310 | 300 | ||
311 | static inline struct channel_gk20a * | 301 | static inline struct channel_gk20a * |
@@ -382,11 +372,6 @@ int gk20a_wait_channel_idle(struct channel_gk20a *ch); | |||
382 | struct channel_gk20a *gk20a_open_new_channel(struct gk20a *g, | 372 | struct channel_gk20a *gk20a_open_new_channel(struct gk20a *g, |
383 | s32 runlist_id, | 373 | s32 runlist_id, |
384 | bool is_privileged_channel); | 374 | bool is_privileged_channel); |
385 | struct channel_gk20a *gk20a_open_new_channel_with_cb(struct gk20a *g, | ||
386 | void (*update_fn)(struct channel_gk20a *, void *), | ||
387 | void *update_fn_data, | ||
388 | int runlist_id, | ||
389 | bool is_privileged_channel); | ||
390 | 375 | ||
391 | int gk20a_channel_alloc_gpfifo(struct channel_gk20a *c, | 376 | int gk20a_channel_alloc_gpfifo(struct channel_gk20a *c, |
392 | unsigned int num_entries, | 377 | unsigned int num_entries, |