]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/i915/display/frontbuffer: Prefer drm_WARN_ON over WARN_ON
authorPankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>
Mon, 6 Apr 2020 11:27:50 +0000 (16:57 +0530)
committerJani Nikula <jani.nikula@intel.com>
Tue, 21 Apr 2020 07:54:22 +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-9-pankaj.laxminarayan.bharadiya@intel.com
drivers/gpu/drm/i915/display/intel_frontbuffer.c

index 6cb02c912accf079529cba521718c7c8492ba76c..2979ed2588eb93ad9aa6dcc02c1c433bb9c7cab5 100644 (file)
@@ -302,12 +302,14 @@ void intel_frontbuffer_track(struct intel_frontbuffer *old,
                     BITS_PER_TYPE(atomic_t));
 
        if (old) {
-               WARN_ON(!(atomic_read(&old->bits) & frontbuffer_bits));
+               drm_WARN_ON(old->obj->base.dev,
+                           !(atomic_read(&old->bits) & frontbuffer_bits));
                atomic_andnot(frontbuffer_bits, &old->bits);
        }
 
        if (new) {
-               WARN_ON(atomic_read(&new->bits) & frontbuffer_bits);
+               drm_WARN_ON(new->obj->base.dev,
+                           atomic_read(&new->bits) & frontbuffer_bits);
                atomic_or(frontbuffer_bits, &new->bits);
        }
 }