summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/vgpu/vgpu.c
diff options
context:
space:
mode:
authorRichard Zhao <rizhao@nvidia.com>2018-03-20 18:33:56 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-03-29 21:54:55 -0400
commit8673813634ed3095cba228dd0ee5f1e49ac325ee (patch)
tree29ce5f56550a6f6742c6bbbe230f2af920b6c397 /drivers/gpu/nvgpu/vgpu/vgpu.c
parent717d99fcfab99e478499880d5742091d031fc76b (diff)
gpu: nvgpu: vgpu: add TEGRA_VGPU_EVENT_CHANNEL_CLEANUP
RM server uses the command to notify clients to abort and clean up a channel. Clients will set has_timedout at the same time. Jira VQRM-3058 Change-Id: Iebd28ccdae52dd789ee93d65c4e816b83df8d891 Signed-off-by: Richard Zhao <rizhao@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1679710 GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/vgpu/vgpu.c')
-rw-r--r--drivers/gpu/nvgpu/vgpu/vgpu.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/vgpu/vgpu.c b/drivers/gpu/nvgpu/vgpu/vgpu.c
index 3b53474d..08556ee5 100644
--- a/drivers/gpu/nvgpu/vgpu/vgpu.c
+++ b/drivers/gpu/nvgpu/vgpu/vgpu.c
@@ -114,6 +114,14 @@ static void vgpu_handle_channel_event(struct gk20a *g,
114 gk20a_tsg_event_id_post_event(tsg, info->event_id); 114 gk20a_tsg_event_id_post_event(tsg, info->event_id);
115} 115}
116 116
117static void vgpu_channel_abort_cleanup(struct gk20a *g, u32 chid)
118{
119 struct channel_gk20a *ch = &g->fifo.channel[chid];
120
121 ch->has_timedout = true;
122 g->ops.fifo.ch_abort_clean_up(ch);
123}
124
117int vgpu_intr_thread(void *dev_id) 125int vgpu_intr_thread(void *dev_id)
118{ 126{
119 struct gk20a *g = dev_id; 127 struct gk20a *g = dev_id;
@@ -169,6 +177,10 @@ int vgpu_intr_thread(void *dev_id)
169 g->ops.semaphore_wakeup(g, 177 g->ops.semaphore_wakeup(g,
170 !!msg->info.sem_wakeup.post_events); 178 !!msg->info.sem_wakeup.post_events);
171 break; 179 break;
180 case TEGRA_VGPU_EVENT_CHANNEL_CLEANUP:
181 vgpu_channel_abort_cleanup(g,
182 msg->info.ch_cleanup.chid);
183 break;
172 default: 184 default:
173 nvgpu_err(g, "unknown event %u", msg->event); 185 nvgpu_err(g, "unknown event %u", msg->event);
174 break; 186 break;