From 48ca15d8390182afb23bdcc8766d85c994d7f09d Mon Sep 17 00:00:00 2001 From: Thomas Fleury Date: Thu, 30 Aug 2018 21:18:35 -0700 Subject: gpu: nvgpu: set calibration type for VIN devices Calibration type was not initialized for VIN devices 2.0 This was leading to using the older calibration method. Fix calibration type when parsing VBIOS. Bug 2331655 Change-Id: I935f2a1812b8934dd8d3cd7e7d9c335a979a154e Reviewed-on: https://git-master.nvidia.com/r/1810379 Reviewed-by: Terje Bergstrom GVS: Gerrit_Virtual_Submit Tested-by: Thomas Fleury Reviewed-by: David Jarrett Signed-off-by: Vaikundanathan S Reviewed-on: https://git-master.nvidia.com/r/1817579 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/clk/clk_vin.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers/gpu/nvgpu/clk/clk_vin.c') diff --git a/drivers/gpu/nvgpu/clk/clk_vin.c b/drivers/gpu/nvgpu/clk/clk_vin.c index 2ff7de19..59a74d6b 100644 --- a/drivers/gpu/nvgpu/clk/clk_vin.c +++ b/drivers/gpu/nvgpu/clk/clk_vin.c @@ -354,6 +354,7 @@ static int devinit_get_vin_device_table(struct gk20a *g, vin_device_data.vin_device_v10.data.vin_cal.intercept = intercept; break; case CTRL_CLK_VIN_TYPE_V20: + vin_device_data.vin_device_v20.data.cal_type = (u8) cal_type; vin_device_data.vin_device_v20.data.vin_cal.cal_v20.offset = offset; vin_device_data.vin_device_v20.data.vin_cal.cal_v20.gain = gain; break; @@ -429,6 +430,7 @@ static int vin_device_construct_v20(struct gk20a *g, pvin_device_v20->super.super.pmudatainit = vin_device_init_pmudata_v20; + pvin_device_v20->data.cal_type = ptmpvin_device_v20->data.cal_type; pvin_device_v20->data.vin_cal.cal_v20.offset = ptmpvin_device_v20->data.vin_cal.cal_v20.offset; pvin_device_v20->data.vin_cal.cal_v20.gain = ptmpvin_device_v20->data.vin_cal.cal_v20.gain; @@ -537,6 +539,7 @@ static int vin_device_init_pmudata_v20(struct gk20a *g, perf_pmu_data = (struct nv_pmu_clk_clk_vin_device_v20_boardobj_set *) ppmudata; + perf_pmu_data->data.cal_type = pvin_dev_v20->data.cal_type; perf_pmu_data->data.vin_cal.cal_v20.offset = pvin_dev_v20->data.vin_cal.cal_v20.offset; perf_pmu_data->data.vin_cal.cal_v20.gain = pvin_dev_v20->data.vin_cal.cal_v20.gain; -- cgit v1.2.2