diff mbox

[01/24] drm/i915: Don't read sprite LP2+ registers on ILK/SNB

Message ID 1394209951-9963-2-git-send-email-ville.syrjala@linux.intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Ville Syrjala March 7, 2014, 4:32 p.m. UTC
From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Sprite LP2+ registers don't exist on ILK/SNB so don't read them.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_pm.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comments

Paulo Zanoni April 4, 2014, 9:35 p.m. UTC | #1
2014-03-07 13:32 GMT-03:00  <ville.syrjala@linux.intel.com>:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Sprite LP2+ registers don't exist on ILK/SNB so don't read them.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>

> ---
>  drivers/gpu/drm/i915/intel_pm.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index 47b502b..26c79ed 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -2664,8 +2664,10 @@ void ilk_wm_get_hw_state(struct drm_device *dev)
>         hw->wm_lp[2] = I915_READ(WM3_LP_ILK);
>
>         hw->wm_lp_spr[0] = I915_READ(WM1S_LP_ILK);
> -       hw->wm_lp_spr[1] = I915_READ(WM2S_LP_IVB);
> -       hw->wm_lp_spr[2] = I915_READ(WM3S_LP_IVB);
> +       if (INTEL_INFO(dev)->gen >= 7) {
> +               hw->wm_lp_spr[1] = I915_READ(WM2S_LP_IVB);
> +               hw->wm_lp_spr[2] = I915_READ(WM3S_LP_IVB);
> +       }
>
>         if (IS_HASWELL(dev) || IS_BROADWELL(dev))
>                 hw->partitioning = (I915_READ(WM_MISC) & WM_MISC_DATA_PARTITION_5_6) ?
> --
> 1.8.3.2
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Daniel Vetter April 5, 2014, 3:19 p.m. UTC | #2
On Fri, Apr 04, 2014 at 06:35:49PM -0300, Paulo Zanoni wrote:
> 2014-03-07 13:32 GMT-03:00  <ville.syrjala@linux.intel.com>:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >
> > Sprite LP2+ registers don't exist on ILK/SNB so don't read them.
> >
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>

Queued for -next, thanks for the patch.
-Daniel
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 47b502b..26c79ed 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -2664,8 +2664,10 @@  void ilk_wm_get_hw_state(struct drm_device *dev)
 	hw->wm_lp[2] = I915_READ(WM3_LP_ILK);
 
 	hw->wm_lp_spr[0] = I915_READ(WM1S_LP_ILK);
-	hw->wm_lp_spr[1] = I915_READ(WM2S_LP_IVB);
-	hw->wm_lp_spr[2] = I915_READ(WM3S_LP_IVB);
+	if (INTEL_INFO(dev)->gen >= 7) {
+		hw->wm_lp_spr[1] = I915_READ(WM2S_LP_IVB);
+		hw->wm_lp_spr[2] = I915_READ(WM3S_LP_IVB);
+	}
 
 	if (IS_HASWELL(dev) || IS_BROADWELL(dev))
 		hw->partitioning = (I915_READ(WM_MISC) & WM_MISC_DATA_PARTITION_5_6) ?