Re: [PATCH 1/5] drm/i915: don't save/restore LBB on Gen5+

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Sep 12, 2013 at 01:58:17PM -0300, Paulo Zanoni wrote:
> From: Paulo Zanoni <paulo.r.zanoni@xxxxxxxxx>
> 
> Because this PCI config register doesn't exist on Gen5+.
> 
> Signed-off-by: Paulo Zanoni <paulo.r.zanoni@xxxxxxxxx>

Yep. Can't see it in configdb. Actually it's only listed there for CTG
and CLN, which I guess makes sense as non-mobile platforms probably
don't have backlights. For BLB and ELK it's listed as reserved and RO,
so I guess it doesn't hurt to poke it on them. If I'm wrong we could
probably slap on an IS_MOBILE() check there too. Older stuff doesn't
exist in configdb, so that's as far back as I can go.

Reviewed-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>

> ---
>  drivers/gpu/drm/i915/i915_suspend.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_suspend.c b/drivers/gpu/drm/i915/i915_suspend.c
> index 70db618..3538370 100644
> --- a/drivers/gpu/drm/i915/i915_suspend.c
> +++ b/drivers/gpu/drm/i915/i915_suspend.c
> @@ -340,7 +340,9 @@ int i915_save_state(struct drm_device *dev)
>  	struct drm_i915_private *dev_priv = dev->dev_private;
>  	int i;
>  
> -	pci_read_config_byte(dev->pdev, LBB, &dev_priv->regfile.saveLBB);
> +	if (INTEL_INFO(dev)->gen <= 4)
> +		pci_read_config_byte(dev->pdev, LBB,
> +				     &dev_priv->regfile.saveLBB);
>  
>  	mutex_lock(&dev->struct_mutex);
>  
> @@ -390,7 +392,9 @@ int i915_restore_state(struct drm_device *dev)
>  	struct drm_i915_private *dev_priv = dev->dev_private;
>  	int i;
>  
> -	pci_write_config_byte(dev->pdev, LBB, dev_priv->regfile.saveLBB);
> +	if (INTEL_INFO(dev)->gen <= 4)
> +		pci_write_config_byte(dev->pdev, LBB,
> +				      dev_priv->regfile.saveLBB);
>  
>  	mutex_lock(&dev->struct_mutex);
>  
> -- 
> 1.8.3.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx





[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux