radeon_hd: Add new connector id, guard from reading over bounds
Change-Id: Ifbabcf8217c617baffe85f24b985c18760e4da58 Reviewed-on: https://review.haiku-os.org/c/haiku/+/5527 Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
committed by
waddlesplash
parent
5de85b8f98
commit
8c46059114
@@ -746,6 +746,15 @@ connector_probe()
|
|||||||
|
|
||||||
radeon_shared_info &info = *gInfo->shared_info;
|
radeon_shared_info &info = *gInfo->shared_info;
|
||||||
|
|
||||||
|
// protect kConnectorConvert
|
||||||
|
if (connectorObjectID >= B_COUNT_OF(kConnectorConvert)) {
|
||||||
|
// This can happen when new atombios revisions introduce
|
||||||
|
// new CONNECTOR_OBJECT_ID_* defines (rare)
|
||||||
|
ERROR("%s: Path #%" B_PRId32 ": Unknown connector object ID!\n",
|
||||||
|
__func__, i);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
uint16 igpLaneInfo;
|
uint16 igpLaneInfo;
|
||||||
if ((info.chipsetFlags & CHIP_IGP) != 0) {
|
if ((info.chipsetFlags & CHIP_IGP) != 0) {
|
||||||
ERROR("%s: TODO: IGP chip connector detection\n", __func__);
|
ERROR("%s: TODO: IGP chip connector detection\n", __func__);
|
||||||
|
|||||||
@@ -43,20 +43,21 @@ const int kConnectorConvert[] = {
|
|||||||
VIDEO_CONNECTOR_VGA,
|
VIDEO_CONNECTOR_VGA,
|
||||||
VIDEO_CONNECTOR_COMPOSITE,
|
VIDEO_CONNECTOR_COMPOSITE,
|
||||||
VIDEO_CONNECTOR_SVIDEO,
|
VIDEO_CONNECTOR_SVIDEO,
|
||||||
VIDEO_CONNECTOR_UNKNOWN,
|
VIDEO_CONNECTOR_UNKNOWN, // YPbPr
|
||||||
VIDEO_CONNECTOR_UNKNOWN,
|
VIDEO_CONNECTOR_UNKNOWN, // D_CONNECTOR
|
||||||
VIDEO_CONNECTOR_9DIN,
|
VIDEO_CONNECTOR_9DIN,
|
||||||
VIDEO_CONNECTOR_UNKNOWN,
|
VIDEO_CONNECTOR_UNKNOWN, // SCART
|
||||||
VIDEO_CONNECTOR_HDMIA,
|
VIDEO_CONNECTOR_HDMIA,
|
||||||
VIDEO_CONNECTOR_HDMIB,
|
VIDEO_CONNECTOR_HDMIB,
|
||||||
VIDEO_CONNECTOR_LVDS,
|
VIDEO_CONNECTOR_LVDS,
|
||||||
VIDEO_CONNECTOR_9DIN,
|
VIDEO_CONNECTOR_9DIN, // 7-pin din
|
||||||
VIDEO_CONNECTOR_UNKNOWN,
|
VIDEO_CONNECTOR_UNKNOWN, // PCIe?
|
||||||
VIDEO_CONNECTOR_UNKNOWN,
|
VIDEO_CONNECTOR_UNKNOWN, // Crossfire
|
||||||
VIDEO_CONNECTOR_UNKNOWN,
|
VIDEO_CONNECTOR_UNKNOWN, // HARDCODE_DVI
|
||||||
VIDEO_CONNECTOR_DP,
|
VIDEO_CONNECTOR_DP,
|
||||||
VIDEO_CONNECTOR_EDP,
|
VIDEO_CONNECTOR_EDP,
|
||||||
VIDEO_CONNECTOR_UNKNOWN
|
VIDEO_CONNECTOR_UNKNOWN, // MXM
|
||||||
|
VIDEO_CONNECTOR_EDP, // LVDS eDP
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user