From d44b5ecc30eaf4c307d56ee6205f8ca0b0f737c4 Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Mon, 30 Nov 2015 09:30:22 -0800 Subject: gpu: nvgpu: Recreate HW headers Add gradual slowdown registers, and fix names for L2 flush registers. Change-Id: If085c4febef494ae299d2147ca5201cd373bee0b Signed-off-by: Terje Bergstrom Reviewed-on: http://git-master/r/839369 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Seshendra Gadagottu --- drivers/gpu/nvgpu/gp10b/hw_flush_gp10b.h | 20 +++--- drivers/gpu/nvgpu/gp10b/hw_pwr_gp10b.h | 2 +- drivers/gpu/nvgpu/gp10b/hw_therm_gp10b.h | 120 +++++++++++++++++++++++++++++++ 3 files changed, 131 insertions(+), 11 deletions(-) (limited to 'drivers') diff --git a/drivers/gpu/nvgpu/gp10b/hw_flush_gp10b.h b/drivers/gpu/nvgpu/gp10b/hw_flush_gp10b.h index f442991e..e2dff490 100644 --- a/drivers/gpu/nvgpu/gp10b/hw_flush_gp10b.h +++ b/drivers/gpu/nvgpu/gp10b/hw_flush_gp10b.h @@ -114,43 +114,43 @@ static inline u32 flush_l2_flush_dirty_outstanding_true_v(void) { return 0x00000001; } -static inline u32 flush_clean_comptags_r(void) +static inline u32 flush_l2_clean_comptags_r(void) { return 0x0007000c; } -static inline u32 flush_clean_comptags_pending_v(u32 r) +static inline u32 flush_l2_clean_comptags_pending_v(u32 r) { return (r >> 0) & 0x1; } -static inline u32 flush_clean_comptags_pending_empty_v(void) +static inline u32 flush_l2_clean_comptags_pending_empty_v(void) { return 0x00000000; } -static inline u32 flush_clean_comptags_pending_empty_f(void) +static inline u32 flush_l2_clean_comptags_pending_empty_f(void) { return 0x0; } -static inline u32 flush_clean_comptags_pending_busy_v(void) +static inline u32 flush_l2_clean_comptags_pending_busy_v(void) { return 0x00000001; } -static inline u32 flush_clean_comptags_pending_busy_f(void) +static inline u32 flush_l2_clean_comptags_pending_busy_f(void) { return 0x1; } -static inline u32 flush_clean_comptags_outstanding_v(u32 r) +static inline u32 flush_l2_clean_comptags_outstanding_v(u32 r) { return (r >> 1) & 0x1; } -static inline u32 flush_clean_comptags_outstanding_false_v(void) +static inline u32 flush_l2_clean_comptags_outstanding_false_v(void) { return 0x00000000; } -static inline u32 flush_clean_comptags_outstanding_false_f(void) +static inline u32 flush_l2_clean_comptags_outstanding_false_f(void) { return 0x0; } -static inline u32 flush_clean_comptags_outstanding_true_v(void) +static inline u32 flush_l2_clean_comptags_outstanding_true_v(void) { return 0x00000001; } diff --git a/drivers/gpu/nvgpu/gp10b/hw_pwr_gp10b.h b/drivers/gpu/nvgpu/gp10b/hw_pwr_gp10b.h index f66812d6..75bf59a3 100644 --- a/drivers/gpu/nvgpu/gp10b/hw_pwr_gp10b.h +++ b/drivers/gpu/nvgpu/gp10b/hw_pwr_gp10b.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2014-2015, 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, diff --git a/drivers/gpu/nvgpu/gp10b/hw_therm_gp10b.h b/drivers/gpu/nvgpu/gp10b/hw_therm_gp10b.h index aed75481..17b1fb7e 100644 --- a/drivers/gpu/nvgpu/gp10b/hw_therm_gp10b.h +++ b/drivers/gpu/nvgpu/gp10b/hw_therm_gp10b.h @@ -170,6 +170,18 @@ static inline u32 therm_config1_r(void) { return 0x00020050; } +static inline u32 therm_config2_r(void) +{ + return 0x00020130; +} +static inline u32 therm_config2_slowdown_factor_extended_f(u32 v) +{ + return (v & 0x1) << 24; +} +static inline u32 therm_config2_grad_enable_f(u32 v) +{ + return (v & 0x1) << 31; +} static inline u32 therm_gate_ctrl_r(u32 i) { return 0x00020200 + i*4; @@ -278,4 +290,112 @@ static inline u32 therm_clk_slowdown_idle_factor_disabled_f(void) { return 0x0; } +static inline u32 therm_grad_stepping_table_r(u32 i) +{ + return 0x000202c8 + i*4; +} +static inline u32 therm_grad_stepping_table_slowdown_factor0_f(u32 v) +{ + return (v & 0x3f) << 0; +} +static inline u32 therm_grad_stepping_table_slowdown_factor0_m(void) +{ + return 0x3f << 0; +} +static inline u32 therm_grad_stepping_table_slowdown_factor0_fpdiv_by1p5_f(void) +{ + return 0x1; +} +static inline u32 therm_grad_stepping_table_slowdown_factor0_fpdiv_by2_f(void) +{ + return 0x2; +} +static inline u32 therm_grad_stepping_table_slowdown_factor0_fpdiv_by4_f(void) +{ + return 0x6; +} +static inline u32 therm_grad_stepping_table_slowdown_factor0_fpdiv_by8_f(void) +{ + return 0xe; +} +static inline u32 therm_grad_stepping_table_slowdown_factor1_f(u32 v) +{ + return (v & 0x3f) << 6; +} +static inline u32 therm_grad_stepping_table_slowdown_factor1_m(void) +{ + return 0x3f << 6; +} +static inline u32 therm_grad_stepping_table_slowdown_factor2_f(u32 v) +{ + return (v & 0x3f) << 12; +} +static inline u32 therm_grad_stepping_table_slowdown_factor2_m(void) +{ + return 0x3f << 12; +} +static inline u32 therm_grad_stepping_table_slowdown_factor3_f(u32 v) +{ + return (v & 0x3f) << 18; +} +static inline u32 therm_grad_stepping_table_slowdown_factor3_m(void) +{ + return 0x3f << 18; +} +static inline u32 therm_grad_stepping_table_slowdown_factor4_f(u32 v) +{ + return (v & 0x3f) << 24; +} +static inline u32 therm_grad_stepping_table_slowdown_factor4_m(void) +{ + return 0x3f << 24; +} +static inline u32 therm_grad_stepping0_r(void) +{ + return 0x000202c0; +} +static inline u32 therm_grad_stepping0_feature_s(void) +{ + return 1; +} +static inline u32 therm_grad_stepping0_feature_f(u32 v) +{ + return (v & 0x1) << 0; +} +static inline u32 therm_grad_stepping0_feature_m(void) +{ + return 0x1 << 0; +} +static inline u32 therm_grad_stepping0_feature_v(u32 r) +{ + return (r >> 0) & 0x1; +} +static inline u32 therm_grad_stepping0_feature_enable_f(void) +{ + return 0x1; +} +static inline u32 therm_grad_stepping1_r(void) +{ + return 0x000202c4; +} +static inline u32 therm_grad_stepping1_pdiv_duration_f(u32 v) +{ + return (v & 0x1ffff) << 0; +} +static inline u32 therm_clk_timing_r(u32 i) +{ + return 0x000203c0 + i*4; +} +static inline u32 therm_clk_timing_grad_slowdown_f(u32 v) +{ + return (v & 0x1) << 16; +} +static inline u32 therm_clk_timing_grad_slowdown_m(void) +{ + return 0x1 << 16; +} +static inline u32 therm_clk_timing_grad_slowdown_enabled_f(void) +{ + return 0x10000; +} #endif -- cgit v1.2.2