Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5c536613 authored by Ville Syrjälä's avatar Ville Syrjälä Committed by Daniel Vetter
Browse files

drm/i915: Fix FB WM for HSW



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: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: default avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 6f6005a5
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -2681,6 +2681,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;
@@ -2691,7 +2693,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 intel_wm_level *r;