linux-uconsole/drivers
David Flynn 0f37a87fae drm/i915/dp: Fix I2C/EDID handling with active DisplayPort to DVI converter
commit 8316f33766 upstream.

The DisplayPort standard (1.1a) states that:
  The I2C-over-AUX Reply field is valid only when Native AUX CH Reply
  field is AUX_ACK (00). When Native AUX CH Reply field is not 00, then,
  I2C-over-AUX Reply field must be 00 and be ignored.

This fixes broken EDID reading when using an active DisplayPort to
duallink DVI converter.  If the AUX CH replier chooses to defer the
transaction, a short read occurs and erroneous data is returned as
the i2c reply due to a lack of length checking and failure to check
for AUX ACK.

As a result, broken EDIDs can look like:
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
00: bc bc bc ff bc bc bc ff bc bc bc ac bc bc bc 45    ???.???.???????E
10: bc bc bc 10 bc bc bc 34 bc bc bc ee bc bc bc 4c    ???????4???????L
20: bc bc bc 50 bc bc bc 00 bc bc bc 40 bc bc bc 00    ???P???.???@???.
30: bc bc bc 01 bc bc bc 01 bc bc bc a0 bc bc bc 40    ???????????????@
40: bc bc bc 00 bc bc bc 00 bc bc bc 00 bc bc bc 55    ???.???.???.???U
50: bc bc bc 35 bc bc bc 31 bc bc bc 20 bc bc bc fc    ???5???1??? ????
60: bc bc bc 4c bc bc bc 34 bc bc bc 46 bc bc bc 00    ???L???4???F???.
70: bc bc bc 38 bc bc bc 11 bc bc bc 20 bc bc bc 20    ???8??????? ???
80: bc bc bc ff bc bc bc ff bc bc bc ff bc bc bc ff    ???.???.???.???.
...

which can lead to:
[drm:drm_edid_block_valid] *ERROR* EDID checksum is invalid, remainder
[drm:drm_edid_block_valid] *ERROR* Raw EDID:
<3>30 30 30 30 30 30 30 32 38 32 30 32 63 63 31 61  000000028202cc1a
<3>28 00 02 8c 00 00 00 00 18 00 00 00 00 00 00 00  (...............
<3>20 4c 61 73 74 20 62 65 61 63 6f 6e 3a 20 33 32   Last beacon: 32
<3>32 30 6d 73 20 61 67 6f 46 00 05 8c 00 00 00 00  20ms agoF.......
<3>36 00 00 00 00 00 00 00 00 0c 57 69 2d 46 69 20  6.........Wi-Fi
<3>52 6f 75 74 65 72 01 08 82 84 8b 96 24 30 48 6c  Router......$0Hl
<3>03 01 01 06 02 00 00 2a 01 00 2f 01 00 32 04 0c  .......*../..2..
<3>12 18 60 dd 09 00 10 18 02 00 00 01 00 00 18 00  ..`.............

Signed-off-by: David Flynn <davidf@rd.bbc.co.uk>
[ickle: fix up some surrounding checkpatch warnings]
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-07 13:58:45 -08:00
..
accessibility
acpi ACPI: EC: Add another dmi match entry for MSI hardware 2011-01-07 13:58:31 -08:00
amba
ata libata: fix NULL sdev dereference race in atapi_qc_complete() 2010-12-09 13:32:59 -08:00
atm ATM: iphase, remove sleep-inside-atomic 2010-10-11 11:05:42 -07:00
auxdisplay
base
block xen: Provide a variant of __RING_SIZE() that is an integer constant expression 2011-01-07 13:58:31 -08:00
bluetooth bluetooth: Fix missing NULL check 2010-11-22 11:03:01 -08:00
cdrom
char RAMOOPS: Don't overflow over non-allocated regions 2011-01-07 13:58:42 -08:00
clocksource
connector
cpufreq
cpuidle cpuidle: Fix typos 2010-09-28 23:30:38 -04:00
crypto crypto: padlock - Fix AES-CBC handling on odd-block-sized input 2010-12-09 13:33:31 -08:00
dca
dio
dma ioat2: fix performance regression 2010-10-13 15:43:10 -07:00
edac amd64_edac: Fix interleaving check 2011-01-07 13:58:17 -08:00
eisa
firewire firewire: ohci: fix regression with Agere FW643 rev 06, disable MSI 2011-01-07 13:58:15 -08:00
firmware
gpio cs5535-gpio: handle GPIO regs where higher (clear) bits are set 2011-01-07 13:58:40 -08:00
gpu drm/i915/dp: Fix I2C/EDID handling with active DisplayPort to DVI converter 2011-01-07 13:58:45 -08:00
hid HID: Fix for problems with eGalax/DWAV multi-touch-screen 2010-12-09 13:32:42 -08:00
hwmon hwmon: (adm1026) Fix setting fan_div 2011-01-07 13:58:17 -08:00
i2c i2c-pca-platform: Change device name of request_irq 2010-12-09 13:32:14 -08:00
ide
idle intel_idle: do not use the LAPIC timer for ATOM C2 2010-11-22 11:03:03 -08:00
ieee1394
ieee802154
infiniband IB/uverbs: Handle large number of entries in poll CQ 2011-01-07 13:58:19 -08:00
input Input: synaptics - fix handling of 2-button ClickPads 2011-01-07 13:58:35 -08:00
isdn isdn/gigaset: bas_gigaset locking fix 2010-12-09 13:32:14 -08:00
leds leds: fix bug with reading NAS SS4200 dmi code 2010-12-09 13:33:21 -08:00
lguest
macintosh
mca
md md: protect against NULL reference when waiting to start a raid10. 2011-01-07 13:58:33 -08:00
media msp3400: fix mute audio regression 2010-12-09 13:33:33 -08:00
memstick
message
mfd mfd: Supply IRQ base for WM832x devices 2011-01-07 13:58:44 -08:00
misc sgi-xpc: XPC fails to discover partitions with all nasids above 128 2010-12-09 13:32:36 -08:00
mmc mmc: Fix re-probing with PM_POST_RESTORE notification 2011-01-07 13:58:41 -08:00
mtd mxc_nand: do not depend on disabling the irq in the interrupt handler 2010-10-18 13:09:05 -07:00
net p54usb: New USB ID for Gemtek WUBI-100GW 2011-01-07 13:58:37 -08:00
nubus
of
oprofile oprofile: Fix the hang while taking the cpu offline 2010-12-09 13:32:33 -08:00
parisc
parport
pci x86, vt-d: Quirk for masking vtd spec errors to platform error handling logic 2011-01-07 13:58:34 -08:00
pcmcia ARM: 6456/1: Fix for building DEBUG with sa11xx_base.c as a module. 2010-12-09 13:33:25 -08:00
platform wmi: use memcmp instead of strncmp to compare GUIDs 2010-12-09 13:33:26 -08:00
pnp PNPACPI: cope with invalid device IDs 2010-12-09 13:33:13 -08:00
power olpc_battery: Fix endian neutral breakage for s16 values 2010-12-09 13:32:30 -08:00
pps
ps3
rapidio
regulator Merge branch 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging 2010-10-07 13:44:30 -07:00
rtc rtc: rs5c372: fix buffer size 2011-01-07 13:58:42 -08:00
s390 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2010-09-28 12:01:26 -07:00
sbus
scsi qla2xxx: Populate Command Type 6 LUN field properly. 2011-01-07 13:58:20 -08:00
serial serial: mfd: adjust the baud rate setting 2010-12-09 13:33:22 -08:00
sfi
sh
sn
spi of/spi: Fix OF-style driver binding of spi devices 2010-10-02 21:28:29 -06:00
ssb ssb: b43-pci-bridge: Add new vendor for BCM4318 2010-12-09 13:32:36 -08:00
staging Staging: batman-adv: ensure that eth_type_trans gets linear memory 2010-12-09 13:33:25 -08:00
tc
telephony
thermal
uio
usb xhci: Fix issue with port array setup and buggy hosts. 2011-01-07 13:58:37 -08:00
uwb
vhost vhost: fix log ctx signalling 2010-09-22 16:21:33 +02:00
video backlight: grab ops_lock before testing bd->ops 2010-12-09 13:33:16 -08:00
virtio
vlynq
w1
watchdog watchdog: Fix null pointer dereference while accessing rdc321x platform_data 2011-01-07 13:58:43 -08:00
xen xen: ensure that all event channels start off bound to VCPU 0 2010-12-09 13:32:37 -08:00
zorro
Kconfig
Makefile