From: Lyude <cpaul@redhat.com>
To: David Airlie <airlied@linux.ie>,
dri-devel@lists.freedesktop.org (open list:DRM DRIVERS),
linux-kernel@vger.kernel.org (open list),
Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Rui Matos <tiagomatos@gmail.com>,
Julien Wajsberg <felash@gmail.com>,
kuddel.mail@gmx.de, Lennart Poettering <mzxreary@0pointer.de>,
Rob Clark <robdclark@gmail.com>,
Benjamin Tissoires <benjamin.tissoires@redhat.com>,
Lyude <cpaul@redhat.com>
Subject: [PATCH v2] drm/i915: Send a hotplug event on resume instead of an IRQ event
Date: Tue, 15 Dec 2015 17:25:56 -0500 [thread overview]
Message-ID: <1450218356-24028-1-git-send-email-cpaul@redhat.com> (raw)
In-Reply-To: <1450211658.8084.11.camel@redhat.com>
We currently call drm_helper_hpd_irq_event() to handle reprobing
displays on resume, however drm_helper_hpd_irq_event() only checks the
status of hpd. HPD doesn't update if the displays connected changed
before resuming the system, and as such causes us not to detect any
connection changes after resume.
This originally wasn't the case since drm would reset all of the
connectors to unknown during resume and cause a reprobe (since the
connector statuses would change), however this behavior changed in
5677d67ae394 ('drm: Stop resetting connector state to unknown').
Signed-off-by: Lyude <cpaul@redhat.com>
---
I did some research into why setting the connector state to unknown was
causing a reprobe and discovered that the fact that this reprobing ever
worked at all was just a coincidence (i915's IRQ handler gets called by the
irq event, notices the state of all the connectors changed since they were
set to unknown, causes a reprobe). This seems to fix everything (including
monitor detection in normal VTs), and I can't figure out any real use now
for us to set everything to unknown so I'm going to go the route of just
sending the hotplug event instead.
drivers/gpu/drm/i915/i915_drv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 760e0ce..27a6c1b 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -792,7 +792,7 @@ static int i915_drm_resume(struct drm_device *dev)
* */
intel_hpd_init(dev_priv);
/* Config may have changed between suspend and resume */
- drm_helper_hpd_irq_event(dev);
+ drm_kms_helper_hotplug_event(dev);
intel_opregion_init(dev);
--
2.5.0
next prev parent reply other threads:[~2015-12-15 22:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-15 18:07 [PATCH] Revert "drm: Stop resetting connector state to unknown" Lyude
2015-12-15 18:23 ` Rob Clark
2015-12-15 18:33 ` Ville Syrjälä
2015-12-15 18:42 ` Rob Clark
2015-12-15 20:34 ` Lyude
2015-12-15 20:44 ` Ville Syrjälä
2015-12-15 22:25 ` Lyude [this message]
2015-12-16 8:33 ` [PATCH v2] drm/i915: Send a hotplug event on resume instead of an IRQ event Daniel Vetter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1450218356-24028-1-git-send-email-cpaul@redhat.com \
--to=cpaul@redhat.com \
--cc=airlied@linux.ie \
--cc=benjamin.tissoires@redhat.com \
--cc=daniel.vetter@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=felash@gmail.com \
--cc=kuddel.mail@gmx.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mzxreary@0pointer.de \
--cc=robdclark@gmail.com \
--cc=tiagomatos@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).