]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/i915/display/overlay: Prefer drm_WARN_ON over WARN_ON
authorPankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>
Mon, 6 Apr 2020 11:27:52 +0000 (16:57 +0530)
committerJani Nikula <jani.nikula@intel.com>
Tue, 21 Apr 2020 07:54:41 +0000 (10:54 +0300)
struct drm_device specific drm_WARN* macros include device information
in the backtrace, so we know what device the warnings originate from.

Prefer drm_WARN_ON over WARN_ON.

Signed-off-by: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200406112800.23762-11-pankaj.laxminarayan.bharadiya@intel.com
drivers/gpu/drm/i915/display/intel_overlay.c

index 6e1d6632322317ed0175941a8bf75972b9330a27..66711e62fa71a006544e98c51da0bc901a9ccdfd 100644 (file)
@@ -281,7 +281,7 @@ static void intel_overlay_flip_prepare(struct intel_overlay *overlay,
        enum pipe pipe = overlay->crtc->pipe;
        struct intel_frontbuffer *from = NULL, *to = NULL;
 
-       WARN_ON(overlay->old_vma);
+       drm_WARN_ON(&overlay->i915->drm, overlay->old_vma);
 
        if (overlay->vma)
                from = intel_frontbuffer_get(overlay->vma->obj);
@@ -350,7 +350,7 @@ static void intel_overlay_release_old_vma(struct intel_overlay *overlay)
        struct i915_vma *vma;
 
        vma = fetch_and_zero(&overlay->old_vma);
-       if (WARN_ON(!vma))
+       if (drm_WARN_ON(&overlay->i915->drm, !vma))
                return;
 
        intel_frontbuffer_flip_complete(overlay->i915,
@@ -396,7 +396,7 @@ static int intel_overlay_off(struct intel_overlay *overlay)
        struct i915_request *rq;
        u32 *cs, flip_addr = overlay->flip_addr;
 
-       WARN_ON(!overlay->active);
+       drm_WARN_ON(&overlay->i915->drm, !overlay->active);
 
        /* According to intel docs the overlay hw may hang (when switching
         * off) without loading the filter coeffs. It is however unclear whether