diff options
author | Richard Zhao <rizhao@nvidia.com> | 2016-05-26 19:34:38 -0400 |
---|---|---|
committer | Terje Bergstrom <tbergstrom@nvidia.com> | 2016-06-09 18:17:28 -0400 |
commit | c624f35383ab15f86d6a4ecac751d0836f154acf (patch) | |
tree | 3f25505c7c8145781818d261c7b5b8c12c2526ad /drivers/gpu/nvgpu/vgpu/fifo_vgpu.c | |
parent | e8b20c12cdc94f315c21fa9d9803851a9cf31b96 (diff) |
gpu: nvgpu: vgpu: add channel enable support
Bug 200173403
VFND-1568
Change-Id: I3636a77bbbbd719e961dce5ca7ca7bdd5aa33881
Signed-off-by: Richard Zhao <rizhao@nvidia.com>
Reviewed-on: http://git-master/r/1159620
(cherry picked from commit b22fb6518da15a09c3e298213af5e60b8e6907a2)
Reviewed-on: http://git-master/r/1155403
Reviewed-by: Aingara Paramakuru <aparamakuru@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/vgpu/fifo_vgpu.c')
-rw-r--r-- | drivers/gpu/nvgpu/vgpu/fifo_vgpu.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c b/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c index dad9464a..9591c72a 100644 --- a/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c +++ b/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c | |||
@@ -102,6 +102,23 @@ static void vgpu_channel_free_inst(struct gk20a *g, struct channel_gk20a *ch) | |||
102 | WARN_ON(err || msg.ret); | 102 | WARN_ON(err || msg.ret); |
103 | } | 103 | } |
104 | 104 | ||
105 | static void vgpu_channel_enable(struct channel_gk20a *ch) | ||
106 | { | ||
107 | struct gk20a_platform *platform = gk20a_get_platform(ch->g->dev); | ||
108 | struct tegra_vgpu_cmd_msg msg; | ||
109 | struct tegra_vgpu_channel_config_params *p = | ||
110 | &msg.params.channel_config; | ||
111 | int err; | ||
112 | |||
113 | gk20a_dbg_fn(""); | ||
114 | |||
115 | msg.cmd = TEGRA_VGPU_CMD_CHANNEL_ENABLE; | ||
116 | msg.handle = platform->virt_handle; | ||
117 | p->handle = ch->virt_ctx; | ||
118 | err = vgpu_comm_sendrecv(&msg, sizeof(msg), sizeof(msg)); | ||
119 | WARN_ON(err || msg.ret); | ||
120 | } | ||
121 | |||
105 | static void vgpu_channel_disable(struct channel_gk20a *ch) | 122 | static void vgpu_channel_disable(struct channel_gk20a *ch) |
106 | { | 123 | { |
107 | struct gk20a_platform *platform = gk20a_get_platform(ch->g->dev); | 124 | struct gk20a_platform *platform = gk20a_get_platform(ch->g->dev); |
@@ -741,7 +758,7 @@ void vgpu_init_fifo_ops(struct gpu_ops *gops) | |||
741 | { | 758 | { |
742 | gops->fifo.bind_channel = vgpu_channel_bind; | 759 | gops->fifo.bind_channel = vgpu_channel_bind; |
743 | gops->fifo.unbind_channel = vgpu_channel_unbind; | 760 | gops->fifo.unbind_channel = vgpu_channel_unbind; |
744 | gops->fifo.enable_channel = NULL; | 761 | gops->fifo.enable_channel = vgpu_channel_enable; |
745 | gops->fifo.disable_channel = vgpu_channel_disable; | 762 | gops->fifo.disable_channel = vgpu_channel_disable; |
746 | gops->fifo.alloc_inst = vgpu_channel_alloc_inst; | 763 | gops->fifo.alloc_inst = vgpu_channel_alloc_inst; |
747 | gops->fifo.free_inst = vgpu_channel_free_inst; | 764 | gops->fifo.free_inst = vgpu_channel_free_inst; |