gpu: nvgpu: Align the nvrm freq to match latest VF point

In the below scenario
1. nvrm app requests & gets all VF points from nvgpu.
2. nvrm stores all the VF points and starts setting each point.
3. During step 2, VF gets updated in nvgpu due to some events.
4. There is a mismatch b/w points in nvrm and VF table in nvgpu.
5. If nvrm freq is less than nvgpu freq , PMU cant program.
Makesure highest between nvrm and VF table goes to PMU

Bug 200454682

Change-Id: I9c58f129ff1c0dfb3f4759242469b3622fe11bb2
Signed-off-by: Abdul Salam <absalam@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2000238
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Abdul Salam
2019-01-29 11:05:17 +05:30
committed by mobile promotions
parent 1b1ebb0a8d
commit e2a29dbb96

View File

@@ -702,7 +702,13 @@ int nvgpu_clk_set_req_fll_clk_ps35(struct gk20a *g, struct nvgpu_clk_slave_freq
break;
}
}
vf_point->gpc_mhz = gpc2clk_target < vf_point->gpc_mhz ? gpc2clk_target : vf_point->gpc_mhz;
/*
* If the requested freq is lower than available
* one in VF table, use the VF table freq
*/
if (gpc2clk_target > vf_point->gpc_mhz) {
vf_point->gpc_mhz = gpc2clk_target;
}
} while ((table == NULL) ||
(NV_ACCESS_ONCE(arb->current_vf_table) != table));