summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/pmgr/pmgr.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/pmgr/pmgr.c')
-rw-r--r--drivers/gpu/nvgpu/pmgr/pmgr.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/pmgr/pmgr.c b/drivers/gpu/nvgpu/pmgr/pmgr.c
index 6be0f82f..227a9893 100644
--- a/drivers/gpu/nvgpu/pmgr/pmgr.c
+++ b/drivers/gpu/nvgpu/pmgr/pmgr.c
@@ -30,9 +30,10 @@ int pmgr_pwr_devices_get_power(struct gk20a *g, u32 *val)
30 int status; 30 int status;
31 31
32 status = pmgr_pmu_pwr_devices_query_blocking(g, 1, &payload); 32 status = pmgr_pmu_pwr_devices_query_blocking(g, 1, &payload);
33 if (status) 33 if (status) {
34 nvgpu_err(g, "pmgr_pwr_devices_get_current_power failed %x", 34 nvgpu_err(g, "pmgr_pwr_devices_get_current_power failed %x",
35 status); 35 status);
36 }
36 37
37 *val = payload.devices[0].powerm_w; 38 *val = payload.devices[0].powerm_w;
38 39
@@ -45,9 +46,10 @@ int pmgr_pwr_devices_get_current(struct gk20a *g, u32 *val)
45 int status; 46 int status;
46 47
47 status = pmgr_pmu_pwr_devices_query_blocking(g, 1, &payload); 48 status = pmgr_pmu_pwr_devices_query_blocking(g, 1, &payload);
48 if (status) 49 if (status) {
49 nvgpu_err(g, "pmgr_pwr_devices_get_current failed %x", 50 nvgpu_err(g, "pmgr_pwr_devices_get_current failed %x",
50 status); 51 status);
52 }
51 53
52 *val = payload.devices[0].currentm_a; 54 *val = payload.devices[0].currentm_a;
53 55
@@ -60,9 +62,10 @@ int pmgr_pwr_devices_get_voltage(struct gk20a *g, u32 *val)
60 int status; 62 int status;
61 63
62 status = pmgr_pmu_pwr_devices_query_blocking(g, 1, &payload); 64 status = pmgr_pmu_pwr_devices_query_blocking(g, 1, &payload);
63 if (status) 65 if (status) {
64 nvgpu_err(g, "pmgr_pwr_devices_get_current_voltage failed %x", 66 nvgpu_err(g, "pmgr_pwr_devices_get_current_voltage failed %x",
65 status); 67 status);
68 }
66 69
67 *val = payload.devices[0].voltageu_v; 70 *val = payload.devices[0].voltageu_v;
68 71