Commit a7f2ad39 authored by Pankaj Bharadiya's avatar Pankaj Bharadiya Committed by Jani Nikula

drm/i915/display/frontbuffer: Prefer drm_WARN_ON over WARN_ON

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: default avatarPankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200406112800.23762-9-pankaj.laxminarayan.bharadiya@intel.com
parent 4ad53ede
...@@ -302,12 +302,14 @@ void intel_frontbuffer_track(struct intel_frontbuffer *old, ...@@ -302,12 +302,14 @@ void intel_frontbuffer_track(struct intel_frontbuffer *old,
BITS_PER_TYPE(atomic_t)); BITS_PER_TYPE(atomic_t));
if (old) { 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); atomic_andnot(frontbuffer_bits, &old->bits);
} }
if (new) { 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); atomic_or(frontbuffer_bits, &new->bits);
} }
} }
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