From 0f5e0b692fbadc0eb88424752730772ae9360ce9 Mon Sep 17 00:00:00 2001 From: Prashant Gaikwad Date: Wed, 26 Feb 2014 23:08:59 -0800 Subject: video: tegra: host: t210: Fix ops Change-Id: I99deddd7323f9ee7f8de4a032296ceeaebd81a95 Signed-off-by: Prashant Gaikwad Reviewed-on: http://git-master/r/375310 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Terje Bergstrom Reviewed-by: Bo Yan --- drivers/gpu/nvgpu/gk20a/gk20a.c | 59 ----------------------------------------- 1 file changed, 59 deletions(-) (limited to 'drivers/gpu/nvgpu') diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c index 39ff605b..5eab4ba0 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a.c @@ -1585,65 +1585,6 @@ void gk20a_reset(struct gk20a *g, u32 units) gk20a_enable(g, units); } -static u32 gk20a_determine_L2_size_bytes(struct gk20a *g) -{ - const u32 gpuid = GK20A_GPUID(g->gpu_characteristics.arch, - g->gpu_characteristics.impl); - u32 lts_per_ltc; - u32 ways; - u32 sets; - u32 bytes_per_line; - u32 active_ltcs; - u32 cache_size; - - u32 tmp; - u32 active_sets_value; - - tmp = gk20a_readl(g, ltc_ltc0_lts0_tstg_cfg1_r()); - ways = hweight32(ltc_ltc0_lts0_tstg_cfg1_active_ways_v(tmp)); - - active_sets_value = ltc_ltc0_lts0_tstg_cfg1_active_sets_v(tmp); - if (active_sets_value == ltc_ltc0_lts0_tstg_cfg1_active_sets_all_v()) { - sets = 64; - } else if (active_sets_value == - ltc_ltc0_lts0_tstg_cfg1_active_sets_half_v()) { - sets = 32; - } else if (active_sets_value == - ltc_ltc0_lts0_tstg_cfg1_active_sets_quarter_v()) { - sets = 16; - } else { - dev_err(dev_from_gk20a(g), - "Unknown constant %u for active sets", - (unsigned)active_sets_value); - sets = 0; - } - - active_ltcs = g->gr.num_fbps; - - /* chip-specific values */ - switch (gpuid) { - case GK20A_GPUID_GK20A: - lts_per_ltc = 1; - bytes_per_line = 128; - break; - - case GK20A_GPUID_GM20B: - lts_per_ltc = 2; - bytes_per_line = 128; - break; - - default: - dev_err(dev_from_gk20a(g), "Unknown GPU id 0x%02x\n", - (unsigned)gpuid); - lts_per_ltc = 0; - bytes_per_line = 0; - } - - cache_size = active_ltcs * lts_per_ltc * ways * sets * bytes_per_line; - - return cache_size; -} - int gk20a_init_gpu_characteristics(struct gk20a *g) { struct nvhost_gpu_characteristics *gpu = &g->gpu_characteristics; -- cgit v1.2.2