summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/i915/i915_sysfs.c24
1 files changed, 11 insertions, 13 deletions
diff --git a/drivers/gpu/drm/i915/i915_sysfs.c b/drivers/gpu/drm/i915/i915_sysfs.c
index c2013273a4c6..2f5388af8df9 100644
--- a/drivers/gpu/drm/i915/i915_sysfs.c
+++ b/drivers/gpu/drm/i915/i915_sysfs.c
@@ -205,20 +205,18 @@ void i915_setup_sysfs(struct drm_device *dev)
{
int ret;
- /* ILK and below don't yet have relevant sysfs files */
- if (INTEL_INFO(dev)->gen < 6)
- return;
-
- ret = sysfs_merge_group(&dev->primary->kdev.kobj, &rc6_attr_group);
- if (ret)
- DRM_ERROR("RC6 residency sysfs setup failed\n");
-
- if (!IS_IVYBRIDGE(dev))
- return;
+ if (INTEL_INFO(dev)->gen >= 6) {
+ ret = sysfs_merge_group(&dev->primary->kdev.kobj,
+ &rc6_attr_group);
+ if (ret)
+ DRM_ERROR("RC6 residency sysfs setup failed\n");
+ }
- ret = device_create_bin_file(&dev->primary->kdev, &dpf_attrs);
- if (ret)
- DRM_ERROR("l3 parity sysfs setup failed\n");
+ if (IS_IVYBRIDGE(dev)) {
+ ret = device_create_bin_file(&dev->primary->kdev, &dpf_attrs);
+ if (ret)
+ DRM_ERROR("l3 parity sysfs setup failed\n");
+ }
}
void i915_teardown_sysfs(struct drm_device *dev)