diff options
author | Richard Zhao <rizhao@nvidia.com> | 2018-03-20 18:30:07 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-03-29 21:54:58 -0400 |
commit | 0d97b549892be7b91d4497f055c62e681e12a075 (patch) | |
tree | 37a444ce4139950be7af5afbbd256c9ba87ac1a3 /drivers/gpu/nvgpu/vgpu/vgpu.c | |
parent | 8673813634ed3095cba228dd0ee5f1e49ac325ee (diff) |
gpu: nvgpu: vgpu: add TEGRA_VGPU_EVENT_SET_ERROR_NOTIFIER
RM server will notify clients with TEGRA_VGPU_EVENT_SET_ERROR_NOTIFIER
whenever .set_error_notifier is called. Clients will set error notifier
accordingly.
Jira VQRM-3058
Change-Id: I2f435335867cce5dfd7fddb718ac6a1ff7cd66ae
Signed-off-by: Richard Zhao <rizhao@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1679711
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.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/vgpu/vgpu.c b/drivers/gpu/nvgpu/vgpu/vgpu.c index 08556ee5..1e77cda9 100644 --- a/drivers/gpu/nvgpu/vgpu/vgpu.c +++ b/drivers/gpu/nvgpu/vgpu/vgpu.c | |||
@@ -122,6 +122,20 @@ static void vgpu_channel_abort_cleanup(struct gk20a *g, u32 chid) | |||
122 | g->ops.fifo.ch_abort_clean_up(ch); | 122 | g->ops.fifo.ch_abort_clean_up(ch); |
123 | } | 123 | } |
124 | 124 | ||
125 | static void vgpu_set_error_notifier(struct gk20a *g, | ||
126 | struct tegra_vgpu_channel_set_error_notifier *p) | ||
127 | { | ||
128 | struct channel_gk20a *ch; | ||
129 | |||
130 | if (p->chid >= g->fifo.num_channels) { | ||
131 | nvgpu_err(g, "invalid chid %d", p->chid); | ||
132 | return; | ||
133 | } | ||
134 | |||
135 | ch = &g->fifo.channel[p->chid]; | ||
136 | g->ops.fifo.set_error_notifier(ch, p->error); | ||
137 | } | ||
138 | |||
125 | int vgpu_intr_thread(void *dev_id) | 139 | int vgpu_intr_thread(void *dev_id) |
126 | { | 140 | { |
127 | struct gk20a *g = dev_id; | 141 | struct gk20a *g = dev_id; |
@@ -181,6 +195,10 @@ int vgpu_intr_thread(void *dev_id) | |||
181 | vgpu_channel_abort_cleanup(g, | 195 | vgpu_channel_abort_cleanup(g, |
182 | msg->info.ch_cleanup.chid); | 196 | msg->info.ch_cleanup.chid); |
183 | break; | 197 | break; |
198 | case TEGRA_VGPU_EVENT_SET_ERROR_NOTIFIER: | ||
199 | vgpu_set_error_notifier(g, | ||
200 | &msg->info.set_error_notifier); | ||
201 | break; | ||
184 | default: | 202 | default: |
185 | nvgpu_err(g, "unknown event %u", msg->event); | 203 | nvgpu_err(g, "unknown event %u", msg->event); |
186 | break; | 204 | break; |