Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/i915/dp: increase i2c-over-aux retry interval on AUX DEFER

There is no clear cut rules or specs for the retry interval, as there
are many factors that affect overall response time. Increase the
interval, and even more so on branch devices which may have limited i2c
bit rates.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reference: https://bugs.freedesktop.org/show_bug.cgi?id=60263
Tested-by: Nicolas Suzor <nic@suzor.com>
Reviewed-by: Todd Previte <tprevite@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>

authored by

Jani Nikula and committed by
Daniel Vetter
8d16f258 e29bb4eb

+12 -1
+12 -1
drivers/gpu/drm/i915/intel_dp.c
··· 588 588 DRM_DEBUG_KMS("aux_ch native nack\n"); 589 589 return -EREMOTEIO; 590 590 case AUX_NATIVE_REPLY_DEFER: 591 - udelay(100); 591 + /* 592 + * For now, just give more slack to branch devices. We 593 + * could check the DPCD for I2C bit rate capabilities, 594 + * and if available, adjust the interval. We could also 595 + * be more careful with DP-to-Legacy adapters where a 596 + * long legacy cable may force very low I2C bit rates. 597 + */ 598 + if (intel_dp->dpcd[DP_DOWNSTREAMPORT_PRESENT] & 599 + DP_DWN_STRM_PORT_PRESENT) 600 + usleep_range(500, 600); 601 + else 602 + usleep_range(300, 400); 592 603 continue; 593 604 default: 594 605 DRM_ERROR("aux_ch invalid native reply 0x%02x\n",