diff options
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/sysfs.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/sysfs.c b/drivers/gpu/nvgpu/common/linux/sysfs.c index 053c1a12..9d2eab92 100644 --- a/drivers/gpu/nvgpu/common/linux/sysfs.c +++ b/drivers/gpu/nvgpu/common/linux/sysfs.c | |||
@@ -17,7 +17,9 @@ | |||
17 | #include <linux/device.h> | 17 | #include <linux/device.h> |
18 | #include <linux/pm_runtime.h> | 18 | #include <linux/pm_runtime.h> |
19 | #include <linux/fb.h> | 19 | #include <linux/fb.h> |
20 | #ifdef CONFIG_TEGRA_DVFS | ||
20 | #include <soc/tegra/tegra-dvfs.h> | 21 | #include <soc/tegra/tegra-dvfs.h> |
22 | #endif | ||
21 | 23 | ||
22 | #include <nvgpu/kmem.h> | 24 | #include <nvgpu/kmem.h> |
23 | #include <nvgpu/nvhost.h> | 25 | #include <nvgpu/nvhost.h> |
@@ -726,6 +728,7 @@ static ssize_t emc3d_ratio_read(struct device *dev, | |||
726 | 728 | ||
727 | static DEVICE_ATTR(emc3d_ratio, ROOTRW, emc3d_ratio_read, emc3d_ratio_store); | 729 | static DEVICE_ATTR(emc3d_ratio, ROOTRW, emc3d_ratio_read, emc3d_ratio_store); |
728 | 730 | ||
731 | #ifdef CONFIG_TEGRA_DVFS | ||
729 | static ssize_t fmax_at_vmin_safe_read(struct device *dev, | 732 | static ssize_t fmax_at_vmin_safe_read(struct device *dev, |
730 | struct device_attribute *attr, char *buf) | 733 | struct device_attribute *attr, char *buf) |
731 | { | 734 | { |
@@ -739,6 +742,7 @@ static ssize_t fmax_at_vmin_safe_read(struct device *dev, | |||
739 | } | 742 | } |
740 | 743 | ||
741 | static DEVICE_ATTR(fmax_at_vmin_safe, S_IRUGO, fmax_at_vmin_safe_read, NULL); | 744 | static DEVICE_ATTR(fmax_at_vmin_safe, S_IRUGO, fmax_at_vmin_safe_read, NULL); |
745 | #endif | ||
742 | 746 | ||
743 | #ifdef CONFIG_PM | 747 | #ifdef CONFIG_PM |
744 | static ssize_t force_idle_store(struct device *dev, | 748 | static ssize_t force_idle_store(struct device *dev, |
@@ -1014,7 +1018,9 @@ void nvgpu_remove_sysfs(struct device *dev) | |||
1014 | device_remove_file(dev, &dev_attr_elpg_enable); | 1018 | device_remove_file(dev, &dev_attr_elpg_enable); |
1015 | device_remove_file(dev, &dev_attr_mscg_enable); | 1019 | device_remove_file(dev, &dev_attr_mscg_enable); |
1016 | device_remove_file(dev, &dev_attr_emc3d_ratio); | 1020 | device_remove_file(dev, &dev_attr_emc3d_ratio); |
1021 | #ifdef CONFIG_TEGRA_DVFS | ||
1017 | device_remove_file(dev, &dev_attr_fmax_at_vmin_safe); | 1022 | device_remove_file(dev, &dev_attr_fmax_at_vmin_safe); |
1023 | #endif | ||
1018 | device_remove_file(dev, &dev_attr_counters); | 1024 | device_remove_file(dev, &dev_attr_counters); |
1019 | device_remove_file(dev, &dev_attr_counters_reset); | 1025 | device_remove_file(dev, &dev_attr_counters_reset); |
1020 | device_remove_file(dev, &dev_attr_load); | 1026 | device_remove_file(dev, &dev_attr_load); |
@@ -1061,7 +1067,9 @@ int nvgpu_create_sysfs(struct device *dev) | |||
1061 | error |= device_create_file(dev, &dev_attr_elpg_enable); | 1067 | error |= device_create_file(dev, &dev_attr_elpg_enable); |
1062 | error |= device_create_file(dev, &dev_attr_mscg_enable); | 1068 | error |= device_create_file(dev, &dev_attr_mscg_enable); |
1063 | error |= device_create_file(dev, &dev_attr_emc3d_ratio); | 1069 | error |= device_create_file(dev, &dev_attr_emc3d_ratio); |
1070 | #ifdef CONFIG_TEGRA_DVFS | ||
1064 | error |= device_create_file(dev, &dev_attr_fmax_at_vmin_safe); | 1071 | error |= device_create_file(dev, &dev_attr_fmax_at_vmin_safe); |
1072 | #endif | ||
1065 | error |= device_create_file(dev, &dev_attr_counters); | 1073 | error |= device_create_file(dev, &dev_attr_counters); |
1066 | error |= device_create_file(dev, &dev_attr_counters_reset); | 1074 | error |= device_create_file(dev, &dev_attr_counters_reset); |
1067 | error |= device_create_file(dev, &dev_attr_load); | 1075 | error |= device_create_file(dev, &dev_attr_load); |