[Intel-gfx] [PATCH] drm/i915: Fix FB WM for HSW

ville.syrjala at linux.intel.com ville.syrjala at linux.intel.com
Fri Aug 9 17:02:09 CEST 2013


From: Ville Syrjälä <ville.syrjala at linux.intel.com>

Due to a misplaced memset(), we never actually enabled the FBC WM on HSW.
Move the memset() to happen a bit earlier, so that it won't clobber
results->enable_fbc_wm.

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

diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index b0e4a0b..862e350 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -2429,6 +2429,8 @@ static void hsw_compute_wm_results(struct drm_device *dev,
 			break;
 	max_level = level - 1;
 
+	memset(results, 0, sizeof(*results));
+
 	/* The spec says it is preferred to disable FBC WMs instead of disabling
 	 * a WM level. */
 	results->enable_fbc_wm = true;
@@ -2439,7 +2441,6 @@ static void hsw_compute_wm_results(struct drm_device *dev,
 		}
 	}
 
-	memset(results, 0, sizeof(*results));
 	for (wm_lp = 1; wm_lp <= 3; wm_lp++) {
 		const struct hsw_lp_wm_result *r;
 
-- 
1.8.1.5




More information about the Intel-gfx mailing list