Skip to contentSkip to conversation

drm/i915: Enable SDVO hotplug interrupts for HDMI and DVI

PATCH In review Simon Farnsworth 2 participants 2 messages Sep 21, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v6 1/1 drm/i915: Enable SDVO hotplug interrupts for HDMI and DVI

I was seeing a nasty 5 frame glitch every 10 seconds, caused by the poll for connection on DVI attached by SDVO.

As my SDVO DVI supports hotplug detect interrupts, the fix is to enable them, and hook them in to the various bits of driver infrastructure so that they work reliably.

Note that this is only tested on single-function DVI-D SDVOs, on two platforms (965GME and 945GSE), and has not been checked against a specification document.

With lots of help from Adam Jackson <[email protected]> on IRC.

---
Changes from v5:

* Add an all-important ~ when trying to clear just the bits I think I understand.

* Make the patch safer - instead of setting active hotplug based on supported hotplug (as the commented out code did), set it based on the current active hotplug, with the two bits we think we understand tweaked.

* Add my testing details to the changelog, to reduce head-scratching time if I regress someone's hardware.

Changes from the unnumbered v4:

* At Keith Packard's request, store the required hotplug bits in struct intel_sdvo and just call SET_ACTIVE_HOT_PLUG to enable hotplug interrupts.

* Add some comments to explain why I'm doing things that reviewers didn't think was obvious, so that the next person to examine this area doesn't get confused.

Changes from v3:

* As per Chris Wilson's comment, move the hotplug enable from intel_sdvo_init to intel_sdvo_dvi_init. Should correctly enable HPD if only one of a multifunction SDVO pair supports HPD.

Changes from v2:

* Stylistic cleanups requested by Chris Wilson in review:
* Make intel_sdvo_find_connector cleaner
* Rename intel_sdvo_set_hotplug to intel_sdvo_enable_hotplug (reflects functionality better)
* Remove intel_sdvo_do_hotplug

Changes from first version:

* Don't call intel_sdvo_supports_hotplug twice - pick up the setting in connector->polled instead (suggested by Keith Packard in review).

* Change subject prefix to drm/i915

 drivers/gpu/drm/i915/intel_drv.h  |    3 -
 drivers/gpu/drm/i915/intel_sdvo.c |   88 ++++++++++++-------------------------
 2 files changed, 29 insertions(+), 62 deletions(-)
drivers/gpu/drm/i915/intel_drv.h +0 -3
index 375690b..a72d31d 100644
@@ -337,9 +337,6 @@ extern void intel_release_load_detect_pipe(struct intel_encoder *intel_encoder,
 					   struct drm_connector *connector,
 					   struct intel_load_detect_pipe *old);
 
-extern struct drm_connector* intel_sdvo_find(struct drm_device *dev, int sdvoB);
-extern int intel_sdvo_supports_hotplug(struct drm_connector *connector);
-extern void intel_sdvo_set_hotplug(struct drm_connector *connector, int enable);
 extern void intelfb_restore(void);
 extern void intel_crtc_fb_gamma_set(struct drm_crtc *crtc, u16 red, u16 green,
 				    u16 blue, int regno);
drivers/gpu/drm/i915/intel_sdvo.c +29 -59

128 lines not on this page · raw message

Signature · 1 line
1.7.6