drm/bridge: analogix_dp: Compliant with eDP receiver enhanced frame capability

On an eDP connection, the eDP sink must operate only in Enhanced Framing
Mode. The Source must send only Enhanced Framing on the main link, and
must only write a '0' to DPCD 00101h: LANE_COUNT_SET Bit 7:
ENHANCED_FRAME_EN bit.

Independent of method used, DP1.2-compliant eDP Receivers shall indicate
any eDP protocol differentiation method they support through the
Receiver Capability Field of DPCD (DPCD:0000Dh).

Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: I38e30426924bed531047a2d41b812d697d9f9838
This commit is contained in:
Wyon Bi
2021-04-13 11:10:38 +08:00
committed by Tao Huang
parent 9622f2d0f1
commit 5d2f3f959e

View File

@@ -274,6 +274,20 @@ static int analogix_dp_set_enhanced_mode(struct analogix_dp_device *dp)
if (ret < 0)
return ret;
if (!data) {
/*
* A setting of 1 indicates that this is an eDP device that
* uses only Enhanced Framing, independently of the setting by
* the source of ENHANCED_FRAME_EN
*/
ret = drm_dp_dpcd_readb(&dp->aux, DP_EDP_CONFIGURATION_CAP,
&data);
if (ret < 0)
return ret;
data = !!(data & DP_FRAMING_CHANGE_CAP);
}
analogix_dp_enable_enhanced_mode(dp, data);
dp->link_train.enhanced_framing = data;