lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 15 Dec 2015 17:25:56 -0500
From:	Lyude <cpaul@...hat.com>
To:	David Airlie <airlied@...ux.ie>,
	dri-devel@...ts.freedesktop.org (open list:DRM DRIVERS),
	linux-kernel@...r.kernel.org (open list),
	Daniel Vetter <daniel.vetter@...ll.ch>
Cc:	Rui Matos <tiagomatos@...il.com>,
	Julien Wajsberg <felash@...il.com>, kuddel.mail@....de,
	Lennart Poettering <mzxreary@...inter.de>,
	Rob Clark <robdclark@...il.com>,
	Benjamin Tissoires <benjamin.tissoires@...hat.com>,
	Lyude <cpaul@...hat.com>
Subject: [PATCH v2] drm/i915: Send a hotplug event on resume instead of an IRQ event

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@...hat.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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ