From 434931799a7f0117a7ac718655b6df98de9d049c Mon Sep 17 00:00:00 2001 From: Seema Khowala Date: Fri, 22 Mar 2019 16:49:59 -0700 Subject: [PATCH] gpu: nvgpu: remove channel.check_ctxsw_timeout nvgpu_channel_check_ctxsw_timeout is removed as ctxsw timeout is not checked for channel that is not bound to tsg. JIRA NVGPU-1312 Change-Id: I8d12251e478a959d150b736206396c338575b2ec Signed-off-by: Seema Khowala Reviewed-on: https://git-master.nvidia.com/r/2079513 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/fifo/channel.c | 20 ------------------- .../nvgpu/common/vgpu/gp10b/vgpu_hal_gp10b.c | 1 - .../nvgpu/common/vgpu/gv11b/vgpu_hal_gv11b.c | 1 - drivers/gpu/nvgpu/gm20b/hal_gm20b.c | 1 - drivers/gpu/nvgpu/gp10b/hal_gp10b.c | 1 - drivers/gpu/nvgpu/gv100/hal_gv100.c | 1 - drivers/gpu/nvgpu/gv11b/hal_gv11b.c | 1 - drivers/gpu/nvgpu/include/nvgpu/channel.h | 2 -- drivers/gpu/nvgpu/include/nvgpu/gk20a.h | 2 -- drivers/gpu/nvgpu/tu104/hal_tu104.c | 1 - 10 files changed, 31 deletions(-) diff --git a/drivers/gpu/nvgpu/common/fifo/channel.c b/drivers/gpu/nvgpu/common/fifo/channel.c index b71d2d42f..fb4888f2f 100644 --- a/drivers/gpu/nvgpu/common/fifo/channel.c +++ b/drivers/gpu/nvgpu/common/fifo/channel.c @@ -1453,26 +1453,6 @@ bool nvgpu_channel_update_and_check_ctxsw_timeout(struct channel_gk20a *ch, ch->ctxsw_timeout_accumulated_ms > ch->ctxsw_timeout_max_ms; } -bool nvgpu_channel_check_ctxsw_timeout(struct channel_gk20a *ch, - bool *verbose, u32 *ms) -{ - bool recover = false; - bool progress = false; - struct gk20a *g = ch->g; - - recover = nvgpu_channel_update_and_check_ctxsw_timeout(ch, - g->ctxsw_timeout_period_ms, &progress); - *verbose = ch->ctxsw_timeout_debug_dump; - *ms = ch->ctxsw_timeout_accumulated_ms; - if (recover) { - nvgpu_channel_set_error_notifier(g, ch, - NVGPU_ERR_NOTIFIER_FIFO_ERROR_IDLE_TIMEOUT); - } - - return recover; -} - - void nvgpu_channel_recover(struct gk20a *g, struct channel_gk20a *ch, bool verbose, u32 rc_type) { diff --git a/drivers/gpu/nvgpu/common/vgpu/gp10b/vgpu_hal_gp10b.c b/drivers/gpu/nvgpu/common/vgpu/gp10b/vgpu_hal_gp10b.c index 1849d0682..86cf1f546 100644 --- a/drivers/gpu/nvgpu/common/vgpu/gp10b/vgpu_hal_gp10b.c +++ b/drivers/gpu/nvgpu/common/vgpu/gp10b/vgpu_hal_gp10b.c @@ -507,7 +507,6 @@ static const struct gpu_ops vgpu_gp10b_ops = { .enable = vgpu_channel_enable, .disable = vgpu_channel_disable, .count = vgpu_channel_count, - .check_ctxsw_timeout = nvgpu_channel_check_ctxsw_timeout, }, .tsg = { .check_ctxsw_timeout = nvgpu_tsg_check_ctxsw_timeout, diff --git a/drivers/gpu/nvgpu/common/vgpu/gv11b/vgpu_hal_gv11b.c b/drivers/gpu/nvgpu/common/vgpu/gv11b/vgpu_hal_gv11b.c index bdb403ede..5f205931d 100644 --- a/drivers/gpu/nvgpu/common/vgpu/gv11b/vgpu_hal_gv11b.c +++ b/drivers/gpu/nvgpu/common/vgpu/gv11b/vgpu_hal_gv11b.c @@ -587,7 +587,6 @@ static const struct gpu_ops vgpu_gv11b_ops = { .enable = vgpu_channel_enable, .disable = vgpu_channel_disable, .count = vgpu_channel_count, - .check_ctxsw_timeout = nvgpu_channel_check_ctxsw_timeout, }, .tsg = { .check_ctxsw_timeout = nvgpu_tsg_check_ctxsw_timeout, diff --git a/drivers/gpu/nvgpu/gm20b/hal_gm20b.c b/drivers/gpu/nvgpu/gm20b/hal_gm20b.c index 5fb7e4d6e..39ffa7756 100644 --- a/drivers/gpu/nvgpu/gm20b/hal_gm20b.c +++ b/drivers/gpu/nvgpu/gm20b/hal_gm20b.c @@ -666,7 +666,6 @@ static const struct gpu_ops gm20b_ops = { .count = gm20b_channel_count, .read_state = gk20a_channel_read_state, .force_ctx_reload = gm20b_channel_force_ctx_reload, - .check_ctxsw_timeout = nvgpu_channel_check_ctxsw_timeout, }, .tsg = { .check_ctxsw_timeout = nvgpu_tsg_check_ctxsw_timeout, diff --git a/drivers/gpu/nvgpu/gp10b/hal_gp10b.c b/drivers/gpu/nvgpu/gp10b/hal_gp10b.c index 1279224b9..ca9966d29 100644 --- a/drivers/gpu/nvgpu/gp10b/hal_gp10b.c +++ b/drivers/gpu/nvgpu/gp10b/hal_gp10b.c @@ -747,7 +747,6 @@ static const struct gpu_ops gp10b_ops = { .count = gm20b_channel_count, .read_state = gk20a_channel_read_state, .force_ctx_reload = gm20b_channel_force_ctx_reload, - .check_ctxsw_timeout = nvgpu_channel_check_ctxsw_timeout, }, .tsg = { .check_ctxsw_timeout = nvgpu_tsg_check_ctxsw_timeout, diff --git a/drivers/gpu/nvgpu/gv100/hal_gv100.c b/drivers/gpu/nvgpu/gv100/hal_gv100.c index 7e096a9d6..14e8e0df0 100644 --- a/drivers/gpu/nvgpu/gv100/hal_gv100.c +++ b/drivers/gpu/nvgpu/gv100/hal_gv100.c @@ -929,7 +929,6 @@ static const struct gpu_ops gv100_ops = { .read_state = gv11b_channel_read_state, .force_ctx_reload = gm20b_channel_force_ctx_reload, .reset_faulted = gv11b_channel_reset_faulted, - .check_ctxsw_timeout = nvgpu_channel_check_ctxsw_timeout, }, .tsg = { .check_ctxsw_timeout = nvgpu_tsg_check_ctxsw_timeout, diff --git a/drivers/gpu/nvgpu/gv11b/hal_gv11b.c b/drivers/gpu/nvgpu/gv11b/hal_gv11b.c index cd7f93d5a..f5ed0c085 100644 --- a/drivers/gpu/nvgpu/gv11b/hal_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/hal_gv11b.c @@ -886,7 +886,6 @@ static const struct gpu_ops gv11b_ops = { .read_state = gv11b_channel_read_state, .force_ctx_reload = gm20b_channel_force_ctx_reload, .reset_faulted = gv11b_channel_reset_faulted, - .check_ctxsw_timeout = nvgpu_channel_check_ctxsw_timeout, }, .tsg = { .check_ctxsw_timeout = nvgpu_tsg_check_ctxsw_timeout, diff --git a/drivers/gpu/nvgpu/include/nvgpu/channel.h b/drivers/gpu/nvgpu/include/nvgpu/channel.h index 8c65ef70d..d12e66e5d 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/channel.h +++ b/drivers/gpu/nvgpu/include/nvgpu/channel.h @@ -375,8 +375,6 @@ bool nvgpu_channel_mark_error(struct gk20a *g, struct channel_gk20a *ch); bool nvgpu_channel_update_and_check_ctxsw_timeout(struct channel_gk20a *ch, u32 timeout_delta_ms, bool *progress); -bool nvgpu_channel_check_ctxsw_timeout(struct channel_gk20a *ch, - bool *verbose, u32 *ms); void nvgpu_channel_recover(struct gk20a *g, struct channel_gk20a *ch, bool verbose, u32 rc_type); diff --git a/drivers/gpu/nvgpu/include/nvgpu/gk20a.h b/drivers/gpu/nvgpu/include/nvgpu/gk20a.h index f20af01ff..ed60496f9 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/gk20a.h +++ b/drivers/gpu/nvgpu/include/nvgpu/gk20a.h @@ -1042,8 +1042,6 @@ struct gpu_ops { void (*force_ctx_reload)(struct channel_gk20a *ch); void (*reset_faulted)(struct gk20a *g, struct channel_gk20a *ch, bool eng, bool pbdma); - bool (*check_ctxsw_timeout)(struct channel_gk20a *ch, - bool *verbose, u32 *ms); } channel; struct { bool (*check_ctxsw_timeout)(struct tsg_gk20a *tsg, diff --git a/drivers/gpu/nvgpu/tu104/hal_tu104.c b/drivers/gpu/nvgpu/tu104/hal_tu104.c index 2e5034ccd..ed3b0c909 100644 --- a/drivers/gpu/nvgpu/tu104/hal_tu104.c +++ b/drivers/gpu/nvgpu/tu104/hal_tu104.c @@ -966,7 +966,6 @@ static const struct gpu_ops tu104_ops = { .read_state = gv11b_channel_read_state, .force_ctx_reload = gm20b_channel_force_ctx_reload, .reset_faulted = gv11b_channel_reset_faulted, - .check_ctxsw_timeout = nvgpu_channel_check_ctxsw_timeout, }, .tsg = { .check_ctxsw_timeout = nvgpu_tsg_check_ctxsw_timeout,