radeon_hd: Add missing USB C connector type

* Solves a few "Unknown connector" errors on newer cards.
* It's just another physical name for DisplayPort

Change-Id: I37a6f1bb1db66279b305bdbce3c200612eac1130
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7042
Reviewed-by: Alex von Gluck IV <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
This commit is contained in:
Alexander von Gluck IV
2023-10-14 17:19:12 +00:00
committed by Alex von Gluck IV
parent 9ded6e6a33
commit 518e9cb9f2
5 changed files with 15 additions and 8 deletions
@@ -1,5 +1,5 @@
/* /*
* Copyright 2011, Haiku, Inc. All Rights Reserved. * Copyright 2011-2023, Haiku, Inc. All Rights Reserved.
* Distributed under the terms of the MIT License. * Distributed under the terms of the MIT License.
* *
* Authors: * Authors:
@@ -28,6 +28,7 @@
#define VIDEO_CONNECTOR_HDMIA 0x0C #define VIDEO_CONNECTOR_HDMIA 0x0C
#define VIDEO_CONNECTOR_HDMIB 0x0D #define VIDEO_CONNECTOR_HDMIB 0x0D
#define VIDEO_CONNECTOR_TV 0x0E #define VIDEO_CONNECTOR_TV 0x0E
#define VIDEO_CONNECTOR_USBC 0x0F
// Video encoder types // Video encoder types
@@ -1,5 +1,5 @@
/* /*
* Copyright 2011, Haiku, Inc. All Rights Reserved. * Copyright 2011-2023, Haiku, Inc. All Rights Reserved.
* Distributed under the terms of the MIT License. * Distributed under the terms of the MIT License.
* *
* Authors: * Authors:
@@ -45,6 +45,8 @@ get_connector_name(uint32 connector)
return "HDMI B"; return "HDMI B";
case VIDEO_CONNECTOR_TV: case VIDEO_CONNECTOR_TV:
return "TV"; return "TV";
case VIDEO_CONNECTOR_USBC:
return "USB C";
case VIDEO_CONNECTOR_UNKNOWN: case VIDEO_CONNECTOR_UNKNOWN:
return "Unknown"; return "Unknown";
} }
@@ -119,6 +119,7 @@
#define CONNECTOR_OBJECT_ID_eDP 0x14 #define CONNECTOR_OBJECT_ID_eDP 0x14
#define CONNECTOR_OBJECT_ID_MXM 0x15 #define CONNECTOR_OBJECT_ID_MXM 0x15
#define CONNECTOR_OBJECT_ID_LVDS_eDP 0x16 #define CONNECTOR_OBJECT_ID_LVDS_eDP 0x16
#define CONNECTOR_OBJECT_ID_USBC 0x17
/* deleted */ /* deleted */
@@ -990,9 +990,10 @@ connector_is_dp(uint32 connectorIndex)
{ {
connector_info* connector = gConnector[connectorIndex]; connector_info* connector = gConnector[connectorIndex];
// Traditional DisplayPort connector // Traditional DisplayPort connector, or DP over USBC
if (connector->type == VIDEO_CONNECTOR_DP if (connector->type == VIDEO_CONNECTOR_DP
|| connector->type == VIDEO_CONNECTOR_EDP) { || connector->type == VIDEO_CONNECTOR_EDP
|| connector->type == VIDEO_CONNECTOR_USBC) {
return true; return true;
} }
@@ -24,16 +24,17 @@ const int kConnectorConvertLegacy[] = {
VIDEO_CONNECTOR_SVIDEO, VIDEO_CONNECTOR_SVIDEO,
VIDEO_CONNECTOR_COMPOSITE, VIDEO_CONNECTOR_COMPOSITE,
VIDEO_CONNECTOR_LVDS, VIDEO_CONNECTOR_LVDS,
VIDEO_CONNECTOR_UNKNOWN, VIDEO_CONNECTOR_UNKNOWN, // DIGILink
VIDEO_CONNECTOR_UNKNOWN, VIDEO_CONNECTOR_UNKNOWN, // SCART
VIDEO_CONNECTOR_HDMIA, VIDEO_CONNECTOR_HDMIA,
VIDEO_CONNECTOR_HDMIB, VIDEO_CONNECTOR_HDMIB,
VIDEO_CONNECTOR_UNKNOWN, VIDEO_CONNECTOR_UNKNOWN,
VIDEO_CONNECTOR_UNKNOWN, VIDEO_CONNECTOR_UNKNOWN,
VIDEO_CONNECTOR_9DIN, VIDEO_CONNECTOR_9DIN, // CASE_1
VIDEO_CONNECTOR_DP VIDEO_CONNECTOR_DP,
}; };
// ObjectID.h CONNECTOR_OBJECT_ID_...
const int kConnectorConvert[] = { const int kConnectorConvert[] = {
VIDEO_CONNECTOR_UNKNOWN, VIDEO_CONNECTOR_UNKNOWN,
VIDEO_CONNECTOR_DVII, VIDEO_CONNECTOR_DVII,
@@ -58,6 +59,7 @@ const int kConnectorConvert[] = {
VIDEO_CONNECTOR_EDP, VIDEO_CONNECTOR_EDP,
VIDEO_CONNECTOR_UNKNOWN, // MXM VIDEO_CONNECTOR_UNKNOWN, // MXM
VIDEO_CONNECTOR_EDP, // LVDS eDP VIDEO_CONNECTOR_EDP, // LVDS eDP
VIDEO_CONNECTOR_USBC,
}; };