diff --git a/drivers/gpu/drm/i915/display/intel_fbc.c b/drivers/gpu/drm/i915/display/intel_fbc.c index ab676c6756af..ddf8d3bb7a7d 100644 --- a/drivers/gpu/drm/i915/display/intel_fbc.c +++ b/drivers/gpu/drm/i915/display/intel_fbc.c @@ -412,7 +412,7 @@ static void intel_fbc_deactivate(struct drm_i915_private *dev_priv, { struct intel_fbc *fbc = &dev_priv->fbc; - WARN_ON(!mutex_is_locked(&fbc->lock)); + drm_WARN_ON(&dev_priv->drm, !mutex_is_locked(&fbc->lock)); if (fbc->active) intel_fbc_hw_deactivate(dev_priv); @@ -476,7 +476,8 @@ static int intel_fbc_alloc_cfb(struct drm_i915_private *dev_priv, struct drm_mm_node *uninitialized_var(compressed_llb); int ret; - WARN_ON(drm_mm_node_allocated(&fbc->compressed_fb)); + drm_WARN_ON(&dev_priv->drm, + drm_mm_node_allocated(&fbc->compressed_fb)); ret = find_compression_threshold(dev_priv, &fbc->compressed_fb, size, fb_cpp); @@ -564,7 +565,7 @@ static bool stride_is_valid(struct drm_i915_private *dev_priv, unsigned int stride) { /* This should have been caught earlier. */ - if (WARN_ON_ONCE((stride & (64 - 1)) != 0)) + if (drm_WARN_ON_ONCE(&dev_priv->drm, (stride & (64 - 1)) != 0)) return false; /* Below are the additional FBC restrictions. */ @@ -672,8 +673,8 @@ static void intel_fbc_update_state_cache(struct intel_crtc *crtc, cache->fb.format = fb->format; cache->fb.stride = fb->pitches[0]; - WARN_ON(plane_state->flags & PLANE_HAS_FENCE && - !plane_state->vma->fence); + drm_WARN_ON(&dev_priv->drm, plane_state->flags & PLANE_HAS_FENCE && + !plane_state->vma->fence); if (plane_state->flags & PLANE_HAS_FENCE && plane_state->vma->fence) @@ -939,9 +940,9 @@ static void __intel_fbc_disable(struct drm_i915_private *dev_priv) struct intel_fbc *fbc = &dev_priv->fbc; struct intel_crtc *crtc = fbc->crtc; - WARN_ON(!mutex_is_locked(&fbc->lock)); - WARN_ON(!fbc->crtc); - WARN_ON(fbc->active); + drm_WARN_ON(&dev_priv->drm, !mutex_is_locked(&fbc->lock)); + drm_WARN_ON(&dev_priv->drm, !fbc->crtc); + drm_WARN_ON(&dev_priv->drm, fbc->active); DRM_DEBUG_KMS("Disabling FBC on pipe %c\n", pipe_name(crtc->pipe)); @@ -955,7 +956,7 @@ static void __intel_fbc_post_update(struct intel_crtc *crtc) struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); struct intel_fbc *fbc = &dev_priv->fbc; - WARN_ON(!mutex_is_locked(&fbc->lock)); + drm_WARN_ON(&dev_priv->drm, !mutex_is_locked(&fbc->lock)); if (fbc->crtc != crtc) return; @@ -1148,7 +1149,7 @@ void intel_fbc_enable(struct intel_atomic_state *state, __intel_fbc_disable(dev_priv); } - WARN_ON(fbc->active); + drm_WARN_ON(&dev_priv->drm, fbc->active); intel_fbc_update_state_cache(crtc, crtc_state, plane_state); @@ -1215,7 +1216,7 @@ void intel_fbc_global_disable(struct drm_i915_private *dev_priv) mutex_lock(&fbc->lock); if (fbc->crtc) { - WARN_ON(fbc->crtc->active); + drm_WARN_ON(&dev_priv->drm, fbc->crtc->active); __intel_fbc_disable(dev_priv); } mutex_unlock(&fbc->lock);