Skip to content

Commit

Permalink
drm/i915: Fix FB WM for HSW
Browse files Browse the repository at this point in the history
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@linux.intel.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
  • Loading branch information
Ville Syrjälä authored and Daniel Vetter committed Aug 9, 2013
1 parent 6f6005a commit 5c53661
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/gpu/drm/i915/intel_pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;

Expand Down

0 comments on commit 5c53661

Please sign in to comment.