mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
gpu: nvgpu: don't skip setting same clk in arbiter
In the current setting, clock arbiter skips setting the clock if its already set previously. The value set by the arbiter is stored in "struct nvgpu_clk_arb->actual" whenever the clock is updated via the arbiter. However, DVFS might also update the clock and the updates are not synchronized with the arbiter. Hence, ensure that any clock requests are always updated i.e. the requested rate is set even if the previous rate remains the same. In the devfreq scale() part, scale emc when clk_arb is active and skip setting of clocks. Bug 3666615 Signed-off-by: Debarshi Dutta <ddutta@nvidia.com> Change-Id: I32bf4dbf81b19fdd6fa0bdec3a6c9a9312b78eca Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2727787 Reviewed-by: svcacv <svcacv@nvidia.com> Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com> GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
4194c35e17
commit
21ab579341
@@ -163,11 +163,13 @@ static int gk20a_scale_target(struct device *dev, unsigned long *freq,
|
||||
struct devfreq *devfreq = l->devfreq;
|
||||
#endif
|
||||
unsigned long local_freq = *freq;
|
||||
unsigned long rounded_rate;
|
||||
unsigned long rounded_rate = 0;
|
||||
unsigned long min_freq = 0, max_freq = 0;
|
||||
|
||||
if (nvgpu_clk_arb_has_active_req(g))
|
||||
return 0;
|
||||
if (nvgpu_clk_arb_has_active_req(g)) {
|
||||
rounded_rate = g->last_freq;
|
||||
goto post_scale;
|
||||
}
|
||||
/*
|
||||
* Calculate floor and cap frequency values
|
||||
*
|
||||
@@ -222,6 +224,7 @@ static int gk20a_scale_target(struct device *dev, unsigned long *freq,
|
||||
|
||||
g->last_freq = *freq;
|
||||
|
||||
post_scale:
|
||||
/* postscale will only scale emc (dram clock) if evaluating
|
||||
* gk20a_tegra_get_emc_rate() produces a new or different emc
|
||||
* target because the load or_and gpufreq has changed */
|
||||
|
||||
Reference in New Issue
Block a user