diff mbox

[v2] drm/i915: Re-enable FBC WM if the watermark is good on gen6+

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

Commit Message

Ville Syrjälä April 24, 2013, 6:09 p.m. UTC
From: Ville Syrjälä <ville.syrjala@linux.intel.com>

If the calculated FBC watermark is no good, we simply disable FBC
watermarks. But we fail to re-enable them later if the calculated
watermark becomes good again. Fix that, but remember to leave FBC
watermarks disabled on ILK since that's required by some workarounds.

v2: Fix checkpatch complaint

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

Comments

Paulo Zanoni May 9, 2013, 8:51 p.m. UTC | #1
2013/4/24  <ville.syrjala@linux.intel.com>:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> If the calculated FBC watermark is no good, we simply disable FBC
> watermarks. But we fail to re-enable them later if the calculated
> watermark becomes good again. Fix that, but remember to leave FBC
> watermarks disabled on ILK since that's required by some workarounds.
>
> v2: Fix checkpatch complaint
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

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

> ---
>  drivers/gpu/drm/i915/intel_pm.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index 3534a71..da8f307 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -1633,6 +1633,10 @@ static bool ironlake_check_srwm(struct drm_device *dev, int level,
>                 I915_WRITE(DISP_ARB_CTL,
>                            I915_READ(DISP_ARB_CTL) | DISP_FBC_WM_DIS);
>                 return false;
> +       } else if (INTEL_INFO(dev)->gen >= 6) {
> +               /* enable FBC WM (except on ILK, where it must remain off) */
> +               I915_WRITE(DISP_ARB_CTL,
> +                          I915_READ(DISP_ARB_CTL) & ~DISP_FBC_WM_DIS);
>         }
>
>         if (display_wm > display->max_wm) {
> --
> 1.8.1.5
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Daniel Vetter May 10, 2013, 7:15 a.m. UTC | #2
On Thu, May 09, 2013 at 05:51:13PM -0300, Paulo Zanoni wrote:
> 2013/4/24  <ville.syrjala@linux.intel.com>:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >
> > If the calculated FBC watermark is no good, we simply disable FBC
> > watermarks. But we fail to re-enable them later if the calculated
> > watermark becomes good again. Fix that, but remember to leave FBC
> > watermarks disabled on ILK since that's required by some workarounds.
> >
> > v2: Fix checkpatch complaint
> >
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Looks correct...
> 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 3534a71..da8f307 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -1633,6 +1633,10 @@  static bool ironlake_check_srwm(struct drm_device *dev, int level,
 		I915_WRITE(DISP_ARB_CTL,
 			   I915_READ(DISP_ARB_CTL) | DISP_FBC_WM_DIS);
 		return false;
+	} else if (INTEL_INFO(dev)->gen >= 6) {
+		/* enable FBC WM (except on ILK, where it must remain off) */
+		I915_WRITE(DISP_ARB_CTL,
+			   I915_READ(DISP_ARB_CTL) & ~DISP_FBC_WM_DIS);
 	}
 
 	if (display_wm > display->max_wm) {