From f19f22fcc8ef21b363b873c499cbd2e690af29f8 Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Fri, 15 Dec 2017 10:25:22 -0800 Subject: 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 Reviewed-on: https://git-master.nvidia.com/r/1618906 Reviewed-by: Deepak Nibade Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/linux/vgpu/vgpu.c | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) (limited to 'drivers/gpu/nvgpu/common/linux/vgpu/vgpu.c') 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) static void vgpu_handle_channel_event(struct gk20a *g, struct tegra_vgpu_channel_event_info *info) { + struct tsg_gk20a *tsg; + + if (!info->is_tsg) { + nvgpu_err(g, "channel event posted"); + return; + } + if (info->id >= g->fifo.num_channels || info->event_id >= NVGPU_IOCTL_CHANNEL_EVENT_ID_MAX) { nvgpu_err(g, "invalid channel event"); return; } - if (info->is_tsg) { - struct tsg_gk20a *tsg = &g->fifo.tsg[info->id]; + tsg = &g->fifo.tsg[info->id]; - gk20a_tsg_event_id_post_event(tsg, info->event_id); - } else { - struct channel_gk20a *ch = &g->fifo.channel[info->id]; - - if (!gk20a_channel_get(ch)) { - nvgpu_err(g, "invalid channel %d for event %d", - (int)info->id, (int)info->event_id); - return; - } - gk20a_channel_event_id_post_event(ch, info->event_id); - gk20a_channel_put(ch); - } + gk20a_tsg_event_id_post_event(tsg, info->event_id); } -- cgit v1.2.2