On Thu, Sep 10, 2015 at 08:20:28AM -0700, Jesse Barnes wrote: > Use WARN_ONCE in a bunch of places and demote a message that would > continually spam us. > > Signed-off-by: Jesse Barnes <jbarnes@xxxxxxxxxxxxxxxx> > --- > drivers/gpu/drm/i915/intel_csr.c | 12 +++++------ > drivers/gpu/drm/i915/intel_runtime_pm.c | 36 ++++++++++++++++----------------- > 2 files changed, 24 insertions(+), 24 deletions(-) > > diff --git a/drivers/gpu/drm/i915/intel_csr.c b/drivers/gpu/drm/i915/intel_csr.c > index ba1ae03..765dfcd 100644 > --- a/drivers/gpu/drm/i915/intel_csr.c > +++ b/drivers/gpu/drm/i915/intel_csr.c > @@ -454,10 +454,10 @@ void intel_csr_ucode_fini(struct drm_device *dev) > > void assert_csr_loaded(struct drm_i915_private *dev_priv) > { > - WARN(intel_csr_load_status_get(dev_priv) != FW_LOADED, > - "CSR is not loaded.\n"); > - WARN(!I915_READ(CSR_PROGRAM_BASE), > - "CSR program storage start is NULL\n"); > - WARN(!I915_READ(CSR_SSP_BASE), "CSR SSP Base Not fine\n"); > - WARN(!I915_READ(CSR_HTP_SKL), "CSR HTP Not fine\n"); > + WARN_ONCE(intel_csr_load_status_get(dev_priv) != FW_LOADED, > + "CSR is not loaded.\n"); > + WARN_ONCE(!I915_READ(CSR_PROGRAM_BASE), > + "CSR program storage start is NULL\n"); > + WARN_ONCE(!I915_READ(CSR_SSP_BASE), "CSR SSP Base Not fine\n"); > + WARN_ONCE(!I915_READ(CSR_HTP_SKL), "CSR HTP Not fine\n"); But why more than one warn in the function? If more than one fire, trying to get the information about what happened is a nightmare. static int assert_once; if (assert_once) return; assert_once |= DRM_ERROR_ON(cond, "message"); ... if (assert_once) WARN("CSR not loaded"); -Chris -- Chris Wilson, Intel Open Source Technology Centre _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/intel-gfx