]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: be more careful when returning -ENXIO in gmbus transfer
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 21 May 2012 18:19:48 +0000 (20:19 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 21 May 2012 19:04:21 +0000 (21:04 +0200)
commita6868dc7540799901052ff9b95982d2c8263efee
tree35884f20a18fc66a4adf2eb1d229dff095c3ad98
parent1866387f3d521eb41db81ff059baafa21815eefe
drm/i915: be more careful when returning -ENXIO in gmbus transfer

... flaky ddc hardware can cause a spurious NAK, resulting in the i2c
core and drm edid functions not trying to retry the edid transfer.

Luckily the gmbus quiescenting also times out for these cases, so we
can get out of this mess by returning -ETIMEDOUT for this specific
case. This way we keep the fast-fail of returning -ENXIO if there is
no device present, speeding up the boot process.

This regression has been introduced in

commit ec8c269191f0a972e08fc186839fac8d36dc0168
Author: Daniel Kurtz <djkurtz@chromium.org>
Date:   Fri Mar 30 19:46:38 2012 +0800

    drm/i915/intel_i2c: always wait for IDLE before clearing NAK

v2: Return -ETIMEDOUT for this case and keep the -ENXIO for real NAKs,
suggested by Daniel Kurtz.

Cc: Daniel Kurtz <djkurtz@chromium.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=49518
Reported-and-Tested-by: Julian Simioni <julian.simioni@gmail.com>
Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_i2c.c