[Intel-gfx] drm/i915/fbc: disable FBC on FIFO underruns

Chris Wilson chris at chris-wilson.co.uk
Sat Aug 13 09:05:41 UTC 2016


On Fri, Aug 12, 2016 at 11:24:59PM +0000, Pandiyan, Dhinakaran wrote:
> > +/**
> > + * intel_fbc_handle_fifo_underrun - disable FBC when we get a FIFO underrun
> > + * @dev_priv: i915 device instance
> > + *
> > + * Without FBC, most underruns are harmless and don't really cause too many
> > + * problems, except for an annoying message on dmesg. With FBC, underruns can
> > + * become black screens or even worse, especially when paired with bad
> > + * watermarks. So in order for us to be on the safe side, completely disable FBC
> > + * in case we ever detect a FIFO underrun on any pipe. An underrun on any pipe
> > + * already suggests that watermarks may be bad, so try to be as safe as
> > + * possible.
> > + */
> > +void intel_fbc_handle_fifo_underrun(struct drm_i915_private *dev_priv)
> > +{
> > +	struct intel_fbc *fbc = &dev_priv->fbc;
> > +
> > +	if (!fbc_supported(dev_priv))
> > +		return;
> > +
> 
> Should we bail out if fbc is not enabled?
> Also, can we just disable fbc if we see an underrun instead of using a
> new flag to prevent activation?

The information that is crucially absent in the function name, and its
kerneldoc, is that this function is run from hardirq context. There isn't
much you are allowed to do here but schedule work.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list