Skip to content

Commit

Permalink
drm/i915/display/overlay: Prefer drm_WARN_ON over WARN_ON
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Jani Nikula <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
  • Loading branch information
bpankajl authored and jnikula committed Apr 21, 2020
1 parent 8d64157 commit e278f07
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/gpu/drm/i915/display/intel_overlay.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit e278f07

Please sign in to comment.