summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/linux/vgpu/vgpu.c
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2017-12-15 13:25:22 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2017-12-28 13:01:32 -0500
commitf19f22fcc8ef21b363b873c499cbd2e690af29f8 (patch)
tree02d6b8280af305d0339ed860e331ab091d4b49d2 /drivers/gpu/nvgpu/common/linux/vgpu/vgpu.c
parentaa52601f620423fdd98b79e2c2c5e1d767a5f685 (diff)
gpu: nvgpu: Remove support for channel events
Remove support for events for bare channels. All users have already moved to TSGs and TSG events. Bug 1842197 Change-Id: Ib3ff68134ad9515ee761d0f0e19a3150a0b744ab Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1618906 Reviewed-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/vgpu/vgpu.c')
-rw-r--r--drivers/gpu/nvgpu/common/linux/vgpu/vgpu.c23
1 files changed, 9 insertions, 14 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/vgpu/vgpu.c b/drivers/gpu/nvgpu/common/linux/vgpu/vgpu.c
index 3ff68ec2..7900f53f 100644
--- a/drivers/gpu/nvgpu/common/linux/vgpu/vgpu.c
+++ b/drivers/gpu/nvgpu/common/linux/vgpu/vgpu.c
@@ -125,27 +125,22 @@ int vgpu_get_attribute(u64 handle, u32 attrib, u32 *value)
125static void vgpu_handle_channel_event(struct gk20a *g, 125static void vgpu_handle_channel_event(struct gk20a *g,
126 struct tegra_vgpu_channel_event_info *info) 126 struct tegra_vgpu_channel_event_info *info)
127{ 127{
128 struct tsg_gk20a *tsg;
129
130 if (!info->is_tsg) {
131 nvgpu_err(g, "channel event posted");
132 return;
133 }
134
128 if (info->id >= g->fifo.num_channels || 135 if (info->id >= g->fifo.num_channels ||
129 info->event_id >= NVGPU_IOCTL_CHANNEL_EVENT_ID_MAX) { 136 info->event_id >= NVGPU_IOCTL_CHANNEL_EVENT_ID_MAX) {
130 nvgpu_err(g, "invalid channel event"); 137 nvgpu_err(g, "invalid channel event");
131 return; 138 return;
132 } 139 }
133 140
134 if (info->is_tsg) { 141 tsg = &g->fifo.tsg[info->id];
135 struct tsg_gk20a *tsg = &g->fifo.tsg[info->id];
136 142
137 gk20a_tsg_event_id_post_event(tsg, info->event_id); 143 gk20a_tsg_event_id_post_event(tsg, info->event_id);
138 } else {
139 struct channel_gk20a *ch = &g->fifo.channel[info->id];
140
141 if (!gk20a_channel_get(ch)) {
142 nvgpu_err(g, "invalid channel %d for event %d",
143 (int)info->id, (int)info->event_id);
144 return;
145 }
146 gk20a_channel_event_id_post_event(ch, info->event_id);
147 gk20a_channel_put(ch);
148 }
149} 144}
150 145
151 146