Bug 56806 - [gm45 dinq] failure to read EDID with gmbus irq
Summary: [gm45 dinq] failure to read EDID with gmbus irq
Status: CLOSED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: XOrg git
Hardware: Other All
: medium normal
Assignee: Daniel Vetter
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-06 13:40 UTC by Chris Wilson
Modified: 2017-07-24 22:59 UTC (History)
4 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Chris Wilson 2012-11-06 13:40:51 UTC
Heads up!

commit 5301493548ac68d491e56eefffae1ae3f4972909
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Thu Sep 6 08:53:41 2012 +0200

    drm/i915: use gmbus irq to wait for gmbus idle
    
    GMBUS_ACTIVE has inverted sense and so doesn't fit into the
    wait_hw_status helper, hence create a new gmbus_wait_idle functions.
    Also, we only care about the idle irq event and nothing else, which
    allows us to use the wait_event_timeout helper directly without
    jumping through hoops to catch NAKs.
    
    Since gen2/3 don't have gmbus interrupts, handle them separately with
    the old wait_for macro.
    
    This shaves another few ms off reading EDID from a hdmi screen on my
    testbox here. EDID reading with interrupt driven gmbus is now as fast
    as with busy-looping gmbus at 28 ms here (with negligible cpu
    overhead).
    
    Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>

upsets my gm45 as it silently fails to read the EDID.

Verified that

diff --git a/drivers/gpu/drm/i915/intel_i2c.c b/drivers/gpu/drm/i915/intel_i2c.c
index f1c78de..84b68a6 100644
--- a/drivers/gpu/drm/i915/intel_i2c.c
+++ b/drivers/gpu/drm/i915/intel_i2c.c
@@ -203,7 +203,7 @@ intel_gpio_setup(struct intel_gmbus *bus, u32 pin)
 	algo->data = bus;
 }
 
-#define HAS_GMBUS_IRQ(dev) (INTEL_INFO(dev)->gen >= 4)
+#define HAS_GMBUS_IRQ(dev) (INTEL_INFO(dev)->gen >= 5)
 static int
 gmbus_wait_hw_status(struct drm_i915_private *dev_priv,
 		     u32 gmbus2_status,

restores the EDID.
Comment 1 Chris Wilson 2012-12-01 16:49:23 UTC
Works with updated gmbus-irq branch.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.