summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/clk/clk_arb.c
diff options
context:
space:
mode:
authorDavid Nieto <dmartineznie@nvidia.com>2016-12-08 22:33:11 -0500
committerDeepak Nibade <dnibade@nvidia.com>2016-12-27 04:56:52 -0500
commit136a9919e648fd15cc0bb4a2e3de381b29746d3a (patch)
tree0a3895ac301e15d00c8d6480351379bdcb38932c /drivers/gpu/nvgpu/clk/clk_arb.c
parent849c5317e8509b390da626bcb607e66cc5ef847f (diff)
gpu: nvgpu: resolve signed/unsigned mismatch
JIRA DNVGPU-143 Change-Id: I0536aff4f994efc3dbd2db949068f8e1345ece9c Signed-off-by: David Nieto <dmartineznie@nvidia.com> Reviewed-on: http://git-master/r/1268107 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/clk/clk_arb.c')
-rw-r--r--drivers/gpu/nvgpu/clk/clk_arb.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/gpu/nvgpu/clk/clk_arb.c b/drivers/gpu/nvgpu/clk/clk_arb.c
index aea32cb8..1b974d17 100644
--- a/drivers/gpu/nvgpu/clk/clk_arb.c
+++ b/drivers/gpu/nvgpu/clk/clk_arb.c
@@ -461,7 +461,7 @@ static int nvgpu_clk_arb_update_vf_table(struct nvgpu_clk_arb *arb)
461 struct gk20a *g = arb->g; 461 struct gk20a *g = arb->g;
462 struct nvgpu_clk_vf_table *table; 462 struct nvgpu_clk_vf_table *table;
463 463
464 int i, j; 464 u32 i, j;
465 int status = 0; 465 int status = 0;
466 u32 gpc2clk_voltuv = 0, mclk_voltuv = 0; 466 u32 gpc2clk_voltuv = 0, mclk_voltuv = 0;
467 u32 gpc2clk_voltuv_sram = 0, mclk_voltuv_sram = 0; 467 u32 gpc2clk_voltuv_sram = 0, mclk_voltuv_sram = 0;
@@ -484,14 +484,14 @@ static int nvgpu_clk_arb_update_vf_table(struct nvgpu_clk_arb *arb)
484 &mclk_min, &mclk_max) < 0) 484 &mclk_min, &mclk_max) < 0)
485 goto exit_vf_table; 485 goto exit_vf_table;
486 486
487 if (!clk_domain_get_f_points(arb->g, NVGPU_GPU_CLK_DOMAIN_GPC2CLK, 487 if (clk_domain_get_f_points(arb->g, NVGPU_GPU_CLK_DOMAIN_GPC2CLK,
488 &table->gpc2clk_num_points, arb->gpc2clk_f_points) < 0) { 488 &table->gpc2clk_num_points, arb->gpc2clk_f_points)) {
489 gk20a_err(dev_from_gk20a(g), 489 gk20a_err(dev_from_gk20a(g),
490 "failed to fetch GPC2CLK frequency points"); 490 "failed to fetch GPC2CLK frequency points");
491 goto exit_vf_table; 491 goto exit_vf_table;
492 } 492 }
493 if (clk_domain_get_f_points(arb->g, NVGPU_GPU_CLK_DOMAIN_MCLK, 493 if (clk_domain_get_f_points(arb->g, NVGPU_GPU_CLK_DOMAIN_MCLK,
494 &table->mclk_num_points, arb->mclk_f_points) < 0) { 494 &table->mclk_num_points, arb->mclk_f_points)) {
495 gk20a_err(dev_from_gk20a(g), 495 gk20a_err(dev_from_gk20a(g),
496 "failed to fetch MCLK frequency points"); 496 "failed to fetch MCLK frequency points");
497 goto exit_vf_table; 497 goto exit_vf_table;
@@ -767,7 +767,7 @@ static void nvgpu_clk_arb_run_arbiter_cb(struct work_struct *work)
767 debug->switch_std = 0; 767 debug->switch_std = 0;
768 } else { 768 } else {
769 s64 prev_avg; 769 s64 prev_avg;
770 u64 curr = (t1-t0)/1000; 770 s64 curr = (t1-t0)/1000;
771 771
772 debug->switch_max = curr > debug->switch_max ? 772 debug->switch_max = curr > debug->switch_max ?
773 curr : debug->switch_max; 773 curr : debug->switch_max;
@@ -1014,7 +1014,7 @@ static void nvgpu_clk_arb_find_vf_point(struct nvgpu_clk_arb *arb,
1014 u32 gpc2clk_voltuv, gpc2clk_voltuv_sram; 1014 u32 gpc2clk_voltuv, gpc2clk_voltuv_sram;
1015 u32 mclk_voltuv, mclk_voltuv_sram; 1015 u32 mclk_voltuv, mclk_voltuv_sram;
1016 struct nvgpu_clk_vf_table *table; 1016 struct nvgpu_clk_vf_table *table;
1017 int index; 1017 u32 index;
1018 1018
1019 gpc2clk_target = *gpc2clk; 1019 gpc2clk_target = *gpc2clk;
1020 mclk_target = *mclk; 1020 mclk_target = *mclk;