From 57a75c3ba632a0300b932ce574ea3caab8275f4c Mon Sep 17 00:00:00 2001 From: Seshendra Gadagottu Date: Mon, 14 Mar 2016 12:00:05 -0700 Subject: gpu: nvgpu: gp10b: update prod setiings Add/update following prod settings: blcg ce slcg ce2 Change-Id: I10a62d980479ad23efd7033d29e269c4aac08834 Signed-off-by: Seshendra Gadagottu Reviewed-on: http://git-master/r/1030986 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom --- drivers/gpu/nvgpu/gp10b/gp10b_gating_reglist.c | 20 ++++++++++++++++++++ drivers/gpu/nvgpu/gp10b/gp10b_gating_reglist.h | 8 +++++++- drivers/gpu/nvgpu/gp10b/hal_gp10b.c | 6 +++++- 3 files changed, 32 insertions(+), 2 deletions(-) (limited to 'drivers/gpu/nvgpu/gp10b') diff --git a/drivers/gpu/nvgpu/gp10b/gp10b_gating_reglist.c b/drivers/gpu/nvgpu/gp10b/gp10b_gating_reglist.c index 6bcd9f35..4719b13e 100644 --- a/drivers/gpu/nvgpu/gp10b/gp10b_gating_reglist.c +++ b/drivers/gpu/nvgpu/gp10b/gp10b_gating_reglist.c @@ -163,6 +163,11 @@ static const struct gating_desc gp10b_blcg_bus[] = { {.addr = 0x00001c00, .prod = 0x00000042, .disable = 0x00000000}, }; +/* blcg ce */ +static const struct gating_desc gp10b_blcg_ce[] = { + {.addr = 0x00104200, .prod = 0x00008242, .disable = 0x00000000}, +}; + /* blcg ctxsw prog */ static const struct gating_desc gp10b_blcg_ctxsw_prog[] = { }; @@ -483,6 +488,21 @@ void gp10b_blcg_bus_load_gating_prod(struct gk20a *g, } } +void gp10b_blcg_ce_load_gating_prod(struct gk20a *g, + bool prod) +{ + u32 i; + u32 size = sizeof(gp10b_blcg_ce) / sizeof(struct gating_desc); + for (i = 0; i < size; i++) { + if (prod) + gk20a_writel(g, gp10b_blcg_ce[i].addr, + gp10b_blcg_ce[i].prod); + else + gk20a_writel(g, gp10b_blcg_ce[i].addr, + gp10b_blcg_ce[i].disable); + } +} + void gp10b_blcg_ctxsw_firmware_load_gating_prod(struct gk20a *g, bool prod) { diff --git a/drivers/gpu/nvgpu/gp10b/gp10b_gating_reglist.h b/drivers/gpu/nvgpu/gp10b/gp10b_gating_reglist.h index 465a0b4d..e4080def 100644 --- a/drivers/gpu/nvgpu/gp10b/gp10b_gating_reglist.h +++ b/drivers/gpu/nvgpu/gp10b/gp10b_gating_reglist.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, NVIDIA Corporation. All rights reserved. + * Copyright (c) 2015-2016, NVIDIA Corporation. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, @@ -19,6 +19,9 @@ void gp10b_slcg_bus_load_gating_prod(struct gk20a *g, bool prod); +void gp10b_slcg_ce2_load_gating_prod(struct gk20a *g, + bool prod); + void gp10b_slcg_chiplet_load_gating_prod(struct gk20a *g, bool prod); @@ -58,6 +61,9 @@ void gp10b_slcg_xbar_load_gating_prod(struct gk20a *g, void gp10b_blcg_bus_load_gating_prod(struct gk20a *g, bool prod); +void gp10b_blcg_ce_load_gating_prod(struct gk20a *g, + bool prod); + void gp10b_blcg_ctxsw_firmware_load_gating_prod(struct gk20a *g, bool prod); diff --git a/drivers/gpu/nvgpu/gp10b/hal_gp10b.c b/drivers/gpu/nvgpu/gp10b/hal_gp10b.c index 544be96b..37fad41a 100644 --- a/drivers/gpu/nvgpu/gp10b/hal_gp10b.c +++ b/drivers/gpu/nvgpu/gp10b/hal_gp10b.c @@ -1,7 +1,7 @@ /* * GP10B Tegra HAL interface * - * Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2014-2016, NVIDIA CORPORATION. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, @@ -47,6 +47,8 @@ static struct gpu_ops gp10b_ops = { .clock_gating = { .slcg_bus_load_gating_prod = gp10b_slcg_bus_load_gating_prod, + .slcg_ce2_load_gating_prod = + gp10b_slcg_ce2_load_gating_prod, .slcg_chiplet_load_gating_prod = gp10b_slcg_chiplet_load_gating_prod, .slcg_ctxsw_firmware_load_gating_prod = @@ -71,6 +73,8 @@ static struct gpu_ops gp10b_ops = { gp10b_slcg_xbar_load_gating_prod, .blcg_bus_load_gating_prod = gp10b_blcg_bus_load_gating_prod, + .blcg_ce_load_gating_prod = + gp10b_blcg_ce_load_gating_prod, .blcg_ctxsw_firmware_load_gating_prod = gp10b_blcg_ctxsw_firmware_load_gating_prod, .blcg_fb_load_gating_prod = -- cgit v1.2.2