diff options
author | Richard Zhao <rizhao@nvidia.com> | 2018-03-16 18:56:44 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-03-29 21:54:11 -0400 |
commit | bcab5c148607867eea29e2a2ac82c6b967995525 (patch) | |
tree | 3b6d79621678a0583333b26a923336f9adbd05ca /drivers | |
parent | c5f03db98a20eb4e8b83fd350d293aab6986beff (diff) |
gpu: nvgpu: add gops.fifo.check_tsg_ctxsw_timeout/check_ch_ctxsw_timeout
RM Server acts differently for ctxsw timeout check. It won't check
GP_GET or accumulated timeouts, but notify guest and go to recovery.
Jira VQRM-3058
Change-Id: I428aea34dc517311eb7e73feb556145e916309fb
Signed-off-by: Richard Zhao <rizhao@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1679706
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | 4 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.h | 4 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gm20b/hal_gm20b.c | 2 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gp106/hal_gp106.c | 2 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gp10b/hal_gp10b.c | 2 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gv100/hal_gv100.c | 2 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gv11b/hal_gv11b.c | 2 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/vgpu/gp10b/vgpu_hal_gp10b.c | 2 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/vgpu/gv11b/vgpu_hal_gv11b.c | 2 |
9 files changed, 20 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c index f069b193..79aec7a2 100644 --- a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | |||
@@ -2216,10 +2216,10 @@ bool gk20a_fifo_handle_sched_error(struct gk20a *g) | |||
2216 | bool verbose = false; | 2216 | bool verbose = false; |
2217 | 2217 | ||
2218 | if (is_tsg) { | 2218 | if (is_tsg) { |
2219 | ret = gk20a_fifo_check_tsg_ctxsw_timeout( | 2219 | ret = g->ops.fifo.check_tsg_ctxsw_timeout( |
2220 | &f->tsg[id], &verbose, &ms); | 2220 | &f->tsg[id], &verbose, &ms); |
2221 | } else { | 2221 | } else { |
2222 | ret = gk20a_fifo_check_ch_ctxsw_timeout( | 2222 | ret = g->ops.fifo.check_ch_ctxsw_timeout( |
2223 | &f->channel[id], &verbose, &ms); | 2223 | &f->channel[id], &verbose, &ms); |
2224 | } | 2224 | } |
2225 | 2225 | ||
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h index 43284ba5..76413600 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gk20a.h | |||
@@ -629,6 +629,10 @@ struct gpu_ops { | |||
629 | u32 (*get_preempt_timeout)(struct gk20a *g); | 629 | u32 (*get_preempt_timeout)(struct gk20a *g); |
630 | void (*post_event_id)(struct tsg_gk20a *tsg, int event_id); | 630 | void (*post_event_id)(struct tsg_gk20a *tsg, int event_id); |
631 | void (*ch_abort_clean_up)(struct channel_gk20a *ch); | 631 | void (*ch_abort_clean_up)(struct channel_gk20a *ch); |
632 | bool (*check_tsg_ctxsw_timeout)(struct tsg_gk20a *tsg, | ||
633 | bool *verbose, u32 *ms); | ||
634 | bool (*check_ch_ctxsw_timeout)(struct channel_gk20a *ch, | ||
635 | bool *verbose, u32 *ms); | ||
632 | #ifdef CONFIG_TEGRA_GK20A_NVHOST | 636 | #ifdef CONFIG_TEGRA_GK20A_NVHOST |
633 | int (*alloc_syncpt_buf)(struct channel_gk20a *c, | 637 | int (*alloc_syncpt_buf)(struct channel_gk20a *c, |
634 | u32 syncpt_id, struct nvgpu_mem *syncpt_buf); | 638 | u32 syncpt_id, struct nvgpu_mem *syncpt_buf); |
diff --git a/drivers/gpu/nvgpu/gm20b/hal_gm20b.c b/drivers/gpu/nvgpu/gm20b/hal_gm20b.c index f2ae97cf..fa493192 100644 --- a/drivers/gpu/nvgpu/gm20b/hal_gm20b.c +++ b/drivers/gpu/nvgpu/gm20b/hal_gm20b.c | |||
@@ -439,6 +439,8 @@ static const struct gpu_ops gm20b_ops = { | |||
439 | .tsg_unbind_channel = gk20a_fifo_tsg_unbind_channel, | 439 | .tsg_unbind_channel = gk20a_fifo_tsg_unbind_channel, |
440 | .post_event_id = gk20a_tsg_event_id_post_event, | 440 | .post_event_id = gk20a_tsg_event_id_post_event, |
441 | .ch_abort_clean_up = gk20a_channel_abort_clean_up, | 441 | .ch_abort_clean_up = gk20a_channel_abort_clean_up, |
442 | .check_tsg_ctxsw_timeout = gk20a_fifo_check_tsg_ctxsw_timeout, | ||
443 | .check_ch_ctxsw_timeout = gk20a_fifo_check_ch_ctxsw_timeout, | ||
442 | #ifdef CONFIG_TEGRA_GK20A_NVHOST | 444 | #ifdef CONFIG_TEGRA_GK20A_NVHOST |
443 | .alloc_syncpt_buf = gk20a_fifo_alloc_syncpt_buf, | 445 | .alloc_syncpt_buf = gk20a_fifo_alloc_syncpt_buf, |
444 | .free_syncpt_buf = gk20a_fifo_free_syncpt_buf, | 446 | .free_syncpt_buf = gk20a_fifo_free_syncpt_buf, |
diff --git a/drivers/gpu/nvgpu/gp106/hal_gp106.c b/drivers/gpu/nvgpu/gp106/hal_gp106.c index d87af8d3..892e71f7 100644 --- a/drivers/gpu/nvgpu/gp106/hal_gp106.c +++ b/drivers/gpu/nvgpu/gp106/hal_gp106.c | |||
@@ -500,6 +500,8 @@ static const struct gpu_ops gp106_ops = { | |||
500 | .tsg_unbind_channel = gk20a_fifo_tsg_unbind_channel, | 500 | .tsg_unbind_channel = gk20a_fifo_tsg_unbind_channel, |
501 | .post_event_id = gk20a_tsg_event_id_post_event, | 501 | .post_event_id = gk20a_tsg_event_id_post_event, |
502 | .ch_abort_clean_up = gk20a_channel_abort_clean_up, | 502 | .ch_abort_clean_up = gk20a_channel_abort_clean_up, |
503 | .check_tsg_ctxsw_timeout = gk20a_fifo_check_tsg_ctxsw_timeout, | ||
504 | .check_ch_ctxsw_timeout = gk20a_fifo_check_ch_ctxsw_timeout, | ||
503 | #ifdef CONFIG_TEGRA_GK20A_NVHOST | 505 | #ifdef CONFIG_TEGRA_GK20A_NVHOST |
504 | .alloc_syncpt_buf = gk20a_fifo_alloc_syncpt_buf, | 506 | .alloc_syncpt_buf = gk20a_fifo_alloc_syncpt_buf, |
505 | .free_syncpt_buf = gk20a_fifo_free_syncpt_buf, | 507 | .free_syncpt_buf = gk20a_fifo_free_syncpt_buf, |
diff --git a/drivers/gpu/nvgpu/gp10b/hal_gp10b.c b/drivers/gpu/nvgpu/gp10b/hal_gp10b.c index 3461e184..4db7e557 100644 --- a/drivers/gpu/nvgpu/gp10b/hal_gp10b.c +++ b/drivers/gpu/nvgpu/gp10b/hal_gp10b.c | |||
@@ -471,6 +471,8 @@ static const struct gpu_ops gp10b_ops = { | |||
471 | .tsg_unbind_channel = gk20a_fifo_tsg_unbind_channel, | 471 | .tsg_unbind_channel = gk20a_fifo_tsg_unbind_channel, |
472 | .post_event_id = gk20a_tsg_event_id_post_event, | 472 | .post_event_id = gk20a_tsg_event_id_post_event, |
473 | .ch_abort_clean_up = gk20a_channel_abort_clean_up, | 473 | .ch_abort_clean_up = gk20a_channel_abort_clean_up, |
474 | .check_tsg_ctxsw_timeout = gk20a_fifo_check_tsg_ctxsw_timeout, | ||
475 | .check_ch_ctxsw_timeout = gk20a_fifo_check_ch_ctxsw_timeout, | ||
474 | #ifdef CONFIG_TEGRA_GK20A_NVHOST | 476 | #ifdef CONFIG_TEGRA_GK20A_NVHOST |
475 | .alloc_syncpt_buf = gk20a_fifo_alloc_syncpt_buf, | 477 | .alloc_syncpt_buf = gk20a_fifo_alloc_syncpt_buf, |
476 | .free_syncpt_buf = gk20a_fifo_free_syncpt_buf, | 478 | .free_syncpt_buf = gk20a_fifo_free_syncpt_buf, |
diff --git a/drivers/gpu/nvgpu/gv100/hal_gv100.c b/drivers/gpu/nvgpu/gv100/hal_gv100.c index 8ddc538a..f3e25ddd 100644 --- a/drivers/gpu/nvgpu/gv100/hal_gv100.c +++ b/drivers/gpu/nvgpu/gv100/hal_gv100.c | |||
@@ -512,6 +512,8 @@ static const struct gpu_ops gv100_ops = { | |||
512 | .tsg_unbind_channel = gk20a_fifo_tsg_unbind_channel, | 512 | .tsg_unbind_channel = gk20a_fifo_tsg_unbind_channel, |
513 | .post_event_id = gk20a_tsg_event_id_post_event, | 513 | .post_event_id = gk20a_tsg_event_id_post_event, |
514 | .ch_abort_clean_up = gk20a_channel_abort_clean_up, | 514 | .ch_abort_clean_up = gk20a_channel_abort_clean_up, |
515 | .check_tsg_ctxsw_timeout = gk20a_fifo_check_tsg_ctxsw_timeout, | ||
516 | .check_ch_ctxsw_timeout = gk20a_fifo_check_ch_ctxsw_timeout, | ||
515 | #ifdef CONFIG_TEGRA_GK20A_NVHOST | 517 | #ifdef CONFIG_TEGRA_GK20A_NVHOST |
516 | .alloc_syncpt_buf = gv11b_fifo_alloc_syncpt_buf, | 518 | .alloc_syncpt_buf = gv11b_fifo_alloc_syncpt_buf, |
517 | .free_syncpt_buf = gv11b_fifo_free_syncpt_buf, | 519 | .free_syncpt_buf = gv11b_fifo_free_syncpt_buf, |
diff --git a/drivers/gpu/nvgpu/gv11b/hal_gv11b.c b/drivers/gpu/nvgpu/gv11b/hal_gv11b.c index 9af5e96b..fbf8ad61 100644 --- a/drivers/gpu/nvgpu/gv11b/hal_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/hal_gv11b.c | |||
@@ -529,6 +529,8 @@ static const struct gpu_ops gv11b_ops = { | |||
529 | .tsg_unbind_channel = gk20a_fifo_tsg_unbind_channel, | 529 | .tsg_unbind_channel = gk20a_fifo_tsg_unbind_channel, |
530 | .post_event_id = gk20a_tsg_event_id_post_event, | 530 | .post_event_id = gk20a_tsg_event_id_post_event, |
531 | .ch_abort_clean_up = gk20a_channel_abort_clean_up, | 531 | .ch_abort_clean_up = gk20a_channel_abort_clean_up, |
532 | .check_tsg_ctxsw_timeout = gk20a_fifo_check_tsg_ctxsw_timeout, | ||
533 | .check_ch_ctxsw_timeout = gk20a_fifo_check_ch_ctxsw_timeout, | ||
532 | #ifdef CONFIG_TEGRA_GK20A_NVHOST | 534 | #ifdef CONFIG_TEGRA_GK20A_NVHOST |
533 | .alloc_syncpt_buf = gv11b_fifo_alloc_syncpt_buf, | 535 | .alloc_syncpt_buf = gv11b_fifo_alloc_syncpt_buf, |
534 | .free_syncpt_buf = gv11b_fifo_free_syncpt_buf, | 536 | .free_syncpt_buf = gv11b_fifo_free_syncpt_buf, |
diff --git a/drivers/gpu/nvgpu/vgpu/gp10b/vgpu_hal_gp10b.c b/drivers/gpu/nvgpu/vgpu/gp10b/vgpu_hal_gp10b.c index 819ca852..8b8c630d 100644 --- a/drivers/gpu/nvgpu/vgpu/gp10b/vgpu_hal_gp10b.c +++ b/drivers/gpu/nvgpu/vgpu/gp10b/vgpu_hal_gp10b.c | |||
@@ -345,6 +345,8 @@ static const struct gpu_ops vgpu_gp10b_ops = { | |||
345 | .tsg_unbind_channel = vgpu_tsg_unbind_channel, | 345 | .tsg_unbind_channel = vgpu_tsg_unbind_channel, |
346 | .post_event_id = gk20a_tsg_event_id_post_event, | 346 | .post_event_id = gk20a_tsg_event_id_post_event, |
347 | .ch_abort_clean_up = gk20a_channel_abort_clean_up, | 347 | .ch_abort_clean_up = gk20a_channel_abort_clean_up, |
348 | .check_tsg_ctxsw_timeout = gk20a_fifo_check_tsg_ctxsw_timeout, | ||
349 | .check_ch_ctxsw_timeout = gk20a_fifo_check_ch_ctxsw_timeout, | ||
348 | #ifdef CONFIG_TEGRA_GK20A_NVHOST | 350 | #ifdef CONFIG_TEGRA_GK20A_NVHOST |
349 | .alloc_syncpt_buf = gk20a_fifo_alloc_syncpt_buf, | 351 | .alloc_syncpt_buf = gk20a_fifo_alloc_syncpt_buf, |
350 | .free_syncpt_buf = gk20a_fifo_free_syncpt_buf, | 352 | .free_syncpt_buf = gk20a_fifo_free_syncpt_buf, |
diff --git a/drivers/gpu/nvgpu/vgpu/gv11b/vgpu_hal_gv11b.c b/drivers/gpu/nvgpu/vgpu/gv11b/vgpu_hal_gv11b.c index 92d401e9..5dbf6779 100644 --- a/drivers/gpu/nvgpu/vgpu/gv11b/vgpu_hal_gv11b.c +++ b/drivers/gpu/nvgpu/vgpu/gv11b/vgpu_hal_gv11b.c | |||
@@ -388,6 +388,8 @@ static const struct gpu_ops vgpu_gv11b_ops = { | |||
388 | .tsg_unbind_channel = vgpu_tsg_unbind_channel, | 388 | .tsg_unbind_channel = vgpu_tsg_unbind_channel, |
389 | .post_event_id = gk20a_tsg_event_id_post_event, | 389 | .post_event_id = gk20a_tsg_event_id_post_event, |
390 | .ch_abort_clean_up = gk20a_channel_abort_clean_up, | 390 | .ch_abort_clean_up = gk20a_channel_abort_clean_up, |
391 | .check_tsg_ctxsw_timeout = gk20a_fifo_check_tsg_ctxsw_timeout, | ||
392 | .check_ch_ctxsw_timeout = gk20a_fifo_check_ch_ctxsw_timeout, | ||
391 | #ifdef CONFIG_TEGRA_GK20A_NVHOST | 393 | #ifdef CONFIG_TEGRA_GK20A_NVHOST |
392 | .alloc_syncpt_buf = vgpu_gv11b_fifo_alloc_syncpt_buf, | 394 | .alloc_syncpt_buf = vgpu_gv11b_fifo_alloc_syncpt_buf, |
393 | .free_syncpt_buf = gv11b_fifo_free_syncpt_buf, | 395 | .free_syncpt_buf = gv11b_fifo_free_syncpt_buf, |