[Intel-gfx] [PATCH] drm/i915/display: Fix inverted WARN_ON
Laxminarayan Bharadiya, Pankaj
pankaj.laxminarayan.bharadiya at intel.com
Mon Feb 24 09:00:38 UTC 2020
> -----Original Message-----
> From: Jani Nikula <jani.nikula at intel.com>
> Sent: 24 February 2020 11:43
> To: Chris Wilson <chris at chris-wilson.co.uk>; intel-gfx at lists.freedesktop.org
> Cc: Chris Wilson <chris at chris-wilson.co.uk>; Laxminarayan Bharadiya, Pankaj
> <pankaj.laxminarayan.bharadiya at intel.com>
> Subject: Re: [PATCH] drm/i915/display: Fix inverted WARN_ON
>
> On Sun, 23 Feb 2020, Chris Wilson <chris at chris-wilson.co.uk> wrote:
> > Restore the previous WARN_ON(cond) so that we don't complain about
> > poor old Cherryview.
> >
> > Fixes: eb020ca3d43f ("drm/i915/display/dp: Make WARN* drm specific
> > where drm_device ptr is available")
> > Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> > Cc: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya at intel.com>
> > Cc: Jani Nikula <jani.nikula at intel.com>
>
> Reviewed-by: Jani Nikula <jani.nikula at intel.com>
>
> Auch.
>
> How did a cocci patch have something like this? Manual edits on top?
My bad.. I accidentally removed *!* for IS_CHERRYVIEW(dev_priv) while fixing checkpatch 80 char warning.
Fix should be -
diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index 4c411a01b7ab..6ab9712b8f53 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -1024,7 +1024,7 @@ void intel_power_sequencer_reset(struct drm_i915_private *dev_priv)
struct intel_encoder *encoder;
if (drm_WARN_ON(&dev_priv->drm, !IS_VALLEYVIEW(dev_priv) &&
- IS_CHERRYVIEW(dev_priv) &&
+ !IS_CHERRYVIEW(dev_priv) &&
!IS_GEN9_LP(dev_priv)))
return;
Thanks,
Pankaj
>
> I did read the patches through, despite them being cocci stuff, but missed this
> anyway.
>
> But how did CI not complain? Did I miss the warning?
>
> BR,
> Jani.
>
>
> > ---
> > drivers/gpu/drm/i915/display/intel_dp.c | 7 ++++---
> > 1 file changed, 4 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/display/intel_dp.c
> > b/drivers/gpu/drm/i915/display/intel_dp.c
> > index 2f93326c16a3..e8bebd27004d 100644
> > --- a/drivers/gpu/drm/i915/display/intel_dp.c
> > +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> > @@ -1023,9 +1023,10 @@ void intel_power_sequencer_reset(struct
> > drm_i915_private *dev_priv) {
> > struct intel_encoder *encoder;
> >
> > - if (drm_WARN_ON(&dev_priv->drm, !IS_VALLEYVIEW(dev_priv) &&
> > - IS_CHERRYVIEW(dev_priv) &&
> > - !IS_GEN9_LP(dev_priv)))
> > + if (drm_WARN_ON(&dev_priv->drm,
> > + !(IS_VALLEYVIEW(dev_priv) ||
> > + IS_CHERRYVIEW(dev_priv) ||
> > + IS_GEN9_LP(dev_priv))))
> > return;
> >
> > /*
>
> --
> Jani Nikula, Intel Open Source Graphics Center
More information about the Intel-gfx
mailing list