Skip to contentSkip to conversation

drm/i915: Fix FB WM for HSW

PATCH In review [email protected] 2 participants 2 messages Aug 9, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/i915: Fix FB WM for HSW

From: Ville Syrjälä <[email protected]>

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.

---
 drivers/gpu/drm/i915/intel_pm.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_pm.c +2 -1
index b0e4a0b..862e350 100644
@@ -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;
 
Signature · 6 lines
1.8.1.5

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Reviewed-by on v1 1/1
#1 lore raw

2013/8/9 <[email protected]>:

Quoted 7 lines

From: Ville Syrjälä <[email protected]>

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.

Yay! Thanks!

Quoted 32 lines
---
 drivers/gpu/drm/i915/intel_pm.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_pm.c +2 -2
index b0e4a0b..862e350 100644
@@ -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

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Signature · 1 line
Paulo Zanoni