]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/i915/display/atomic_plane: Prefer drm_WARN_ON over WARN_ON
authorPankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>
Mon, 6 Apr 2020 11:27:44 +0000 (16:57 +0530)
committerJani Nikula <jani.nikula@intel.com>
Tue, 21 Apr 2020 06:49:30 +0000 (09:49 +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-3-pankaj.laxminarayan.bharadiya@intel.com
drivers/gpu/drm/i915/display/intel_atomic_plane.c

index 25dfeb3197aa9c7dfdf99435d09941023f560211..79032701873a2655be539deeb2d43ec4a57a41ba 100644 (file)
@@ -125,7 +125,7 @@ intel_plane_destroy_state(struct drm_plane *plane,
                          struct drm_plane_state *state)
 {
        struct intel_plane_state *plane_state = to_intel_plane_state(state);
-       WARN_ON(plane_state->vma);
+       drm_WARN_ON(plane->dev, plane_state->vma);
 
        __drm_atomic_helper_plane_destroy_state(&plane_state->uapi);
        if (plane_state->hw.fb)
@@ -396,7 +396,7 @@ skl_next_plane_to_commit(struct intel_atomic_state *state,
        }
 
        /* should never happen */
-       WARN_ON(1);
+       drm_WARN_ON(state->base.dev, 1);
 
        return NULL;
 }