Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1692463
| Path | csiph.com!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Manasi Navare <manasi.d.navare@intel.com> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] drm/i915: Synchronize connectors states when switching from poll to irq |
| Date | Thu, 20 Jul 2017 08:10:02 +0200 |
| Message-ID | <u5cOS-3eU-7@gated-at.bofh.it> (permalink) |
| References | <tWBt8-2mb-15@gated-at.bofh.it> <u4zDQ-2ih-13@gated-at.bofh.it> |
| X-Extloop1 | 1 |
| X-Ironport-Av | E=Sophos;i="5.40,382,1496127600"; d="scan'208";a="113383178" |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| Content-Disposition | inline |
| User-Agent | Mutt/1.5.23 (2014-03-12) |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 83 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Daniel Vetter <daniel.vetter@intel.com> |
| X-Original-Date | Wed, 19 Jul 2017 23:11:21 -0700 |
| X-Original-Message-ID | <20170720061121.GA9824@intel.com> |
| X-Original-References | <20170626123229.27939-1-paul.kocialkowski@linux.intel.com> <1500379902.1351.7.camel@linux.intel.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1692463 |
Show key headers only | View raw
On Tue, Jul 18, 2017 at 03:11:42PM +0300, Paul Kocialkowski wrote:
> On Mon, 2017-06-26 at 15:32 +0300, Paul Kocialkowski wrote:
> > After detecting an IRQ storm, hotplug detection will switch from
> > irq-based detection to poll-based detection. After a short delay or
> > when resetting storm detection from debugfs, detection will switch
> > back to being irq-based.
> >
> > However, it may occur that polling does not have enough time to detect
> > the current connector state when that second switch takes place. Thus,
> > this sets the appropriate hotplug event bits for the concerned
> > connectors and schedules the hotplug work, that will ensure the
> > connectors states are in sync when switching back to irq.
> >
> > Without this, no irq will be triggered and the hpd change will be
> > lost.
>
> Does anyone have feedback to provide on this?
> It looks like it should be a no-brainer.
>
> Cheers,
>
> Paul
>
> > Signed-off-by: Paul Kocialkowski <paul.kocialkowski@linux.intel.com>
> > ---
> > drivers/gpu/drm/i915/intel_hotplug.c | 8 +++++++-
> > 1 file changed, 7 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/i915/intel_hotplug.c
> > b/drivers/gpu/drm/i915/intel_hotplug.c
> > index f1200272a699..29f55480b0bb 100644
> > --- a/drivers/gpu/drm/i915/intel_hotplug.c
> > +++ b/drivers/gpu/drm/i915/intel_hotplug.c
> > @@ -218,9 +218,13 @@ static void
> > intel_hpd_irq_storm_reenable_work(struct work_struct *work)
> > struct intel_connector *intel_connector =
> > to_intel_connector(connector);
> >
> > if (intel_connector->encoder->hpd_pin == i) {
So if this hpd pin in intel_connector->encoder is set then that
means it got the hpd but because connector->polled is != intel_connector->polled
polling didnt detect that connector.
Is that what you are trying to do here?
Manasi
> > - if (connector->polled !=
> > intel_connector->polled)
> > + if (connector->polled !=
> > intel_connector->polled) {
> > DRM_DEBUG_DRIVER("Reenabling
> > HPD on connector %s\n",
> > connector-
> > >name);
> > +
> > + dev_priv->hotplug.event_bits
> > |= (1 << i);
> > + }
> > +
> > connector->polled = intel_connector-
> > >polled;
> > if (!connector->polled)
> > connector->polled =
> > DRM_CONNECTOR_POLL_HPD;
> > @@ -232,6 +236,8 @@ static void
> > intel_hpd_irq_storm_reenable_work(struct work_struct *work)
> > dev_priv->display.hpd_irq_setup(dev_priv);
> > spin_unlock_irq(&dev_priv->irq_lock);
> >
> > + schedule_work(&dev_priv->hotplug.hotplug_work);
> > +
> > intel_runtime_pm_put(dev_priv);
> > }
> >
> --
> Paul Kocialkowski <paul.kocialkowski@linux.intel.com>
> Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo, Finland
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH] drm/i915: Synchronize connectors states when switching from poll to irq Paul Kocialkowski <paul.kocialkowski@linux.intel.com> - 2017-07-18 14:20 +0200
Re: [PATCH] drm/i915: Synchronize connectors states when switching from poll to irq Manasi Navare <manasi.d.navare@intel.com> - 2017-07-20 08:10 +0200
Re: [PATCH] drm/i915: Synchronize connectors states when switching from poll to irq Paul Kocialkowski <paul.kocialkowski@linux.intel.com> - 2017-07-20 16:50 +0200
csiph-web