diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/platform_gk20a.h | 5 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/pci.c | 3 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/pmgr/pwrpolicy.c | 4 |
3 files changed, 10 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/platform_gk20a.h b/drivers/gpu/nvgpu/gk20a/platform_gk20a.h index 3c2db924..fa0909ee 100644 --- a/drivers/gpu/nvgpu/gk20a/platform_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/platform_gk20a.h | |||
@@ -255,6 +255,11 @@ struct gk20a_platform { | |||
255 | 255 | ||
256 | /* true if we run preos microcode on this board */ | 256 | /* true if we run preos microcode on this board */ |
257 | bool run_preos; | 257 | bool run_preos; |
258 | |||
259 | /* true if we need to program sw threshold for | ||
260 | * power limits | ||
261 | */ | ||
262 | bool hardcode_sw_threshold; | ||
258 | }; | 263 | }; |
259 | 264 | ||
260 | static inline struct gk20a_platform *gk20a_get_platform( | 265 | static inline struct gk20a_platform *gk20a_get_platform( |
diff --git a/drivers/gpu/nvgpu/pci.c b/drivers/gpu/nvgpu/pci.c index 88b743bc..dd8abc82 100644 --- a/drivers/gpu/nvgpu/pci.c +++ b/drivers/gpu/nvgpu/pci.c | |||
@@ -83,6 +83,7 @@ static struct gk20a_platform nvgpu_pci_device[] = { | |||
83 | 83 | ||
84 | .vidmem_is_vidmem = true, | 84 | .vidmem_is_vidmem = true, |
85 | .vbios_min_version = 0x86063000, | 85 | .vbios_min_version = 0x86063000, |
86 | .hardcode_sw_threshold = true, | ||
86 | }, | 87 | }, |
87 | { /* DEVICE=0x1c36 */ | 88 | { /* DEVICE=0x1c36 */ |
88 | /* ptimer src frequency in hz */ | 89 | /* ptimer src frequency in hz */ |
@@ -116,6 +117,7 @@ static struct gk20a_platform nvgpu_pci_device[] = { | |||
116 | 117 | ||
117 | .vidmem_is_vidmem = true, | 118 | .vidmem_is_vidmem = true, |
118 | .vbios_min_version = 0x86062d00, | 119 | .vbios_min_version = 0x86062d00, |
120 | .hardcode_sw_threshold = true, | ||
119 | }, | 121 | }, |
120 | { /* DEVICE=0x1c37 */ | 122 | { /* DEVICE=0x1c37 */ |
121 | /* ptimer src frequency in hz */ | 123 | /* ptimer src frequency in hz */ |
@@ -149,6 +151,7 @@ static struct gk20a_platform nvgpu_pci_device[] = { | |||
149 | 151 | ||
150 | .vidmem_is_vidmem = true, | 152 | .vidmem_is_vidmem = true, |
151 | .vbios_min_version = 0x86063000, | 153 | .vbios_min_version = 0x86063000, |
154 | .hardcode_sw_threshold = true, | ||
152 | } | 155 | } |
153 | }; | 156 | }; |
154 | 157 | ||
diff --git a/drivers/gpu/nvgpu/pmgr/pwrpolicy.c b/drivers/gpu/nvgpu/pmgr/pwrpolicy.c index 1e7e19a3..2b0be8d8 100644 --- a/drivers/gpu/nvgpu/pmgr/pwrpolicy.c +++ b/drivers/gpu/nvgpu/pmgr/pwrpolicy.c | |||
@@ -508,6 +508,7 @@ static inline void devinit_unpack_pwr_policy_entry( | |||
508 | static u32 devinit_get_pwr_policy_table(struct gk20a *g, | 508 | static u32 devinit_get_pwr_policy_table(struct gk20a *g, |
509 | struct pmgr_pwr_policy *ppwrpolicyobjs) | 509 | struct pmgr_pwr_policy *ppwrpolicyobjs) |
510 | { | 510 | { |
511 | struct gk20a_platform *platform = gk20a_get_platform(g->dev); | ||
511 | u32 status = 0; | 512 | u32 status = 0; |
512 | u8 *ptr = NULL; | 513 | u8 *ptr = NULL; |
513 | struct boardobj *boardobj; | 514 | struct boardobj *boardobj; |
@@ -518,7 +519,6 @@ static u32 devinit_get_pwr_policy_table(struct gk20a *g, | |||
518 | u16 pwr_policy_size; | 519 | u16 pwr_policy_size; |
519 | bool integral_control = false; | 520 | bool integral_control = false; |
520 | u32 hw_threshold_policy_index = 0; | 521 | u32 hw_threshold_policy_index = 0; |
521 | u32 sw_threshold_policy_index = 0; | ||
522 | union pwr_policy_data_union pwr_policy_data; | 522 | union pwr_policy_data_union pwr_policy_data; |
523 | 523 | ||
524 | gk20a_dbg_info(""); | 524 | gk20a_dbg_info(""); |
@@ -684,7 +684,7 @@ static u32 devinit_get_pwr_policy_table(struct gk20a *g, | |||
684 | ++obj_index; | 684 | ++obj_index; |
685 | } | 685 | } |
686 | 686 | ||
687 | if (!sw_threshold_policy_index) { | 687 | if (platform->hardcode_sw_threshold) { |
688 | status = _pwr_policy_construct_WAR_SW_Threshold_policy(g, | 688 | status = _pwr_policy_construct_WAR_SW_Threshold_policy(g, |
689 | ppwrpolicyobjs, | 689 | ppwrpolicyobjs, |
690 | &pwr_policy_data, | 690 | &pwr_policy_data, |