From ba2e59dc41f593bb011e0ec58c969337a35f4cf1 Mon Sep 17 00:00:00 2001 From: Konsta Holtta Date: Wed, 22 Nov 2017 15:57:11 +0200 Subject: 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 Reviewed-on: https://git-master.nvidia.com/r/1589321 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/channel_gk20a.h | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a/channel_gk20a.h') 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 @@ #ifndef CHANNEL_GK20A_H #define CHANNEL_GK20A_H -/* TODO: To be removed when work_struct update_fn_work is moved out of common code */ -#include - #include #include #include @@ -288,16 +285,6 @@ struct channel_gk20a { u64 virt_ctx; #endif - /* - * Signal channel owner via a callback, if set, in job cleanup with - * schedule_work. Means that something finished on the channel (perhaps - * more than one job). - */ - void (*update_fn)(struct channel_gk20a *, void *); - void *update_fn_data; - struct nvgpu_spinlock update_fn_lock; /* make access to the two above atomic */ - struct work_struct update_fn_work; - u32 interleave_level; u32 runlist_id; @@ -306,6 +293,9 @@ struct channel_gk20a { #ifdef CONFIG_TEGRA_19x_GPU struct channel_t19x t19x; #endif + + /* Any operating system specific data. */ + void *os_priv; }; static inline struct channel_gk20a * @@ -382,11 +372,6 @@ int gk20a_wait_channel_idle(struct channel_gk20a *ch); struct channel_gk20a *gk20a_open_new_channel(struct gk20a *g, s32 runlist_id, bool is_privileged_channel); -struct channel_gk20a *gk20a_open_new_channel_with_cb(struct gk20a *g, - void (*update_fn)(struct channel_gk20a *, void *), - void *update_fn_data, - int runlist_id, - bool is_privileged_channel); int gk20a_channel_alloc_gpfifo(struct channel_gk20a *c, unsigned int num_entries, -- cgit v1.2.2