From 773b3f2034fbff98af7770e735347f536cbbb21a Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Tue, 10 May 2016 15:44:06 -0700 Subject: gpu: nvgpu: Do not program max ways evict Setting max_ways_evict reserves some of L2 for CB. In gk20a CB is in dedicated RAM, so we don't need to reserve space for it. The code gets invoked only on gk20a. Change-Id: Ib8efec8c5e90c135bd0c10bb1eaa3f797ec68698 Signed-off-by: Terje Bergstrom Reviewed-on: http://git-master/r/1144993 --- drivers/gpu/nvgpu/gk20a/gk20a.h | 1 - drivers/gpu/nvgpu/gk20a/gr_gk20a.c | 7 ------- drivers/gpu/nvgpu/gk20a/ltc_common.c | 14 -------------- drivers/gpu/nvgpu/gk20a/ltc_gk20a.c | 1 - drivers/gpu/nvgpu/gm20b/ltc_gm20b.c | 1 - 5 files changed, 24 deletions(-) diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h index 2f85bf96..8dfe8eda 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gk20a.h @@ -101,7 +101,6 @@ enum nvgpu_litter_value { struct gpu_ops { struct { int (*determine_L2_size_bytes)(struct gk20a *gk20a); - void (*set_max_ways_evict_last)(struct gk20a *g, u32 max_ways); int (*init_comptags)(struct gk20a *g, struct gr_gk20a *gr); int (*cbc_ctrl)(struct gk20a *g, enum gk20a_cbc_op op, u32 min, u32 max); diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c index 4638d597..c98da273 100644 --- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c @@ -1293,7 +1293,6 @@ static int gr_gk20a_ctx_state_floorsweep(struct gk20a *g) u32 tpc_offset, gpc_offset; u32 sm_id = 0, gpc_id = 0; u32 tpc_per_gpc; - u32 max_ways_evict = INVALID_MAX_WAYS; u32 gpc_stride = nvgpu_get_litter_value(g, GPU_LIT_GPC_STRIDE); u32 tpc_in_gpc_stride = nvgpu_get_litter_value(g, GPU_LIT_TPC_IN_GPC_STRIDE); @@ -1355,12 +1354,6 @@ static int gr_gk20a_ctx_state_floorsweep(struct gk20a *g) if (g->ops.gr.setup_alpha_beta_tables) g->ops.gr.setup_alpha_beta_tables(g, gr); - if (gr->num_fbps == 1) - max_ways_evict = 9; - - if (max_ways_evict != INVALID_MAX_WAYS) - g->ops.ltc.set_max_ways_evict_last(g, max_ways_evict); - for (gpc_index = 0; gpc_index < gr_pd_dist_skip_table__size_1_v() * 4; gpc_index += 4) { diff --git a/drivers/gpu/nvgpu/gk20a/ltc_common.c b/drivers/gpu/nvgpu/gk20a/ltc_common.c index cc0932d9..a4d16b67 100644 --- a/drivers/gpu/nvgpu/gk20a/ltc_common.c +++ b/drivers/gpu/nvgpu/gk20a/ltc_common.c @@ -24,20 +24,6 @@ #include "gk20a.h" #include "gr_gk20a.h" -/* - * Set the maximum number of ways that can have the "EVIST_LAST" class. - */ -static void gk20a_ltc_set_max_ways_evict_last(struct gk20a *g, u32 max_ways) -{ - u32 mgmt_reg; - - mgmt_reg = gk20a_readl(g, ltc_ltcs_ltss_tstg_set_mgmt_r()) & - ~ltc_ltcs_ltss_tstg_set_mgmt_max_ways_evict_last_f(~0); - mgmt_reg |= ltc_ltcs_ltss_tstg_set_mgmt_max_ways_evict_last_f(max_ways); - - gk20a_writel(g, ltc_ltcs_ltss_tstg_set_mgmt_r(), mgmt_reg); -} - /* * Sets the ZBC color for the passed index. */ diff --git a/drivers/gpu/nvgpu/gk20a/ltc_gk20a.c b/drivers/gpu/nvgpu/gk20a/ltc_gk20a.c index 0ce4f91a..a2ecb345 100644 --- a/drivers/gpu/nvgpu/gk20a/ltc_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/ltc_gk20a.c @@ -276,7 +276,6 @@ static int gk20a_determine_L2_size_bytes(struct gk20a *g) void gk20a_init_ltc(struct gpu_ops *gops) { gops->ltc.determine_L2_size_bytes = gk20a_determine_L2_size_bytes; - gops->ltc.set_max_ways_evict_last = gk20a_ltc_set_max_ways_evict_last; gops->ltc.init_comptags = gk20a_ltc_init_comptags; gops->ltc.cbc_ctrl = gk20a_ltc_cbc_ctrl; gops->ltc.set_zbc_color_entry = gk20a_ltc_set_zbc_color_entry; diff --git a/drivers/gpu/nvgpu/gm20b/ltc_gm20b.c b/drivers/gpu/nvgpu/gm20b/ltc_gm20b.c index 4fc9d51b..56df6a5d 100644 --- a/drivers/gpu/nvgpu/gm20b/ltc_gm20b.c +++ b/drivers/gpu/nvgpu/gm20b/ltc_gm20b.c @@ -394,7 +394,6 @@ void gm20b_init_ltc(struct gpu_ops *gops) { /* Gk20a reused ops. */ gops->ltc.determine_L2_size_bytes = gm20b_determine_L2_size_bytes; - gops->ltc.set_max_ways_evict_last = gk20a_ltc_set_max_ways_evict_last; gops->ltc.set_zbc_color_entry = gk20a_ltc_set_zbc_color_entry; gops->ltc.set_zbc_depth_entry = gk20a_ltc_set_zbc_depth_entry; gops->ltc.init_cbc = gk20a_ltc_init_cbc; -- cgit v1.2.2