Skip to contentSkip to conversation

drm/dp: allow dual-link clock for 30-inch Apple Cinema HD

RFC PATCH New Petter Skjelsbæk 2 participants 2 messages Nov 22

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 drm/dp: allow dual-link clock for 30-inch Apple Cinema HD

The 30-inch Apple Cinema HD Display (APP 0x9221) advertises its native 2560x1600 mode at 59.86 Hz with a 268 MHz pixel clock. Its EDID also identifies the digital interface as DVI Dual Link High Resolution.

When connected using Apple's active Mini DisplayPort to Dual-Link DVI adapter, the adapter is detected as a DisplayPort branch with a DVI downstream port. It does not provide detailed downstream capability information, so drm_dp_downstream_max_tmds_clock() falls back to 165 MHz.

This causes the native 268 MHz mode to be rejected, leaving only 1280x800 at 71 MHz available.

Allow a 300 MHz TMDS clock for this display so that its native 2560x1600 mode is exposed.

An earlier version of this workaround was tested successfully with an Intel Arc B580 using the xe driver and Apple's active Mini DisplayPort to Dual-Link DVI adapter on Linux 7.0.11 and 7.2.6. The revised capability check has not yet been runtime-tested.

This is intended as an RFC since the underlying limitation is the active dual-link DVI adapter, while this workaround identifies the attached display by EDID. A more generic way of identifying dual-link capable downstream DVI adapters may be preferable.

---
 drivers/gpu/drm/display/drm_dp_helper.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
drivers/gpu/drm/display/drm_dp_helper.c +8 -1
index e623ccb4c1d8..ec36fa88b0ca 100644
@@ -1388,8 +1388,15 @@ int drm_dp_downstream_max_tmds_clock(const u8 dpcd[DP_RECEIVER_CAP_SIZE],
 			return 300000;
 		return port_cap[1] * 2500;
 	case DP_DS_PORT_TYPE_DVI:
-		if ((dpcd[DP_DOWNSTREAMPORT_PRESENT] & DP_DETAILED_CAP_INFO_AVAILABLE) == 0)
+		if ((dpcd[DP_DOWNSTREAMPORT_PRESENT] &
+		     DP_DETAILED_CAP_INFO_AVAILABLE) == 0) {
+			if (drm_edid &&
+			    drm_edid_get_panel_id(drm_edid) ==
+			    drm_edid_encode_panel_id('A', 'P', 'P', 0x9221))
+				return 300000;
 			return 165000;
+		}
+
 		/* FIXME what to do about DVI dual link? */
 		return port_cap[1] * 2500;
 	default:
Signature · 1 line
2.43.0
#1 lore raw
Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Medium] drm/dp: drm_dp_downstream_max_tmds_clock() uses sink EDID for DFP limit --

Thank you for your contribution! Sashiko AI review found 1 potential issue to consider:
- [Medium] drm/dp: drm_dp_downstream_max_tmds_clock() uses sink EDID for DFP limit
--

commit 3f7cc9438aa51a2bb27f49e36ae50fec8c07ea94
Author: Petter Skjelsbæk <[email protected]>

drm/dp: allow dual-link clock for 30-inch Apple Cinema HD

This commit returns a 300 MHz maximum downstream TMDS clock in drm_dp_downstream_max_tmds_clock() when an Apple Cinema HD Display (APP 0x9221) is attached to a DVI downstream port without detailed capability information.

Quoted 7 lines
drivers/gpu/drm/display/drm_dp_helper.c +0 -0
index a2959db1d956e..09e82a6d7f6ab 100644
@@ -1388,8 +1388,15 @@ int drm_dp_downstream_max_tmds_clock(const u8 dpcd[DP_RECEIVER_CAP_SIZE],
 			return 300000;
 		return port_cap[1] * 2500;

drivers/gpu/drm/display/drm_dp_helper.c int drm_dp_downstream_max_tmds_clock(const u8 dpcd[DP_RECEIVER_CAP_SIZE], · line 1398

Quoted 10 lines
drivers/gpu/drm/display/drm_dp_helper.c +7 -1
 	case DP_DS_PORT_TYPE_DVI:
-		if ((dpcd[DP_DOWNSTREAMPORT_PRESENT] & DP_DETAILED_CAP_INFO_AVAILABLE) == 0)
+		if ((dpcd[DP_DOWNSTREAMPORT_PRESENT] &
+		     DP_DETAILED_CAP_INFO_AVAILABLE) == 0) {
+			if (drm_edid &&
+			    drm_edid_get_panel_id(drm_edid) ==
+			    drm_edid_encode_panel_id('A', 'P', 'P', 0x9221))
+				return 300000;
 			return 165000;
+		}

[Severity: Medium]
Should drm_dp_downstream_max_tmds_clock() derive the branch device's downstream port limit from the attached sink's EDID panel ID?

drm_dp_downstream_max_tmds_clock() reports the capability of the DP-to-DVI branch adapter (stored in intel_dp->dfp.max_tmds_clock by intel_dp_update_dfp()), not the monitor. If the APP 0x9221 display is connected through a single-link DP-to-DVI adapter that lacks DP_DETAILED_CAP_INFO_AVAILABLE, this returns 300 MHz and exposes the 268 MHz 2560x1600 native mode that the single-link adapter cannot drive, while any other dual-link DVI monitor on the Apple dual-link adapter remains capped at 165 MHz.

Could the quirk instead identify the branch adapter itself via its DPCD branch descriptor (DP_BRANCH_OUI / DP_BRANCH_ID)?

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1