(Resending with small improvements - also sending to dri-devel for feedback). This is the the forth iteration of potential fixes for slow edid detection issues over non-existent outputs (https://bugs.freedesktop.org/show_bug.cgi?id=41059) - the previous versions were posted to the bug and were used mostly for debugging the problem. The problem I attempted to fix here is that some systems would take a very long time trying to locate all the possible video outputs - in in cases where such outputs were bogus, this lead to timing out after all the possible delays were done. After investigation, I came to think on two different ways to fix the issue: - The first patch does a one-line fix in drm_edid.c. I added a check for the return value of i2c_transfer - and, if it is -ENXIO, we give up on further attempts as the bus is not there. A drawback to this approach is that it affects all the devices out there which use drm_get_edid. From my testing, the -ENXIO gave no false positives, but I haven't tested it on non-Intel cards. So I'd like to hear what other drm developers think about that. - The second patch does a similar procedure within the i915 driver, in case the proposed change to drm_edid.c won't be adequate for other drivers. It adds a new function - intel_drm_get_valid_edid - which attempts to do a simple i2c transfer over the bus prior to calling drm_get_edid. In case such transfer fails with -ENXIO, it is a signal that the bus is not there, so we shouldn't waste any time trying to communicate with it further. Note that those patches provide lots of dmesg pollution - for the final version those printk'ss should probably be removed, but I left them intentionally with KERN_DEBUG in order to see when the adapters come and go during the debugging and testing. According to testing performed at https://bugs.freedesktop.org/show_bug.cgi?id=41059, the following results were obtained with those patches: System1: (testing all possible outputs) ubuntu 3.0.0-12.19: 840ms 3.0.0-12.19 + drm patch: 290ms 3.0.0-12.19 + i915 patch: 290ms (manually ignoring phantom outputs) ubuntu 3.0.0-12.19: 690ms 3.0.0-12.19 + drm patch: 140ms 3.0.0-12.19 + i915 patch: 140ms System2: (testing all possible outputs) ubuntu 3.0.0-12.19: 315ms 3.0.0-12.19 + drm patch: 280ms 3.0.0-12.19 + i915 patch: 280ms (manually ignoring phantom outputs) ubuntu 3.0.0-12.19: 175ms 3.0.0-12.19 + drm patch: 140ms 3.0.0-12.19 + i915 patch: 140ms Eugeni Dodonov (2): Give up on edid retries when i2c tells us that bus is not there Check if the bus is valid prior to discovering edid. drivers/gpu/drm/drm_edid.c | 5 +++++ drivers/gpu/drm/i915/intel_dp.c | 4 ++-- drivers/gpu/drm/i915/intel_drv.h | 2 ++ drivers/gpu/drm/i915/intel_hdmi.c | 4 ++-- drivers/gpu/drm/i915/intel_i2c.c | 33 +++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_lvds.c | 2 +- drivers/gpu/drm/i915/intel_modes.c | 2 +- drivers/gpu/drm/i915/intel_sdvo.c | 4 ++-- 8 files changed, 48 insertions(+), 8 deletions(-) -- 1.7.6.3 _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/dri-devel