[Intel-gfx] [PATCH] drm/i915/sysfs: Merge vlv_attrs with gen6_attrs

Daniel Vetter daniel at ffwll.ch
Fri Jul 11 18:22:20 CEST 2014


On Fri, Jul 11, 2014 at 06:03:16PM +0200, Daniel Vetter wrote:
> They match now.
> 
> Cc: Deepak S <deepak.s at linux.intel.com>
> Cc: Mika Kuoppala <mika.kuoppala at intel.com>
> Signed-off-by: Daniel Vetter <daniel.vetter at ffwll.ch>

Scrap that ...

> ---
>  drivers/gpu/drm/i915/i915_sysfs.c | 20 ++------------------
>  1 file changed, 2 insertions(+), 18 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_sysfs.c b/drivers/gpu/drm/i915/i915_sysfs.c
> index b15c8cee103b..32e4302a4608 100644
> --- a/drivers/gpu/drm/i915/i915_sysfs.c
> +++ b/drivers/gpu/drm/i915/i915_sysfs.c
> @@ -491,17 +491,6 @@ static const struct attribute *gen6_attrs[] = {
>  	NULL,
>  };
>  
> -static const struct attribute *vlv_attrs[] = {
> -	&dev_attr_gt_cur_freq_mhz.attr,
> -	&dev_attr_gt_max_freq_mhz.attr,
> -	&dev_attr_gt_min_freq_mhz.attr,
> -	&dev_attr_gt_RP0_freq_mhz.attr,
> -	&dev_attr_gt_RP1_freq_mhz.attr,
> -	&dev_attr_gt_RPn_freq_mhz.attr,
> -	&dev_attr_vlv_rpe_freq_mhz.attr,

... I didn't spot this one here.
-Daniel
> -	NULL,
> -};
> -
>  static ssize_t error_state_read(struct file *filp, struct kobject *kobj,
>  				struct bin_attribute *attr, char *buf,
>  				loff_t off, size_t count)
> @@ -593,9 +582,7 @@ void i915_setup_sysfs(struct drm_device *dev)
>  	}
>  
>  	ret = 0;
> -	if (IS_VALLEYVIEW(dev))
> -		ret = sysfs_create_files(&dev->primary->kdev->kobj, vlv_attrs);
> -	else if (INTEL_INFO(dev)->gen >= 6)
> +	if (INTEL_INFO(dev)->gen >= 6)
>  		ret = sysfs_create_files(&dev->primary->kdev->kobj, gen6_attrs);
>  	if (ret)
>  		DRM_ERROR("RPS sysfs setup failed\n");
> @@ -609,10 +596,7 @@ void i915_setup_sysfs(struct drm_device *dev)
>  void i915_teardown_sysfs(struct drm_device *dev)
>  {
>  	sysfs_remove_bin_file(&dev->primary->kdev->kobj, &error_state_attr);
> -	if (IS_VALLEYVIEW(dev))
> -		sysfs_remove_files(&dev->primary->kdev->kobj, vlv_attrs);
> -	else
> -		sysfs_remove_files(&dev->primary->kdev->kobj, gen6_attrs);
> +	sysfs_remove_files(&dev->primary->kdev->kobj, gen6_attrs);
>  	device_remove_bin_file(dev->primary->kdev,  &dpf_attrs_1);
>  	device_remove_bin_file(dev->primary->kdev,  &dpf_attrs);
>  #ifdef CONFIG_PM
> -- 
> 2.0.0
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch



More information about the Intel-gfx mailing list