From 4c7065b558dac5968610415770d957f0e3b1ba69 Mon Sep 17 00:00:00 2001 From: Arto Merilainen Date: Tue, 22 Apr 2014 08:22:00 +0300 Subject: gpu: nvgpu: Create load sysfs node always Currently creation of the load sysfs node is bound to devfreq profile initialisation, however, this information is useful even if the scaling is not enabled. This patch modifies the code to create the sysfs node always. Bug 1485489 Change-Id: Id20433344aa81108f89a36cd56c9a73dd9d2e1c8 Signed-off-by: Arto Merilainen Reviewed-on: http://git-master/r/399474 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Terje Bergstrom --- drivers/gpu/nvgpu/gk20a/gk20a_scale.c | 29 ----------------------------- 1 file changed, 29 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a/gk20a_scale.c') diff --git a/drivers/gpu/nvgpu/gk20a/gk20a_scale.c b/drivers/gpu/nvgpu/gk20a/gk20a_scale.c index d1fd71fe..8a92828f 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a_scale.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a_scale.c @@ -34,30 +34,6 @@ #include "clk_gk20a.h" #include "gk20a_scale.h" -static ssize_t gk20a_scale_load_show(struct device *dev, - struct device_attribute *attr, - char *buf) -{ - struct platform_device *pdev = to_platform_device(dev); - struct gk20a *g = get_gk20a(pdev); - u32 busy_time; - ssize_t res; - - if (!g->power_on) { - busy_time = 0; - } else { - gk20a_busy(g->dev); - gk20a_pmu_load_norm(g, &busy_time); - gk20a_idle(g->dev); - } - - res = snprintf(buf, PAGE_SIZE, "%u\n", busy_time); - - return res; -} - -static DEVICE_ATTR(load, S_IRUGO, gk20a_scale_load_show, NULL); - /* * gk20a_scale_qos_notify() * @@ -293,9 +269,6 @@ void gk20a_scale_init(struct platform_device *pdev) if (err || !profile->devfreq_profile.max_state) goto err_get_freqs; - if (device_create_file(&pdev->dev, &dev_attr_load)) - goto err_create_sysfs_entry; - /* Store device profile so we can access it if devfreq governor * init needs that */ g->scale_profile = profile; @@ -332,8 +305,6 @@ void gk20a_scale_init(struct platform_device *pdev) return; err_get_freqs: - device_remove_file(&pdev->dev, &dev_attr_load); -err_create_sysfs_entry: kfree(g->scale_profile); g->scale_profile = NULL; } -- cgit v1.2.2