From 5272552ab1b9c3b06a3935115f1200f24f466f46 Mon Sep 17 00:00:00 2001 From: Seshendra Gadagottu Date: Mon, 6 Jun 2016 10:36:24 -0700 Subject: gpu: nvgpu: remove clockgate_delay param Removed platform data parameter clockgate_delay, since it is not really used for gpu clock gating any more. Also use railgate_delay as autosuspend delay instead of clockgate_delay. Change-Id: I5b594b5a0e84295ed9971ecdf4865dc1a7dd936d Signed-off-by: Seshendra Gadagottu Reviewed-on: http://git-master/r/1159593 Reviewed-by: Terje Bergstrom Tested-by: Terje Bergstrom --- drivers/gpu/nvgpu/gk20a/gk20a.c | 4 ++-- drivers/gpu/nvgpu/gk20a/gk20a_sysfs.c | 28 -------------------------- drivers/gpu/nvgpu/gk20a/platform_gk20a.h | 3 --- drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c | 2 -- 4 files changed, 2 insertions(+), 35 deletions(-) (limited to 'drivers/gpu') diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c index a3bbe034..a817abcd 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a.c @@ -1349,9 +1349,9 @@ int gk20a_pm_init(struct device *dev) gk20a_dbg_fn(""); /* Initialise pm runtime */ - if (platform->clockgate_delay) { + if (platform->railgate_delay) { pm_runtime_set_autosuspend_delay(dev, - platform->clockgate_delay); + platform->railgate_delay); pm_runtime_use_autosuspend(dev); } diff --git a/drivers/gpu/nvgpu/gk20a/gk20a_sysfs.c b/drivers/gpu/nvgpu/gk20a/gk20a_sysfs.c index 8eaee190..0c94e246 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a_sysfs.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a_sysfs.c @@ -384,32 +384,6 @@ static ssize_t is_railgated_show(struct device *dev, } static DEVICE_ATTR(is_railgated, S_IRUGO, is_railgated_show, NULL); -static ssize_t clockgate_delay_store(struct device *dev, - struct device_attribute *attr, - const char *buf, size_t count) -{ - struct gk20a_platform *platform = dev_get_drvdata(dev); - int clockgate_delay = 0, ret = 0; - - ret = sscanf(buf, "%d", &clockgate_delay); - if (ret == 1 && clockgate_delay >= 0) { - platform->clockgate_delay = clockgate_delay; - pm_runtime_set_autosuspend_delay(dev, - platform->clockgate_delay); - } else - dev_err(dev, "Invalid clockgate delay\n"); - - return count; -} -static ssize_t clockgate_delay_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ - struct gk20a_platform *platform = dev_get_drvdata(dev); - return snprintf(buf, PAGE_SIZE, "%d\n", platform->clockgate_delay); -} -static DEVICE_ATTR(clockgate_delay, ROOTRW, clockgate_delay_show, - clockgate_delay_store); - static ssize_t counters_show(struct device *dev, struct device_attribute *attr, char *buf) { @@ -801,7 +775,6 @@ void gk20a_remove_sysfs(struct device *dev) device_remove_file(dev, &dev_attr_load); device_remove_file(dev, &dev_attr_railgate_delay); device_remove_file(dev, &dev_attr_is_railgated); - device_remove_file(dev, &dev_attr_clockgate_delay); #ifdef CONFIG_PM device_remove_file(dev, &dev_attr_force_idle); #if defined(CONFIG_PM_GENERIC_DOMAINS) @@ -843,7 +816,6 @@ void gk20a_create_sysfs(struct device *dev) error |= device_create_file(dev, &dev_attr_load); error |= device_create_file(dev, &dev_attr_railgate_delay); error |= device_create_file(dev, &dev_attr_is_railgated); - error |= device_create_file(dev, &dev_attr_clockgate_delay); #ifdef CONFIG_PM error |= device_create_file(dev, &dev_attr_force_idle); #if defined(CONFIG_PM_GENERIC_DOMAINS) diff --git a/drivers/gpu/nvgpu/gk20a/platform_gk20a.h b/drivers/gpu/nvgpu/gk20a/platform_gk20a.h index 14f90c94..66d97915 100644 --- a/drivers/gpu/nvgpu/gk20a/platform_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/platform_gk20a.h @@ -68,9 +68,6 @@ struct gk20a_platform { /* Delay before rail gated */ int railgate_delay; - /* Delay before clock gated */ - int clockgate_delay; - /* Second Level Clock Gating: true = enable false = disable */ bool enable_slcg; diff --git a/drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c b/drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c index 4d592d28..33937448 100644 --- a/drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c +++ b/drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c @@ -861,7 +861,6 @@ struct gk20a_platform gk20a_tegra_platform = { /* power management configuration */ .railgate_delay = 500, - .clockgate_delay = 50, .can_railgate = true, .can_elpg = true, .enable_slcg = true, @@ -922,7 +921,6 @@ struct gk20a_platform gm20b_tegra_platform = { /* power management configuration */ .railgate_delay = 500, - .clockgate_delay = 50, .can_railgate = true, .can_elpg = true, .enable_slcg = true, -- cgit v1.2.2