From c1e80da2c56e39b2b105014c8fb02c5e78eb0449 Mon Sep 17 00:00:00 2001 From: Thomas Fleury Date: Fri, 31 Aug 2018 16:18:49 -0700 Subject: gpu: nvgpu: allow a calibration parameter to be zero It is allowed for some calibration parameters to be zero, when the others are non-zero. Pass all calibration parameters to PMU. Bug 2331655 Change-Id: I953a40e37211169e1aefd80aef2545a1b6a0afa1 Reviewed-on: https://git-master.nvidia.com/r/1810994 Reviewed-by: David Jarrett Tested-by: David Jarrett Signed-off-by: Vaikundanathan S Reviewed-on: https://git-master.nvidia.com/r/1817580 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/clk/clk_vin.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/nvgpu/clk/clk_vin.c b/drivers/gpu/nvgpu/clk/clk_vin.c index 59a74d6b..e0a4a5b6 100644 --- a/drivers/gpu/nvgpu/clk/clk_vin.c +++ b/drivers/gpu/nvgpu/clk/clk_vin.c @@ -80,10 +80,8 @@ u32 clk_avfs_get_vin_cal_fuse_v10(struct gk20a *g, "err reading vin cal for id %x", pvindev->super.id); return status; } - if (slope != 0 && intercept != 0) { - pvindev->data.vin_cal.cal_v10.slope = slope; - pvindev->data.vin_cal.cal_v10.intercept = intercept; - } + pvindev->data.vin_cal.cal_v10.slope = slope; + pvindev->data.vin_cal.cal_v10.intercept = intercept; } } return status; @@ -111,10 +109,8 @@ u32 clk_avfs_get_vin_cal_fuse_v20(struct gk20a *g, "err reading vin cal for id %x", pvindev->super.id); return status; } - if (gain != 0 && offset != 0) { - pvindev->data.vin_cal.cal_v20.gain = gain; - pvindev->data.vin_cal.cal_v20.offset = offset; - } + pvindev->data.vin_cal.cal_v20.gain = gain; + pvindev->data.vin_cal.cal_v20.offset = offset; } } return status; -- cgit v1.2.2