From 575f2f598a607c94a870dca58096429069b0c71f Mon Sep 17 00:00:00 2001 From: Jerome Duval Date: Thu, 4 Jul 2013 18:02:43 +0200 Subject: [PATCH] intel_gart: fixed bridge detection ... for bridges used with multiple displays. Should fix #9853 --- .../kernel/busses/agp_gart/intel_gart.cpp | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/src/add-ons/kernel/busses/agp_gart/intel_gart.cpp b/src/add-ons/kernel/busses/agp_gart/intel_gart.cpp index 5865b9edba..da940836ec 100644 --- a/src/add-ons/kernel/busses/agp_gart/intel_gart.cpp +++ b/src/add-ons/kernel/busses/agp_gart/intel_gart.cpp @@ -608,8 +608,6 @@ intel_init() if (get_module(B_PCI_MODULE_NAME, (module_info**)&sPCI) != B_OK) return B_ERROR; - bool found = false; - for (uint32 index = 0; sPCI->get_nth_pci_info(index, &sInfo.bridge) == B_OK; index++) { if (sInfo.bridge.vendor_id != VENDOR_ID_INTEL @@ -621,20 +619,16 @@ intel_init() / sizeof(kSupportedDevices[0]); i++) { if (sInfo.bridge.device_id == kSupportedDevices[i].bridge_id) { sInfo.type = kSupportedDevices[i].type; - found = has_display_device(sInfo.display, - kSupportedDevices[i].display_id); + if (has_display_device(sInfo.display, + kSupportedDevices[i].display_id)) { + TRACE("found intel bridge\n"); + return B_OK; + } } } - - if (found) - break; } - if (!found) - return ENODEV; - - TRACE("found intel bridge\n"); - return B_OK; + return ENODEV; }