[Intel-gfx] [PATCH v8] drm/i915/dsc: Add Per connector debugfs node for DSC support/enable
Manasi Navare
manasi.d.navare at intel.com
Wed Dec 19 21:39:15 UTC 2018
On Wed, Dec 19, 2018 at 08:08:51AM +0000, Chris Wilson wrote:
> Quoting Manasi Navare (2018-12-06 00:54:07)
> > DSC can be supported per DP connector. This patch adds a per connector
> > debugfs node to expose DSC support capability by the kernel.
> > The same node can be used from userspace to force DSC enable.
>
> So this has a nice deadlock that is killing icl sporadically...
>
> > +static int i915_dsc_fec_support_show(struct seq_file *m, void *data)
> > +{
> > + struct drm_connector *connector = m->private;
> > + struct drm_device *dev = connector->dev;
> > + struct drm_crtc *crtc;
> > + struct intel_dp *intel_dp;
> > + struct drm_modeset_acquire_ctx ctx;
> > + struct intel_crtc_state *crtc_state = NULL;
> > + int ret = 0;
> > + bool try_again = false;
> > +
> > + drm_modeset_acquire_init(&ctx, DRM_MODESET_ACQUIRE_INTERRUPTIBLE);
> > +
> > + do {
> > + ret = drm_modeset_lock(&dev->mode_config.connection_mutex,
> > + &ctx);
> > + if (ret) {
> > + ret = -EINTR;
> > + break;
> > + }
> > + crtc = connector->state->crtc;
> > + if (connector->status != connector_status_connected || !crtc) {
> > + ret = -ENODEV;
> > + break;
> > + }
> > + ret = drm_modeset_lock(&crtc->mutex, &ctx);
> > + if (ret == -EDEADLK) {
> > + ret = drm_modeset_backoff(&ctx);
> > + if (!ret) {
> > + try_again = true;
>
> try_again is never cleared on the next loop, so after you hit the
> backoff, we never escape on success.
Thanks for catching this, teh CI results came green before this patch was merged so
never noticed this.
I will submit a patch to fix this.
Thanks again Chris and Tomi for catching this bug
Manasi
>
> Reported-by: Tomi Sarvela <tomi.p.sarvela at intel.com>
> -Chris
More information about the Intel-gfx
mailing list