linux/include/drm
Simon Farnsworth 1d002fa720 drm/dp: Use large transactions for I2C over AUX
Older DisplayPort to DVI-D Dual Link adapters designed by Bizlink have bugs
in their I2C over AUX implementation (fixed in newer revisions). They work
fine with Windows, but fail with Linux.

It turns out that they cannot keep an I2C transaction open unless the
previous read was 16 bytes; shorter reads can only be followed by a zero
byte transfer ending the I2C transaction.

Copy Windows's behaviour, and read 16 bytes at a time. If we get a short
reply, assume that there's a hardware bottleneck, and shrink our read size
to match. For this purpose, use the algorithm in the DisplayPort 1.2 spec,
in the hopes that it'll be closest to what Windows does.

Also provide an unsafe module parameter for testing smaller transfer sizes,
in case there are sinks out there that cannot work with Windows.

Note also that despite the previous comment in drm_dp_i2c_xfer, this speeds
up native DP EDID reads; Ville Syrjälä <ville.syrjala@linux.intel.com> found
the following changes in his testing:

Device under test:     old  -> with this patch
DP->DVI (OUI 001cf8):  40ms -> 35ms
DP->VGA (OUI 0022b9):  45ms -> 38ms
Zotac DP->2xHDMI:      25ms ->  4ms
Asus PB278 monitor:    22ms ->  3ms

A back of the envelope calculation shows that peak theoretical transfer rate
for 1 byte reads is around 60 kbit/s; with 16 byte reads, this increases to
around 500 kbit/s, which explains the increase in speed.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55228
Tested-by: Aidan Marks <aidanamarks@gmail.com> (v3)
Signed-off-by: Simon Farnsworth <simon.farnsworth@onelan.co.uk>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-03-11 22:04:56 +01:00
..
bridge drm/bridge: make bridge registration independent of drm flow 2015-01-28 08:45:40 +01:00
i2c
ttm drm/ttm: device address space != CPU address space 2015-03-05 09:04:39 +10:00
ati_pcigart.h
drm_agpsupport.h
drm_atomic_helper.h drm/atomic-helper: Rename commmit_post/pre_planes 2015-02-24 01:57:46 +01:00
drm_atomic.h drm/atomic: Hide drm.ko internal interfaces 2015-01-05 13:55:30 +01:00
drm_cache.h
drm_core.h
drm_crtc_helper.h drm/atomic-helpers: make mode_set hooks optional 2015-02-24 01:58:15 +01:00
drm_crtc.h drm: Check in setcrtc if the primary plane supports the fb pixel format 2015-03-10 09:59:36 +01:00
drm_displayid.h drm/displayid: add displayid defines and edid extension (v2) 2014-12-09 09:56:46 +10:00
drm_dp_helper.h drm/dp: Use large transactions for I2C over AUX 2015-03-11 22:04:56 +01:00
drm_dp_mst_helper.h drm/mst: cached EDID for logical ports (v2) 2014-12-09 09:56:47 +10:00
drm_edid.h drm/displayid: add displayid defines and edid extension (v2) 2014-12-09 09:56:46 +10:00
drm_encoder_slave.h
drm_fb_cma_helper.h
drm_fb_helper.h drm/fb-helper: Propagate errors from initial config failure 2015-01-21 14:57:03 +01:00
drm_fixed.h
drm_flip_work.h drm: flip-work: change drm_flip_work_init prototype 2014-11-15 09:29:14 +10:00
drm_gem_cma_helper.h drm/cma: Introduce drm_gem_cma_dumb_create_internal() 2014-11-13 13:27:17 +01:00
drm_gem.h Revert "drm/gem: Warn on illegal use of the dumb buffer interface v2" 2014-12-24 13:13:22 +10:00
drm_global.h
drm_hashtab.h
drm_legacy.h
drm_mem_util.h
drm_mipi_dsi.h drm/dsi: Do not require .owner field to be set 2014-11-13 13:56:17 +01:00
drm_mm.h drm/mm: Support 4 GiB and larger ranges 2015-03-05 09:01:37 +10:00
drm_modes.h drm: Fix the CRTC_STEREO_DOUBLE_ONLY define to include stero modes 2015-02-23 11:19:35 +01:00
drm_modeset_lock.h drm: Per-plane locking 2014-11-12 17:56:12 +10:00
drm_of.h
drm_os_linux.h
drm_panel.h
drm_pciids.h drm/radeon: remove invalid pci id 2014-10-28 10:44:36 -04:00
drm_plane_helper.h drm/plane-helper: unexport drm_primary_helper_create_plane 2015-03-10 09:59:35 +01:00
drm_rect.h
drm_sysfs.h
drm_vma_manager.h
drmP.h Merge tag 'drm-intel-next-2015-02-27' of git://anongit.freedesktop.org/drm-intel into drm-next 2015-03-09 19:41:15 +10:00
exynos_drm.h
gma_drm.h
i915_component.h drm/i915: add component support 2015-01-12 02:48:20 +01:00
i915_drm.h
i915_pciids.h Linux 4.0-rc3 2015-03-09 19:58:30 +10:00
intel-gtt.h