diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gr_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gr_gk20a.c | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c index f2b083d7..cdc00bbd 100644 --- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c | |||
@@ -1561,19 +1561,6 @@ restore_fe_go_idle: | |||
1561 | if (err) | 1561 | if (err) |
1562 | goto clean_up; | 1562 | goto clean_up; |
1563 | 1563 | ||
1564 | nvgpu_kfree(g, gr->sm_error_states); | ||
1565 | |||
1566 | /* we need to allocate this after g->ops.gr.init_fs_state() since | ||
1567 | * we initialize gr->no_of_sm in this function | ||
1568 | */ | ||
1569 | gr->sm_error_states = nvgpu_kzalloc(g, | ||
1570 | sizeof(struct nvgpu_gr_sm_error_state) | ||
1571 | * gr->no_of_sm); | ||
1572 | if (!gr->sm_error_states) { | ||
1573 | err = -ENOMEM; | ||
1574 | goto restore_fe_go_idle; | ||
1575 | } | ||
1576 | |||
1577 | ctx_header_words = roundup(ctx_header_bytes, sizeof(u32)); | 1564 | ctx_header_words = roundup(ctx_header_bytes, sizeof(u32)); |
1578 | ctx_header_words >>= 2; | 1565 | ctx_header_words >>= 2; |
1579 | 1566 | ||
@@ -3072,7 +3059,6 @@ static void gk20a_remove_gr_support(struct gr_gk20a *gr) | |||
3072 | 3059 | ||
3073 | memset(&gr->compbit_store, 0, sizeof(struct compbit_store_desc)); | 3060 | memset(&gr->compbit_store, 0, sizeof(struct compbit_store_desc)); |
3074 | 3061 | ||
3075 | nvgpu_kfree(g, gr->sm_error_states); | ||
3076 | nvgpu_kfree(g, gr->gpc_tpc_count); | 3062 | nvgpu_kfree(g, gr->gpc_tpc_count); |
3077 | nvgpu_kfree(g, gr->gpc_zcb_count); | 3063 | nvgpu_kfree(g, gr->gpc_zcb_count); |
3078 | nvgpu_kfree(g, gr->gpc_ppc_count); | 3064 | nvgpu_kfree(g, gr->gpc_ppc_count); |
@@ -4545,22 +4531,6 @@ restore_fe_go_idle: | |||
4545 | 4531 | ||
4546 | err = gr_gk20a_wait_idle(g, gk20a_get_gr_idle_timeout(g), | 4532 | err = gr_gk20a_wait_idle(g, gk20a_get_gr_idle_timeout(g), |
4547 | GR_IDLE_CHECK_DEFAULT); | 4533 | GR_IDLE_CHECK_DEFAULT); |
4548 | if (err) | ||
4549 | goto out; | ||
4550 | |||
4551 | nvgpu_kfree(g, gr->sm_error_states); | ||
4552 | |||
4553 | /* we need to allocate this after g->ops.gr.init_fs_state() since | ||
4554 | * we initialize gr->no_of_sm in this function | ||
4555 | */ | ||
4556 | gr->sm_error_states = nvgpu_kzalloc(g, | ||
4557 | sizeof(struct nvgpu_gr_sm_error_state) * | ||
4558 | gr->no_of_sm); | ||
4559 | if (!gr->sm_error_states) { | ||
4560 | err = -ENOMEM; | ||
4561 | goto restore_fe_go_idle; | ||
4562 | } | ||
4563 | |||
4564 | out: | 4534 | out: |
4565 | nvgpu_log_fn(g, "done"); | 4535 | nvgpu_log_fn(g, "done"); |
4566 | return err; | 4536 | return err; |