From 027d2646851ad2810a96db9d63d80bb333a543f0 Mon Sep 17 00:00:00 2001 From: Matt Longnecker Date: Mon, 18 Aug 2014 17:00:01 -0700 Subject: edp: sysedp : CPU/GPU priority depends on fGPU Provide sysedp_dynamic_capping with the instantaneous GPU frequency when notifying it of the GPU load. Modify the gpu/cpu priority decision logic to choose CPU priority until GPU frequency gets "near" the CPU-priority-limited-GPU-fmax. Introduce the priority_bias debugfs parameter to facilitate tuning of "near". priority_bias takes a value from 0 to 100. Change-Id: I57df17d50cd8077a512b5932f4a304ca5e6992aa Signed-off-by: Matt Longnecker Reviewed-on: http://git-master/r/481720 (cherry picked from commit b2ac745a45e273e849d7b190913ee97092fdebc2) Reviewed-on: http://git-master/r/498901 GVS: Gerrit_Virtual_Submit Reviewed-by: Winnie Hsu --- drivers/video/tegra/host/nvhost_acm.c | 2 +- drivers/video/tegra/host/nvhost_scale.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'drivers/video') diff --git a/drivers/video/tegra/host/nvhost_acm.c b/drivers/video/tegra/host/nvhost_acm.c index 36b54b7a1d59..2695268aeff3 100644 --- a/drivers/video/tegra/host/nvhost_acm.c +++ b/drivers/video/tegra/host/nvhost_acm.c @@ -615,7 +615,7 @@ int nvhost_module_suspend(struct device *dev) /* inform edp governor that there is no load any more */ if (pdata->gpu_edp_device) - tegra_edp_notify_gpu_load(0); + tegra_edp_notify_gpu_load(0, 0); return 0; } diff --git a/drivers/video/tegra/host/nvhost_scale.c b/drivers/video/tegra/host/nvhost_scale.c index 4129c566c92c..51e94251e3c3 100644 --- a/drivers/video/tegra/host/nvhost_scale.c +++ b/drivers/video/tegra/host/nvhost_scale.c @@ -222,7 +222,9 @@ static void nvhost_scale_notify(struct platform_device *pdev, bool busy) if (pdata->gpu_edp_device) { u32 avg = 0; actmon_op().read_avg_norm(profile->actmon, &avg); - tegra_edp_notify_gpu_load(avg); + BUG(); + /* the next line passes a bogus frequency */ + tegra_edp_notify_gpu_load(avg, 0); } /* If defreq is disabled, set the freq to max or min */ -- cgit v1.2.3