From ff5b12fffd7563ce0704fadbc9c479caf851d68c Mon Sep 17 00:00:00 2001 From: Sami Kiminki Date: Thu, 8 Feb 2018 23:29:41 +0200 Subject: gpu: nvgpu: gv11b: Fix CBC base calculus On GV11B, CBC base is calculated in similar fashion than it's calculated on dGPUs. Thus, remove gv11b_ltc_cbc_fix_config() as it would incorrectly multiply the CBC base by the LTC count. Bug 2054860 Change-Id: Iaed717161547468c17e12236149d970c497885b3 Signed-off-by: Sami Kiminki Reviewed-on: https://git-master.nvidia.com/r/1654506 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_hal_gv11b.c | 1 - drivers/gpu/nvgpu/gv11b/hal_gv11b.c | 1 - drivers/gpu/nvgpu/gv11b/ltc_gv11b.c | 12 ------------ drivers/gpu/nvgpu/gv11b/ltc_gv11b.h | 1 - 4 files changed, 15 deletions(-) diff --git a/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_hal_gv11b.c b/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_hal_gv11b.c index b9e44b03..987dd186 100644 --- a/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_hal_gv11b.c +++ b/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_hal_gv11b.c @@ -95,7 +95,6 @@ static const struct gpu_ops vgpu_gv11b_ops = { .init_comptags = vgpu_ltc_init_comptags, .cbc_ctrl = NULL, .isr = gv11b_ltc_isr, - .cbc_fix_config = gv11b_ltc_cbc_fix_config, .flush = gm20b_flush_ltc, .set_enabled = gp10b_ltc_set_enabled, }, diff --git a/drivers/gpu/nvgpu/gv11b/hal_gv11b.c b/drivers/gpu/nvgpu/gv11b/hal_gv11b.c index 72537b44..3ce557bc 100644 --- a/drivers/gpu/nvgpu/gv11b/hal_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/hal_gv11b.c @@ -236,7 +236,6 @@ static const struct gpu_ops gv11b_ops = { .init_comptags = gp10b_ltc_init_comptags, .cbc_ctrl = gp10b_ltc_cbc_ctrl, .isr = gv11b_ltc_isr, - .cbc_fix_config = gv11b_ltc_cbc_fix_config, .flush = gm20b_flush_ltc, .set_enabled = gp10b_ltc_set_enabled, }, diff --git a/drivers/gpu/nvgpu/gv11b/ltc_gv11b.c b/drivers/gpu/nvgpu/gv11b/ltc_gv11b.c index a596c3b2..9bfefa9e 100644 --- a/drivers/gpu/nvgpu/gv11b/ltc_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/ltc_gv11b.c @@ -187,15 +187,3 @@ void gv11b_ltc_isr(struct gk20a *g) /* fallback to other interrupts */ gp10b_ltc_isr(g); } - -u32 gv11b_ltc_cbc_fix_config(struct gk20a *g, int base) -{ - u32 val = gk20a_readl(g, ltc_ltcs_ltss_cbc_num_active_ltcs_r()); - - if (ltc_ltcs_ltss_cbc_num_active_ltcs__v(val) == 2) - return base * 2; - else if (ltc_ltcs_ltss_cbc_num_active_ltcs__v(val) != 1) { - nvgpu_err(g, "Invalid number of active ltcs: %08x", val); - } - return base; -} diff --git a/drivers/gpu/nvgpu/gv11b/ltc_gv11b.h b/drivers/gpu/nvgpu/gv11b/ltc_gv11b.h index 9b46e74c..8309e662 100644 --- a/drivers/gpu/nvgpu/gv11b/ltc_gv11b.h +++ b/drivers/gpu/nvgpu/gv11b/ltc_gv11b.h @@ -29,6 +29,5 @@ void gv11b_ltc_set_zbc_stencil_entry(struct gk20a *g, u32 index); void gv11b_ltc_init_fs_state(struct gk20a *g); void gv11b_ltc_isr(struct gk20a *g); -u32 gv11b_ltc_cbc_fix_config(struct gk20a *g, int base); #endif -- cgit v1.2.2