From c34b7168f45e0ca0e68ec9bbbd6dcdd6056bd2d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= Date: Thu, 28 Jul 2022 11:20:49 +0200 Subject: [PATCH] radeon_hd: auxPin zero is valid, check also on eDP type EDID is correctly read. It can then be passed to the app_server. At least the app_server tries to set the native resolution. It doesn't really help to get further, because the ATOMBios code can't handle newer table versions (for instance 3.2). Change-Id: If68828bcfda447ecf7d4432ae2872bbdbc0704d5 Reviewed-on: https://review.haiku-os.org/c/haiku/+/5508 Tested-by: Commit checker robot Reviewed-by: Alex von Gluck IV --- src/add-ons/accelerants/radeon_hd/display.cpp | 8 ++++++-- src/add-ons/accelerants/radeon_hd/displayport.cpp | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/add-ons/accelerants/radeon_hd/display.cpp b/src/add-ons/accelerants/radeon_hd/display.cpp index c662112a82..3d83804aab 100644 --- a/src/add-ons/accelerants/radeon_hd/display.cpp +++ b/src/add-ons/accelerants/radeon_hd/display.cpp @@ -264,8 +264,10 @@ detect_displays() continue; } - if (gConnector[id]->type == VIDEO_CONNECTOR_DP) { - TRACE("%s: connector(%" B_PRIu32 "): Checking DP.\n", __func__, id); + if (gConnector[id]->type == VIDEO_CONNECTOR_DP + || gConnector[id]->type == VIDEO_CONNECTOR_EDP) { + TRACE("%s: connector(%" B_PRIu32 "): Checking %sDP.\n", __func__, id, + gConnector[id]->type == VIDEO_CONNECTOR_EDP ? "e" : ""); if (gConnector[id]->encoderExternal.valid == true) { // If this has a valid external encoder (dp bridge) @@ -284,6 +286,8 @@ detect_displays() if (gDisplay[displayIndex]->attached) { TRACE("%s: connector(%" B_PRIu32 "): Found DisplayPort EDID!\n", __func__, id); + gInfo->shared_info->has_edid = true; + edid_dump(edid); } } diff --git a/src/add-ons/accelerants/radeon_hd/displayport.cpp b/src/add-ons/accelerants/radeon_hd/displayport.cpp index 0efb4144a5..c7d59425eb 100644 --- a/src/add-ons/accelerants/radeon_hd/displayport.cpp +++ b/src/add-ons/accelerants/radeon_hd/displayport.cpp @@ -37,8 +37,8 @@ dp_aux_speak(uint32 connectorIndex, uint8* send, int sendBytes, uint8* recv, int recvBytes, uint8 delay, uint8* ack) { dp_info* dpInfo = &gConnector[connectorIndex]->dpInfo; - if (dpInfo->auxPin == 0) { - ERROR("%s: cannot speak on invalid GPIO pin!\n", __func__); + if (!dpInfo->valid) { + ERROR("%s: cannot speak on invalid dpInfo!\n", __func__); return B_IO_ERROR; }