mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 09:12:24 +03:00
gpu: nvgpu: Remove gk20a_scale_notify_busy/idle() hooks
Remove dependency for nvgpu to invoke devfreq govenor on every gk20a_busy/idle() call. This dependency was originally necessary to track GPU load (busy vs idle) in software. However, since we currently read the load GPU from HW/PMU there is no need to invoke the devfreq governor in this path. Instead it can use timer-based polling. Jira NVGPU-20 Change-Id: Id09f89a8a562ed49164a2e06dcbb901e4a46e7d5 Signed-off-by: Peter Boonstoppel <pboonstoppel@nvidia.com> Reviewed-on: https://git-master/r/1473140 GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
f7e37e6847
commit
635e9946b7
@@ -96,8 +96,6 @@ int gk20a_busy(struct gk20a *g)
|
||||
}
|
||||
}
|
||||
|
||||
gk20a_scale_notify_busy(dev);
|
||||
|
||||
fail:
|
||||
up_read(&g->busy_lock);
|
||||
|
||||
@@ -121,16 +119,8 @@ void gk20a_idle(struct gk20a *g)
|
||||
return;
|
||||
|
||||
if (pm_runtime_enabled(dev)) {
|
||||
#ifdef CONFIG_PM
|
||||
if (atomic_read(&g->dev->power.usage_count) == 1)
|
||||
gk20a_scale_notify_idle(dev);
|
||||
#endif
|
||||
|
||||
pm_runtime_mark_last_busy(dev);
|
||||
pm_runtime_put_sync_autosuspend(dev);
|
||||
|
||||
} else {
|
||||
gk20a_scale_notify_idle(dev);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -267,41 +267,6 @@ void gk20a_scale_resume(struct device *dev)
|
||||
devfreq_resume_device(devfreq);
|
||||
}
|
||||
|
||||
/*
|
||||
* gk20a_scale_notify(dev, busy)
|
||||
*
|
||||
* Calling this function informs that the device is idling (..or busy). This
|
||||
* data is used to estimate the current load
|
||||
*/
|
||||
|
||||
static void gk20a_scale_notify(struct device *dev, bool busy)
|
||||
{
|
||||
struct gk20a *g = get_gk20a(dev);
|
||||
struct nvgpu_os_linux *l = nvgpu_os_linux_from_gk20a(g);
|
||||
struct gk20a_scale_profile *profile = g->scale_profile;
|
||||
struct devfreq *devfreq = l->devfreq;
|
||||
|
||||
/* Is the device profile initialised? */
|
||||
if (!(profile && devfreq))
|
||||
return;
|
||||
|
||||
mutex_lock(&devfreq->lock);
|
||||
profile->dev_stat.busy = busy;
|
||||
update_devfreq(devfreq);
|
||||
mutex_unlock(&devfreq->lock);
|
||||
}
|
||||
|
||||
void gk20a_scale_notify_idle(struct device *dev)
|
||||
{
|
||||
gk20a_scale_notify(dev, false);
|
||||
|
||||
}
|
||||
|
||||
void gk20a_scale_notify_busy(struct device *dev)
|
||||
{
|
||||
gk20a_scale_notify(dev, true);
|
||||
}
|
||||
|
||||
/*
|
||||
* gk20a_scale_get_dev_status(dev, *stat)
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user