@@ -729,7 +729,7 @@ typedef struct drm_i915_private {
/* overlay */
struct intel_overlay *overlay;
- bool sprite_scaling_enabled;
+ unsigned int sprite_scaling_enabled;
/* LVDS info */
int backlight_level; /* restore backlight to this value */
@@ -345,15 +345,16 @@ ivb_prepare_plane(struct drm_plane *plane)
*/
if (regs->scale & SPRITE_SCALE_ENABLE) {
if (!dev_priv->sprite_scaling_enabled) {
- dev_priv->sprite_scaling_enabled = true;
+ dev_priv->sprite_scaling_enabled |= 1 << pipe;
intel_update_watermarks(dev);
intel_wait_for_vblank(dev, pipe);
}
} else {
- if (dev_priv->sprite_scaling_enabled) {
- dev_priv->sprite_scaling_enabled = false;
+ if (dev_priv->sprite_scaling_enabled & (1 << pipe)) {
+ dev_priv->sprite_scaling_enabled &= ~(1 << pipe);
/* potentially re-enable LP watermarks */
- intel_update_watermarks(dev);
+ if (!dev_priv->sprite_scaling_enabled)
+ intel_update_watermarks(dev);
}
}
}
@@ -389,7 +390,7 @@ ivb_disable_plane(struct drm_plane *plane)
ivb_commit_plane(plane);
POSTING_READ(SPRSURF(pipe));
- dev_priv->sprite_scaling_enabled = false;
+ dev_priv->sprite_scaling_enabled &= ~(1 << pipe);
intel_update_watermarks(dev);
}