]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: check whether we actually received an edid in detect_ddc
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 11 Jul 2012 10:31:52 +0000 (12:31 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 20 Jul 2012 10:21:38 +0000 (12:21 +0200)
commit1e6528f05b037d763bfa3d1d3d6d20e69993a2a4
tree25faa5214798655ae045bfbc52b9f305f93cdf1c
parentbb023f7c7dc17415343ff08c252680a383caec10
drm/i915: check whether we actually received an edid in detect_ddc

Somehow detect_ddc manages to fall through all checks when we think
that something responds on the ddc i2c address, but the edid read
failed. Fix this up by explicitly checking for this case.

This fixes a regression on newer chips because since

commit 45b6ca265a8aa9aecd8caf0f520139efe6db91f7
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Sat Jun 16 15:30:32 2012 +0200

    drm/i915/crt: Do not rely upon the HPD presence pin

we use ddc detection also on hotplug capable platforms. And one of
these reads all 0s for any i2c transaction if nothing is connected to
the vga port.

v2: Implement Chris Wilson's review:
- simplify logic, default to "nothing detected"
- kill stale comment
- BUG_ON(!crt->type != ANALOG)

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=51900
Tested-by: Yang Guang <guang.a.yang@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_crt.c