summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVaikundanathan S <vaikuns@nvidia.com>2018-03-29 06:06:44 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-04-25 12:35:56 -0400
commit244e29b1b527dce5497a96ca65c08f7ef22cfc65 (patch)
tree62ec57fad3f54dd810cb31a37cd375b8ab0e0916
parent594f3d26ea55219fd1855d388477601d4cbb1a28 (diff)
gpu: nvgpu: Port vf_point as per Chips_a
- Update PMU interface for vf_point Change-Id: I1c457026938025266a9325a93985d81fae3b9fa5 Signed-off-by: Vaikundanathan S <vaikuns@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1684286 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
-rw-r--r--drivers/gpu/nvgpu/clk/clk_vf_point.c6
-rw-r--r--drivers/gpu/nvgpu/clk/clk_vf_point.h4
-rw-r--r--drivers/gpu/nvgpu/ctrl/ctrlclk.h4
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/pmuif/gpmuifclk.h4
4 files changed, 11 insertions, 7 deletions
diff --git a/drivers/gpu/nvgpu/clk/clk_vf_point.c b/drivers/gpu/nvgpu/clk/clk_vf_point.c
index 0189bd8c..8333b2b0 100644
--- a/drivers/gpu/nvgpu/clk/clk_vf_point.c
+++ b/drivers/gpu/nvgpu/clk/clk_vf_point.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"),
@@ -200,7 +200,8 @@ static u32 _clk_vf_point_pmudatainit_volt(struct gk20a *g,
200 ppmudata; 200 ppmudata;
201 201
202 pset->source_voltage_uv = pclk_vf_point_volt->source_voltage_uv; 202 pset->source_voltage_uv = pclk_vf_point_volt->source_voltage_uv;
203 pset->freq_delta_khz = pclk_vf_point_volt->freq_delta_khz; 203 pset->freq_delta.data = pclk_vf_point_volt->freq_delta.data;
204 pset->freq_delta.type = pclk_vf_point_volt->freq_delta.type;
204 205
205 return status; 206 return status;
206} 207}
@@ -257,6 +258,7 @@ static u32 clk_vf_point_construct_volt(struct gk20a *g,
257 _clk_vf_point_pmudatainit_volt; 258 _clk_vf_point_pmudatainit_volt;
258 259
259 pclkvfpoint->source_voltage_uv = ptmpvfpoint->source_voltage_uv; 260 pclkvfpoint->source_voltage_uv = ptmpvfpoint->source_voltage_uv;
261 pclkvfpoint->freq_delta = ptmpvfpoint->freq_delta;
260 262
261 return status; 263 return status;
262} 264}
diff --git a/drivers/gpu/nvgpu/clk/clk_vf_point.h b/drivers/gpu/nvgpu/clk/clk_vf_point.h
index 9a4eec10..b67434b7 100644
--- a/drivers/gpu/nvgpu/clk/clk_vf_point.h
+++ b/drivers/gpu/nvgpu/clk/clk_vf_point.h
@@ -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"),
@@ -46,7 +46,7 @@ struct clk_vf_point {
46struct clk_vf_point_volt { 46struct clk_vf_point_volt {
47 struct clk_vf_point super; 47 struct clk_vf_point super;
48 u32 source_voltage_uv; 48 u32 source_voltage_uv;
49 int freq_delta_khz; 49 struct ctrl_clk_freq_delta freq_delta;
50}; 50};
51 51
52struct clk_vf_point_freq { 52struct clk_vf_point_freq {
diff --git a/drivers/gpu/nvgpu/ctrl/ctrlclk.h b/drivers/gpu/nvgpu/ctrl/ctrlclk.h
index 6e56235b..3a383c17 100644
--- a/drivers/gpu/nvgpu/ctrl/ctrlclk.h
+++ b/drivers/gpu/nvgpu/ctrl/ctrlclk.h
@@ -75,8 +75,8 @@
75 75
76#define CTRL_CLK_CLK_VF_POINT_IDX_INVALID 255 76#define CTRL_CLK_CLK_VF_POINT_IDX_INVALID 255
77 77
78#define CTRL_CLK_CLK_VF_POINT_TYPE_FREQ 0x00 78#define CTRL_CLK_CLK_VF_POINT_TYPE_FREQ 0x01
79#define CTRL_CLK_CLK_VF_POINT_TYPE_VOLT 0x01 79#define CTRL_CLK_CLK_VF_POINT_TYPE_VOLT 0x02
80#define CTRL_CLK_CLK_VF_POINT_TYPE_UNKNOWN 255 80#define CTRL_CLK_CLK_VF_POINT_TYPE_UNKNOWN 255
81 81
82struct ctrl_clk_clk_prog_1x_master_source_fll { 82struct ctrl_clk_clk_prog_1x_master_source_fll {
diff --git a/drivers/gpu/nvgpu/include/nvgpu/pmuif/gpmuifclk.h b/drivers/gpu/nvgpu/include/nvgpu/pmuif/gpmuifclk.h
index 616aca5c..63bce913 100644
--- a/drivers/gpu/nvgpu/include/nvgpu/pmuif/gpmuifclk.h
+++ b/drivers/gpu/nvgpu/include/nvgpu/pmuif/gpmuifclk.h
@@ -282,7 +282,7 @@ struct nv_pmu_clk_clk_vf_point_freq_boardobj_set {
282struct nv_pmu_clk_clk_vf_point_volt_boardobj_set { 282struct nv_pmu_clk_clk_vf_point_volt_boardobj_set {
283 struct nv_pmu_clk_clk_vf_point_boardobj_set super; 283 struct nv_pmu_clk_clk_vf_point_boardobj_set super;
284 u32 source_voltage_uv; 284 u32 source_voltage_uv;
285 int freq_delta_khz; 285 struct ctrl_clk_freq_delta freq_delta;
286}; 286};
287 287
288union nv_pmu_clk_clk_vf_point_boardobj_set_union { 288union nv_pmu_clk_clk_vf_point_boardobj_set_union {
@@ -296,11 +296,13 @@ NV_PMU_BOARDOBJ_GRP_SET_MAKE_E255(clk, clk_vf_point);
296 296
297struct nv_pmu_clk_clk_vf_point_boardobjgrp_get_status_header { 297struct nv_pmu_clk_clk_vf_point_boardobjgrp_get_status_header {
298 struct nv_pmu_boardobjgrp_e255 super; 298 struct nv_pmu_boardobjgrp_e255 super;
299 u32 vf_points_cahce_counter;
299}; 300};
300 301
301struct nv_pmu_clk_clk_vf_point_boardobj_get_status { 302struct nv_pmu_clk_clk_vf_point_boardobj_get_status {
302 struct nv_pmu_boardobj super; 303 struct nv_pmu_boardobj super;
303 struct ctrl_clk_vf_pair pair; 304 struct ctrl_clk_vf_pair pair;
305 u8 dummy[38];
304}; 306};
305 307
306struct nv_pmu_clk_clk_vf_point_volt_boardobj_get_status { 308struct nv_pmu_clk_clk_vf_point_volt_boardobj_get_status {