Commit 20674eef authored by Ville Syrjälä's avatar Ville Syrjälä Committed by Daniel Vetter

drm/i915: Spruce up assert_sprites_disabled()

Make assert_sprites_disabled() operational on all platforms where
we currently have sprite support enabled.
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: default avatarRodrigo Vivi <rodrigo.vivi@gmail.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 653e1026
...@@ -1135,13 +1135,11 @@ static void assert_planes_disabled(struct drm_i915_private *dev_priv, ...@@ -1135,13 +1135,11 @@ static void assert_planes_disabled(struct drm_i915_private *dev_priv,
static void assert_sprites_disabled(struct drm_i915_private *dev_priv, static void assert_sprites_disabled(struct drm_i915_private *dev_priv,
enum pipe pipe) enum pipe pipe)
{ {
struct drm_device *dev = dev_priv->dev;
int reg, i; int reg, i;
u32 val; u32 val;
if (!IS_VALLEYVIEW(dev_priv->dev)) if (IS_VALLEYVIEW(dev)) {
return;
/* Need to check both planes against the pipe */
for (i = 0; i < dev_priv->num_plane; i++) { for (i = 0; i < dev_priv->num_plane; i++) {
reg = SPCNTR(pipe, i); reg = SPCNTR(pipe, i);
val = I915_READ(reg); val = I915_READ(reg);
...@@ -1149,6 +1147,19 @@ static void assert_sprites_disabled(struct drm_i915_private *dev_priv, ...@@ -1149,6 +1147,19 @@ static void assert_sprites_disabled(struct drm_i915_private *dev_priv,
"sprite %c assertion failure, should be off on pipe %c but is still active\n", "sprite %c assertion failure, should be off on pipe %c but is still active\n",
sprite_name(pipe, i), pipe_name(pipe)); sprite_name(pipe, i), pipe_name(pipe));
} }
} else if (INTEL_INFO(dev)->gen >= 7) {
reg = SPRCTL(pipe);
val = I915_READ(reg);
WARN((val & SPRITE_ENABLE),
"sprite %c assertion failure, should be off on pipe %c but is still active\n",
plane_name(pipe), pipe_name(pipe));
} else if (INTEL_INFO(dev)->gen >= 5) {
reg = DVSCNTR(pipe);
val = I915_READ(reg);
WARN((val & DVS_ENABLE),
"sprite %c assertion failure, should be off on pipe %c but is still active\n",
plane_name(pipe), pipe_name(pipe));
}
} }
static void assert_pch_refclk_enabled(struct drm_i915_private *dev_priv) static void assert_pch_refclk_enabled(struct drm_i915_private *dev_priv)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment