Skip to content

Commit 09b6110

Browse files
committed
drm: apple: dptx: Configure number of lanes for dptx-phy
Configuring the number of lanes is required for M2* desktop devices either if those were not initialized by m1n1 or after hotplug. Fixes: 07e4bfb ("drm: apple: dptx: Tidy up lane count handling") Signed-off-by: Janne Grunau <j@jannau.net>
1 parent c0bcdd7 commit 09b6110

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

drivers/gpu/drm/apple/dptxep.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,9 @@ static int dptxport_call_set_active_lane_count(struct apple_epic_service *servic
306306
case 0 ... 2:
307307
case 4:
308308
dptx->phy_ops.dp.lanes = lane_count;
309+
// Use dptx phy index > 3 as indication for dptx-phy or
310+
// lpdptx-phy and configure the number of lanes for those
311+
dptx->phy_ops.dp.set_lanes = (dcp->dptx_phy > 3);
309312
break;
310313
default:
311314
dev_err(dcp->dev, "set_active_lane_count: invalid lane count:%llu\n", lane_count);
@@ -314,6 +317,16 @@ static int dptxport_call_set_active_lane_count(struct apple_epic_service *servic
314317
break;
315318
}
316319

320+
if (dptx->phy_ops.dp.set_lanes) {
321+
if (dptx->atcphy) {
322+
ret = phy_configure(dptx->atcphy, &dptx->phy_ops);
323+
if (ret)
324+
return ret;
325+
}
326+
dptx->phy_ops.dp.set_lanes = 0;
327+
dptx->lane_count = lane_count;
328+
}
329+
317330
reply->retcode = cpu_to_le32(retcode);
318331
reply->lane_count = cpu_to_le64(lane_count);
319332

0 commit comments

Comments
 (0)