diff options
Diffstat (limited to 'drivers/gpu/nvgpu/pmgr')
-rw-r--r-- | drivers/gpu/nvgpu/pmgr/pmgr.c | 4 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/pmgr/pmgr.h | 4 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/pmgr/pmgrpmu.c | 18 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/pmgr/pmgrpmu.h | 4 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/pmgr/pwrdev.c | 16 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/pmgr/pwrdev.h | 4 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/pmgr/pwrmonitor.c | 18 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/pmgr/pwrmonitor.h | 4 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/pmgr/pwrpolicy.c | 18 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/pmgr/pwrpolicy.h | 4 |
10 files changed, 47 insertions, 47 deletions
diff --git a/drivers/gpu/nvgpu/pmgr/pmgr.c b/drivers/gpu/nvgpu/pmgr/pmgr.c index 3d6a96af..6be0f82f 100644 --- a/drivers/gpu/nvgpu/pmgr/pmgr.c +++ b/drivers/gpu/nvgpu/pmgr/pmgr.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved. | 2 | * Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved. |
3 | * | 3 | * |
4 | * Permission is hereby granted, free of charge, to any person obtaining a | 4 | * Permission is hereby granted, free of charge, to any person obtaining a |
5 | * copy of this software and associated documentation files (the "Software"), | 5 | * copy of this software and associated documentation files (the "Software"), |
@@ -101,7 +101,7 @@ exit: | |||
101 | return status; | 101 | return status; |
102 | } | 102 | } |
103 | 103 | ||
104 | u32 pmgr_domain_pmu_setup(struct gk20a *g) | 104 | int pmgr_domain_pmu_setup(struct gk20a *g) |
105 | { | 105 | { |
106 | return pmgr_send_pmgr_tables_to_pmu(g); | 106 | return pmgr_send_pmgr_tables_to_pmu(g); |
107 | } | 107 | } |
diff --git a/drivers/gpu/nvgpu/pmgr/pmgr.h b/drivers/gpu/nvgpu/pmgr/pmgr.h index 85b1bbd1..33daf8a9 100644 --- a/drivers/gpu/nvgpu/pmgr/pmgr.h +++ b/drivers/gpu/nvgpu/pmgr/pmgr.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * general power device structures & definitions | 2 | * general power device structures & definitions |
3 | * | 3 | * |
4 | * Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved. | 4 | * Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved. |
5 | * | 5 | * |
6 | * Permission is hereby granted, free of charge, to any person obtaining a | 6 | * Permission is hereby granted, free of charge, to any person obtaining a |
7 | * copy of this software and associated documentation files (the "Software"), | 7 | * copy of this software and associated documentation files (the "Software"), |
@@ -35,7 +35,7 @@ struct pmgr_pmupstate { | |||
35 | }; | 35 | }; |
36 | 36 | ||
37 | u32 pmgr_domain_sw_setup(struct gk20a *g); | 37 | u32 pmgr_domain_sw_setup(struct gk20a *g); |
38 | u32 pmgr_domain_pmu_setup(struct gk20a *g); | 38 | int pmgr_domain_pmu_setup(struct gk20a *g); |
39 | int pmgr_pwr_devices_get_current(struct gk20a *g, u32 *val); | 39 | int pmgr_pwr_devices_get_current(struct gk20a *g, u32 *val); |
40 | int pmgr_pwr_devices_get_voltage(struct gk20a *g, u32 *val); | 40 | int pmgr_pwr_devices_get_voltage(struct gk20a *g, u32 *val); |
41 | int pmgr_pwr_devices_get_power(struct gk20a *g, u32 *val); | 41 | int pmgr_pwr_devices_get_power(struct gk20a *g, u32 *val); |
diff --git a/drivers/gpu/nvgpu/pmgr/pmgrpmu.c b/drivers/gpu/nvgpu/pmgr/pmgrpmu.c index 3398e8df..69c43a01 100644 --- a/drivers/gpu/nvgpu/pmgr/pmgrpmu.c +++ b/drivers/gpu/nvgpu/pmgr/pmgrpmu.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved. | 2 | * Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved. |
3 | * | 3 | * |
4 | * Permission is hereby granted, free of charge, to any person obtaining a | 4 | * Permission is hereby granted, free of charge, to any person obtaining a |
5 | * copy of this software and associated documentation files (the "Software"), | 5 | * copy of this software and associated documentation files (the "Software"), |
@@ -175,11 +175,11 @@ static u32 pmgr_send_i2c_device_topology_to_pmu(struct gk20a *g) | |||
175 | return status; | 175 | return status; |
176 | } | 176 | } |
177 | 177 | ||
178 | static u32 pmgr_send_pwr_device_topology_to_pmu(struct gk20a *g) | 178 | static int pmgr_send_pwr_device_topology_to_pmu(struct gk20a *g) |
179 | { | 179 | { |
180 | struct nv_pmu_pmgr_pwr_device_desc_table *pwr_desc_table; | 180 | struct nv_pmu_pmgr_pwr_device_desc_table *pwr_desc_table; |
181 | struct nv_pmu_pmgr_pwr_device_desc_table_header *ppwr_desc_header; | 181 | struct nv_pmu_pmgr_pwr_device_desc_table_header *ppwr_desc_header; |
182 | u32 status = 0; | 182 | int status = 0; |
183 | 183 | ||
184 | /* Set the BA-device-independent HW information */ | 184 | /* Set the BA-device-independent HW information */ |
185 | pwr_desc_table = nvgpu_kzalloc(g, sizeof(*pwr_desc_table)); | 185 | pwr_desc_table = nvgpu_kzalloc(g, sizeof(*pwr_desc_table)); |
@@ -221,13 +221,13 @@ exit: | |||
221 | return status; | 221 | return status; |
222 | } | 222 | } |
223 | 223 | ||
224 | static u32 pmgr_send_pwr_mointer_to_pmu(struct gk20a *g) | 224 | static int pmgr_send_pwr_mointer_to_pmu(struct gk20a *g) |
225 | { | 225 | { |
226 | struct nv_pmu_pmgr_pwr_monitor_pack *pwr_monitor_pack = NULL; | 226 | struct nv_pmu_pmgr_pwr_monitor_pack *pwr_monitor_pack = NULL; |
227 | struct nv_pmu_pmgr_pwr_channel_header *pwr_channel_hdr; | 227 | struct nv_pmu_pmgr_pwr_channel_header *pwr_channel_hdr; |
228 | struct nv_pmu_pmgr_pwr_chrelationship_header *pwr_chrelationship_header; | 228 | struct nv_pmu_pmgr_pwr_chrelationship_header *pwr_chrelationship_header; |
229 | u32 max_dmem_size; | 229 | u32 max_dmem_size; |
230 | u32 status = 0; | 230 | int status = 0; |
231 | 231 | ||
232 | pwr_monitor_pack = nvgpu_kzalloc(g, sizeof(*pwr_monitor_pack)); | 232 | pwr_monitor_pack = nvgpu_kzalloc(g, sizeof(*pwr_monitor_pack)); |
233 | if (!pwr_monitor_pack) | 233 | if (!pwr_monitor_pack) |
@@ -290,11 +290,11 @@ exit: | |||
290 | return status; | 290 | return status; |
291 | } | 291 | } |
292 | 292 | ||
293 | static u32 pmgr_send_pwr_policy_to_pmu(struct gk20a *g) | 293 | static int pmgr_send_pwr_policy_to_pmu(struct gk20a *g) |
294 | { | 294 | { |
295 | struct nv_pmu_pmgr_pwr_policy_pack *ppwrpack = NULL; | 295 | struct nv_pmu_pmgr_pwr_policy_pack *ppwrpack = NULL; |
296 | struct pwr_policy *ppolicy = NULL; | 296 | struct pwr_policy *ppolicy = NULL; |
297 | u32 status = 0; | 297 | int status = 0; |
298 | u8 indx; | 298 | u8 indx; |
299 | u32 max_dmem_size; | 299 | u32 max_dmem_size; |
300 | 300 | ||
@@ -479,9 +479,9 @@ exit: | |||
479 | return status; | 479 | return status; |
480 | } | 480 | } |
481 | 481 | ||
482 | u32 pmgr_send_pmgr_tables_to_pmu(struct gk20a *g) | 482 | int pmgr_send_pmgr_tables_to_pmu(struct gk20a *g) |
483 | { | 483 | { |
484 | u32 status = 0; | 484 | int status = 0; |
485 | 485 | ||
486 | status = pmgr_send_i2c_device_topology_to_pmu(g); | 486 | status = pmgr_send_i2c_device_topology_to_pmu(g); |
487 | 487 | ||
diff --git a/drivers/gpu/nvgpu/pmgr/pmgrpmu.h b/drivers/gpu/nvgpu/pmgr/pmgrpmu.h index 3cb9eecb..a576f384 100644 --- a/drivers/gpu/nvgpu/pmgr/pmgrpmu.h +++ b/drivers/gpu/nvgpu/pmgr/pmgrpmu.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * general power device control structures & definitions | 2 | * general power device control structures & definitions |
3 | * | 3 | * |
4 | * Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved. | 4 | * Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved. |
5 | * | 5 | * |
6 | * Permission is hereby granted, free of charge, to any person obtaining a | 6 | * Permission is hereby granted, free of charge, to any person obtaining a |
7 | * copy of this software and associated documentation files (the "Software"), | 7 | * copy of this software and associated documentation files (the "Software"), |
@@ -28,7 +28,7 @@ | |||
28 | #include "pwrdev.h" | 28 | #include "pwrdev.h" |
29 | #include "pwrmonitor.h" | 29 | #include "pwrmonitor.h" |
30 | 30 | ||
31 | u32 pmgr_send_pmgr_tables_to_pmu(struct gk20a *g); | 31 | int pmgr_send_pmgr_tables_to_pmu(struct gk20a *g); |
32 | 32 | ||
33 | u32 pmgr_pmu_pwr_devices_query_blocking( | 33 | u32 pmgr_pmu_pwr_devices_query_blocking( |
34 | struct gk20a *g, | 34 | struct gk20a *g, |
diff --git a/drivers/gpu/nvgpu/pmgr/pwrdev.c b/drivers/gpu/nvgpu/pmgr/pwrdev.c index da51ac4b..235629d6 100644 --- a/drivers/gpu/nvgpu/pmgr/pwrdev.c +++ b/drivers/gpu/nvgpu/pmgr/pwrdev.c | |||
@@ -28,7 +28,7 @@ | |||
28 | #include "boardobj/boardobjgrp_e32.h" | 28 | #include "boardobj/boardobjgrp_e32.h" |
29 | #include "gp106/bios_gp106.h" | 29 | #include "gp106/bios_gp106.h" |
30 | 30 | ||
31 | static u32 _pwr_device_pmudata_instget(struct gk20a *g, | 31 | static int _pwr_device_pmudata_instget(struct gk20a *g, |
32 | struct nv_pmu_boardobjgrp *pmuboardobjgrp, | 32 | struct nv_pmu_boardobjgrp *pmuboardobjgrp, |
33 | struct nv_pmu_boardobj **ppboardobjpmudata, | 33 | struct nv_pmu_boardobj **ppboardobjpmudata, |
34 | u8 idx) | 34 | u8 idx) |
@@ -51,13 +51,13 @@ static u32 _pwr_device_pmudata_instget(struct gk20a *g, | |||
51 | return 0; | 51 | return 0; |
52 | } | 52 | } |
53 | 53 | ||
54 | static u32 _pwr_domains_pmudatainit_ina3221(struct gk20a *g, | 54 | static int _pwr_domains_pmudatainit_ina3221(struct gk20a *g, |
55 | struct boardobj *board_obj_ptr, | 55 | struct boardobj *board_obj_ptr, |
56 | struct nv_pmu_boardobj *ppmudata) | 56 | struct nv_pmu_boardobj *ppmudata) |
57 | { | 57 | { |
58 | struct nv_pmu_pmgr_pwr_device_desc_ina3221 *ina3221_desc; | 58 | struct nv_pmu_pmgr_pwr_device_desc_ina3221 *ina3221_desc; |
59 | struct pwr_device_ina3221 *ina3221; | 59 | struct pwr_device_ina3221 *ina3221; |
60 | u32 status = 0; | 60 | int status = 0; |
61 | u32 indx; | 61 | u32 indx; |
62 | 62 | ||
63 | status = boardobj_pmudatainit_super(g, board_obj_ptr, ppmudata); | 63 | status = boardobj_pmudatainit_super(g, board_obj_ptr, ppmudata); |
@@ -92,7 +92,7 @@ static struct boardobj *construct_pwr_device(struct gk20a *g, | |||
92 | void *pargs, u16 pargs_size, u8 type) | 92 | void *pargs, u16 pargs_size, u8 type) |
93 | { | 93 | { |
94 | struct boardobj *board_obj_ptr = NULL; | 94 | struct boardobj *board_obj_ptr = NULL; |
95 | u32 status; | 95 | int status; |
96 | u32 indx; | 96 | u32 indx; |
97 | struct pwr_device_ina3221 *pwrdev; | 97 | struct pwr_device_ina3221 *pwrdev; |
98 | struct pwr_device_ina3221 *ina3221 = (struct pwr_device_ina3221*)pargs; | 98 | struct pwr_device_ina3221 *ina3221 = (struct pwr_device_ina3221*)pargs; |
@@ -127,10 +127,10 @@ static struct boardobj *construct_pwr_device(struct gk20a *g, | |||
127 | return board_obj_ptr; | 127 | return board_obj_ptr; |
128 | } | 128 | } |
129 | 129 | ||
130 | static u32 devinit_get_pwr_device_table(struct gk20a *g, | 130 | static int devinit_get_pwr_device_table(struct gk20a *g, |
131 | struct pwr_devices *ppwrdeviceobjs) | 131 | struct pwr_devices *ppwrdeviceobjs) |
132 | { | 132 | { |
133 | u32 status = 0; | 133 | int status = 0; |
134 | u8 *pwr_device_table_ptr = NULL; | 134 | u8 *pwr_device_table_ptr = NULL; |
135 | u8 *curr_pwr_device_table_ptr = NULL; | 135 | u8 *curr_pwr_device_table_ptr = NULL; |
136 | struct boardobj *boardobj; | 136 | struct boardobj *boardobj; |
@@ -284,9 +284,9 @@ done: | |||
284 | return status; | 284 | return status; |
285 | } | 285 | } |
286 | 286 | ||
287 | u32 pmgr_device_sw_setup(struct gk20a *g) | 287 | int pmgr_device_sw_setup(struct gk20a *g) |
288 | { | 288 | { |
289 | u32 status; | 289 | int status; |
290 | struct boardobjgrp *pboardobjgrp = NULL; | 290 | struct boardobjgrp *pboardobjgrp = NULL; |
291 | struct pwr_devices *ppwrdeviceobjs; | 291 | struct pwr_devices *ppwrdeviceobjs; |
292 | 292 | ||
diff --git a/drivers/gpu/nvgpu/pmgr/pwrdev.h b/drivers/gpu/nvgpu/pmgr/pwrdev.h index 1d9acb89..72cca1fb 100644 --- a/drivers/gpu/nvgpu/pmgr/pwrdev.h +++ b/drivers/gpu/nvgpu/pmgr/pwrdev.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * general power device structures & definitions | 2 | * general power device structures & definitions |
3 | * | 3 | * |
4 | * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved. | 4 | * Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved. |
5 | * | 5 | * |
6 | * Permission is hereby granted, free of charge, to any person obtaining a | 6 | * Permission is hereby granted, free of charge, to any person obtaining a |
7 | * copy of this software and associated documentation files (the "Software"), | 7 | * copy of this software and associated documentation files (the "Software"), |
@@ -55,6 +55,6 @@ struct pwr_device_ina3221 { | |||
55 | s16 curr_correct_b; | 55 | s16 curr_correct_b; |
56 | } ; | 56 | } ; |
57 | 57 | ||
58 | u32 pmgr_device_sw_setup(struct gk20a *g); | 58 | int pmgr_device_sw_setup(struct gk20a *g); |
59 | 59 | ||
60 | #endif | 60 | #endif |
diff --git a/drivers/gpu/nvgpu/pmgr/pwrmonitor.c b/drivers/gpu/nvgpu/pmgr/pwrmonitor.c index 5e0cc966..53c7a1c4 100644 --- a/drivers/gpu/nvgpu/pmgr/pwrmonitor.c +++ b/drivers/gpu/nvgpu/pmgr/pwrmonitor.c | |||
@@ -28,7 +28,7 @@ | |||
28 | #include "boardobj/boardobjgrp_e32.h" | 28 | #include "boardobj/boardobjgrp_e32.h" |
29 | #include "gp106/bios_gp106.h" | 29 | #include "gp106/bios_gp106.h" |
30 | 30 | ||
31 | static u32 _pwr_channel_pmudata_instget(struct gk20a *g, | 31 | static int _pwr_channel_pmudata_instget(struct gk20a *g, |
32 | struct nv_pmu_boardobjgrp *pmuboardobjgrp, | 32 | struct nv_pmu_boardobjgrp *pmuboardobjgrp, |
33 | struct nv_pmu_boardobj **ppboardobjpmudata, | 33 | struct nv_pmu_boardobj **ppboardobjpmudata, |
34 | u8 idx) | 34 | u8 idx) |
@@ -54,7 +54,7 @@ static u32 _pwr_channel_pmudata_instget(struct gk20a *g, | |||
54 | return 0; | 54 | return 0; |
55 | } | 55 | } |
56 | 56 | ||
57 | static u32 _pwr_channel_rels_pmudata_instget(struct gk20a *g, | 57 | static int _pwr_channel_rels_pmudata_instget(struct gk20a *g, |
58 | struct nv_pmu_boardobjgrp *pmuboardobjgrp, | 58 | struct nv_pmu_boardobjgrp *pmuboardobjgrp, |
59 | struct nv_pmu_boardobj **ppboardobjpmudata, | 59 | struct nv_pmu_boardobj **ppboardobjpmudata, |
60 | u8 idx) | 60 | u8 idx) |
@@ -105,13 +105,13 @@ static bool _pwr_channel_implements(struct pwr_channel *pchannel, | |||
105 | return (type == BOARDOBJ_GET_TYPE(pchannel)); | 105 | return (type == BOARDOBJ_GET_TYPE(pchannel)); |
106 | } | 106 | } |
107 | 107 | ||
108 | static u32 _pwr_domains_pmudatainit_sensor(struct gk20a *g, | 108 | static int _pwr_domains_pmudatainit_sensor(struct gk20a *g, |
109 | struct boardobj *board_obj_ptr, | 109 | struct boardobj *board_obj_ptr, |
110 | struct nv_pmu_boardobj *ppmudata) | 110 | struct nv_pmu_boardobj *ppmudata) |
111 | { | 111 | { |
112 | struct nv_pmu_pmgr_pwr_channel_sensor *pmu_sensor_data; | 112 | struct nv_pmu_pmgr_pwr_channel_sensor *pmu_sensor_data; |
113 | struct pwr_channel_sensor *sensor; | 113 | struct pwr_channel_sensor *sensor; |
114 | u32 status = 0; | 114 | int status = 0; |
115 | 115 | ||
116 | status = boardobj_pmudatainit_super(g, board_obj_ptr, ppmudata); | 116 | status = boardobj_pmudatainit_super(g, board_obj_ptr, ppmudata); |
117 | if (status) { | 117 | if (status) { |
@@ -144,7 +144,7 @@ static struct boardobj *construct_pwr_topology(struct gk20a *g, | |||
144 | void *pargs, u16 pargs_size, u8 type) | 144 | void *pargs, u16 pargs_size, u8 type) |
145 | { | 145 | { |
146 | struct boardobj *board_obj_ptr = NULL; | 146 | struct boardobj *board_obj_ptr = NULL; |
147 | u32 status; | 147 | int status; |
148 | struct pwr_channel_sensor *pwrchannel; | 148 | struct pwr_channel_sensor *pwrchannel; |
149 | struct pwr_channel_sensor *sensor = (struct pwr_channel_sensor*)pargs; | 149 | struct pwr_channel_sensor *sensor = (struct pwr_channel_sensor*)pargs; |
150 | 150 | ||
@@ -174,10 +174,10 @@ static struct boardobj *construct_pwr_topology(struct gk20a *g, | |||
174 | return board_obj_ptr; | 174 | return board_obj_ptr; |
175 | } | 175 | } |
176 | 176 | ||
177 | static u32 devinit_get_pwr_topology_table(struct gk20a *g, | 177 | static int devinit_get_pwr_topology_table(struct gk20a *g, |
178 | struct pmgr_pwr_monitor *ppwrmonitorobjs) | 178 | struct pmgr_pwr_monitor *ppwrmonitorobjs) |
179 | { | 179 | { |
180 | u32 status = 0; | 180 | int status = 0; |
181 | u8 *pwr_topology_table_ptr = NULL; | 181 | u8 *pwr_topology_table_ptr = NULL; |
182 | u8 *curr_pwr_topology_table_ptr = NULL; | 182 | u8 *curr_pwr_topology_table_ptr = NULL; |
183 | struct boardobj *boardobj; | 183 | struct boardobj *boardobj; |
@@ -296,9 +296,9 @@ done: | |||
296 | return status; | 296 | return status; |
297 | } | 297 | } |
298 | 298 | ||
299 | u32 pmgr_monitor_sw_setup(struct gk20a *g) | 299 | int pmgr_monitor_sw_setup(struct gk20a *g) |
300 | { | 300 | { |
301 | u32 status; | 301 | int status; |
302 | struct boardobjgrp *pboardobjgrp = NULL; | 302 | struct boardobjgrp *pboardobjgrp = NULL; |
303 | struct pwr_channel *pchannel; | 303 | struct pwr_channel *pchannel; |
304 | struct pmgr_pwr_monitor *ppwrmonitorobjs; | 304 | struct pmgr_pwr_monitor *ppwrmonitorobjs; |
diff --git a/drivers/gpu/nvgpu/pmgr/pwrmonitor.h b/drivers/gpu/nvgpu/pmgr/pwrmonitor.h index 4f094c3e..da52b08a 100644 --- a/drivers/gpu/nvgpu/pmgr/pwrmonitor.h +++ b/drivers/gpu/nvgpu/pmgr/pwrmonitor.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * general power channel structures & definitions | 2 | * general power channel structures & definitions |
3 | * | 3 | * |
4 | * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved. | 4 | * Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved. |
5 | * | 5 | * |
6 | * Permission is hereby granted, free of charge, to any person obtaining a | 6 | * Permission is hereby granted, free of charge, to any person obtaining a |
7 | * copy of this software and associated documentation files (the "Software"), | 7 | * copy of this software and associated documentation files (the "Software"), |
@@ -64,6 +64,6 @@ struct pmgr_pwr_monitor { | |||
64 | ((struct pwr_channel *)BOARDOBJGRP_OBJ_GET_BY_IDX( \ | 64 | ((struct pwr_channel *)BOARDOBJGRP_OBJ_GET_BY_IDX( \ |
65 | &(g->pmgr_pmu.pmgr_monitorobjs.pwr_channels.super), (channel_idx))) | 65 | &(g->pmgr_pmu.pmgr_monitorobjs.pwr_channels.super), (channel_idx))) |
66 | 66 | ||
67 | u32 pmgr_monitor_sw_setup(struct gk20a *g); | 67 | int pmgr_monitor_sw_setup(struct gk20a *g); |
68 | 68 | ||
69 | #endif | 69 | #endif |
diff --git a/drivers/gpu/nvgpu/pmgr/pwrpolicy.c b/drivers/gpu/nvgpu/pmgr/pwrpolicy.c index 38575f74..13a94e4f 100644 --- a/drivers/gpu/nvgpu/pmgr/pwrpolicy.c +++ b/drivers/gpu/nvgpu/pmgr/pwrpolicy.c | |||
@@ -182,7 +182,7 @@ static u32 _pwr_policy_limitarboutputget(struct gk20a *g, | |||
182 | return _pwr_policy_limitarboutputget_helper(p_limit_arb); | 182 | return _pwr_policy_limitarboutputget_helper(p_limit_arb); |
183 | } | 183 | } |
184 | 184 | ||
185 | static u32 _pwr_domains_pmudatainit_hw_threshold(struct gk20a *g, | 185 | static int _pwr_domains_pmudatainit_hw_threshold(struct gk20a *g, |
186 | struct boardobj *board_obj_ptr, | 186 | struct boardobj *board_obj_ptr, |
187 | struct nv_pmu_boardobj *ppmudata) | 187 | struct nv_pmu_boardobj *ppmudata) |
188 | { | 188 | { |
@@ -190,7 +190,7 @@ static u32 _pwr_domains_pmudatainit_hw_threshold(struct gk20a *g, | |||
190 | struct pwr_policy_hw_threshold *p_hw_threshold; | 190 | struct pwr_policy_hw_threshold *p_hw_threshold; |
191 | struct pwr_policy *p_pwr_policy; | 191 | struct pwr_policy *p_pwr_policy; |
192 | struct nv_pmu_pmgr_pwr_policy *pmu_pwr_policy; | 192 | struct nv_pmu_pmgr_pwr_policy *pmu_pwr_policy; |
193 | u32 status = 0; | 193 | int status = 0; |
194 | 194 | ||
195 | status = boardobj_pmudatainit_super(g, board_obj_ptr, ppmudata); | 195 | status = boardobj_pmudatainit_super(g, board_obj_ptr, ppmudata); |
196 | if (status) { | 196 | if (status) { |
@@ -256,7 +256,7 @@ static struct boardobj *construct_pwr_policy(struct gk20a *g, | |||
256 | void *pargs, u16 pargs_size, u8 type) | 256 | void *pargs, u16 pargs_size, u8 type) |
257 | { | 257 | { |
258 | struct boardobj *board_obj_ptr = NULL; | 258 | struct boardobj *board_obj_ptr = NULL; |
259 | u32 status; | 259 | int status; |
260 | struct pwr_policy_hw_threshold *pwrpolicyhwthreshold; | 260 | struct pwr_policy_hw_threshold *pwrpolicyhwthreshold; |
261 | struct pwr_policy *pwrpolicy; | 261 | struct pwr_policy *pwrpolicy; |
262 | struct pwr_policy *pwrpolicyparams = (struct pwr_policy*)pargs; | 262 | struct pwr_policy *pwrpolicyparams = (struct pwr_policy*)pargs; |
@@ -363,13 +363,13 @@ static struct boardobj *construct_pwr_policy(struct gk20a *g, | |||
363 | return board_obj_ptr; | 363 | return board_obj_ptr; |
364 | } | 364 | } |
365 | 365 | ||
366 | static u32 _pwr_policy_construct_WAR_SW_Threshold_policy(struct gk20a *g, | 366 | static int _pwr_policy_construct_WAR_SW_Threshold_policy(struct gk20a *g, |
367 | struct pmgr_pwr_policy *ppwrpolicyobjs, | 367 | struct pmgr_pwr_policy *ppwrpolicyobjs, |
368 | union pwr_policy_data_union *ppwrpolicydata, | 368 | union pwr_policy_data_union *ppwrpolicydata, |
369 | u16 pwr_policy_size, | 369 | u16 pwr_policy_size, |
370 | u32 obj_index) | 370 | u32 obj_index) |
371 | { | 371 | { |
372 | u32 status = 0; | 372 | int status = 0; |
373 | struct boardobj *boardobj; | 373 | struct boardobj *boardobj; |
374 | 374 | ||
375 | /* WARN policy */ | 375 | /* WARN policy */ |
@@ -512,10 +512,10 @@ static inline void devinit_unpack_pwr_policy_entry( | |||
512 | __UNPACK_FIELD(unpacked, packed, filter_param); | 512 | __UNPACK_FIELD(unpacked, packed, filter_param); |
513 | } | 513 | } |
514 | 514 | ||
515 | static u32 devinit_get_pwr_policy_table(struct gk20a *g, | 515 | static int devinit_get_pwr_policy_table(struct gk20a *g, |
516 | struct pmgr_pwr_policy *ppwrpolicyobjs) | 516 | struct pmgr_pwr_policy *ppwrpolicyobjs) |
517 | { | 517 | { |
518 | u32 status = 0; | 518 | int status = 0; |
519 | u8 *ptr = NULL; | 519 | u8 *ptr = NULL; |
520 | struct boardobj *boardobj; | 520 | struct boardobj *boardobj; |
521 | struct pwr_policy_3x_header_struct *packed_hdr; | 521 | struct pwr_policy_3x_header_struct *packed_hdr; |
@@ -707,9 +707,9 @@ done: | |||
707 | return status; | 707 | return status; |
708 | } | 708 | } |
709 | 709 | ||
710 | u32 pmgr_policy_sw_setup(struct gk20a *g) | 710 | int pmgr_policy_sw_setup(struct gk20a *g) |
711 | { | 711 | { |
712 | u32 status; | 712 | int status; |
713 | struct boardobjgrp *pboardobjgrp = NULL; | 713 | struct boardobjgrp *pboardobjgrp = NULL; |
714 | struct pwr_policy *ppolicy; | 714 | struct pwr_policy *ppolicy; |
715 | struct pmgr_pwr_policy *ppwrpolicyobjs; | 715 | struct pmgr_pwr_policy *ppwrpolicyobjs; |
diff --git a/drivers/gpu/nvgpu/pmgr/pwrpolicy.h b/drivers/gpu/nvgpu/pmgr/pwrpolicy.h index 9bc99bb7..12936a3e 100644 --- a/drivers/gpu/nvgpu/pmgr/pwrpolicy.h +++ b/drivers/gpu/nvgpu/pmgr/pwrpolicy.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * general power channel structures & definitions | 2 | * general power channel structures & definitions |
3 | * | 3 | * |
4 | * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved. | 4 | * Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved. |
5 | * | 5 | * |
6 | * Permission is hereby granted, free of charge, to any person obtaining a | 6 | * Permission is hereby granted, free of charge, to any person obtaining a |
7 | * copy of this software and associated documentation files (the "Software"), | 7 | * copy of this software and associated documentation files (the "Software"), |
@@ -131,6 +131,6 @@ union pwr_policy_data_union { | |||
131 | #define PMGR_PWR_POLICY_INCREMENT_LIMIT_INPUT_COUNT(ppolicy) \ | 131 | #define PMGR_PWR_POLICY_INCREMENT_LIMIT_INPUT_COUNT(ppolicy) \ |
132 | ((ppolicy)->num_limit_inputs++) | 132 | ((ppolicy)->num_limit_inputs++) |
133 | 133 | ||
134 | u32 pmgr_policy_sw_setup(struct gk20a *g); | 134 | int pmgr_policy_sw_setup(struct gk20a *g); |
135 | 135 | ||
136 | #endif | 136 | #endif |