summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gm20b/gr_gm20b.h
diff options
context:
space:
mode:
authorDeepak Nibade <dnibade@nvidia.com>2014-10-01 11:53:49 -0400
committerDan Willemsen <dwillemsen@nvidia.com>2015-03-18 15:12:10 -0400
commitf8f6b298848ed05ad83ce107ff8a4fff0b37dd2d (patch)
tree554d121fbbc47745556cd6a99c6b5d6258951b80 /drivers/gpu/nvgpu/gm20b/gr_gm20b.h
parent6275bbb33bb0f72cc03c7e68d8186b36c96ee854 (diff)
gpu: nvgpu: support config of TPC FUSE dynamically
Follow steps below to config active TPC number: echo 1 > /sys/devices/platform/host1x/gpu.0/force_idle echo 0x1/0x2/0x3 > /sys/devices/platform/host1x/gpu.0/tpc_fs_mask echo 0 > /sys/devices/platform/host1x/gpu.0/force_idle where, 0x1 : disable TPC1 0x2 : disable TPC0 0x3 : both TPCs active Also, add API set_gpc_tpc_mask to update the TPCs and call this API after update to sysfs "tpc_fs_mask" Once fuses are updated for new TPC settings, we need to reconfigure GR and golden_image. Hence disable gr->sw_ready and golden_image_initialized flags. Also, initialize gr->tpc_count = 0 each time in gr_gk20a_init_gr_config(), otherwise it goes on adding tpc count Bug 1513685 Change-Id: Ib50bafef08664262f8426ac0d6cbad74b32c5909 Signed-off-by: Kevin Huang <kevinh@nvidia.com> Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: http://git-master/r/552606 Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gm20b/gr_gm20b.h')
-rw-r--r--drivers/gpu/nvgpu/gm20b/gr_gm20b.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gm20b/gr_gm20b.h b/drivers/gpu/nvgpu/gm20b/gr_gm20b.h
index 470e5bae..fd109eec 100644
--- a/drivers/gpu/nvgpu/gm20b/gr_gm20b.h
+++ b/drivers/gpu/nvgpu/gm20b/gr_gm20b.h
@@ -25,6 +25,17 @@ enum {
25 MAXWELL_CHANNEL_GPFIFO_A= 0xB06F, 25 MAXWELL_CHANNEL_GPFIFO_A= 0xB06F,
26}; 26};
27 27
28#define tegra_clk_writel(value, offset) \
29 writel(value, IO_ADDRESS(0x60006000 + offset))
30
31#define CLK_RST_CONTROLLER_MISC_CLK_ENB_0 0x48
32#define CLK_RST_CONTROLLER_MISC_CLK_ENB_0_ALL_VISIBLE BIT(28)
33
34#define FUSE_FUSEBYPASS_0 0x24
35#define FUSE_WRITE_ACCESS_SW_0 0x30
36#define FUSE_OPT_GPU_TPC0_DISABLE_0 0x30C
37#define FUSE_OPT_GPU_TPC1_DISABLE_0 0x33C
38
28#define NVB197_SET_ALPHA_CIRCULAR_BUFFER_SIZE 0x02dc 39#define NVB197_SET_ALPHA_CIRCULAR_BUFFER_SIZE 0x02dc
29#define NVB197_SET_CIRCULAR_BUFFER_SIZE 0x1280 40#define NVB197_SET_CIRCULAR_BUFFER_SIZE 0x1280
30#define NVB197_SET_SHADER_EXCEPTIONS 0x1528 41#define NVB197_SET_SHADER_EXCEPTIONS 0x1528