[haiku-commits] haiku: hrev45822 - src/add-ons/kernel/busses/agp_gart

  • From: korli@xxxxxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Thu, 4 Jul 2013 18:05:02 +0200 (CEST)

hrev45822 adds 1 changeset to branch 'master'
old head: 5b402aa2a39f2c247fec888b41980623d4a0f042
new head: 575f2f598a607c94a870dca58096429069b0c71f
overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=575f2f5+%5E5b402aa

----------------------------------------------------------------------------

575f2f5: intel_gart: fixed bridge detection
  
  ... for bridges used with multiple displays.
  Should fix #9853

                                   [ Jerome Duval <jerome.duval@xxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev45822
Commit:      575f2f598a607c94a870dca58096429069b0c71f
URL:         http://cgit.haiku-os.org/haiku/commit/?id=575f2f5
Author:      Jerome Duval <jerome.duval@xxxxxxxxx>
Date:        Thu Jul  4 16:02:43 2013 UTC

Ticket:      https://dev.haiku-os.org/ticket/9853

----------------------------------------------------------------------------

1 file changed, 6 insertions(+), 12 deletions(-)
src/add-ons/kernel/busses/agp_gart/intel_gart.cpp | 18 ++++++------------

----------------------------------------------------------------------------

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 5865b9e..da94083 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;
 }
 
 


Other related posts:

  • » [haiku-commits] haiku: hrev45822 - src/add-ons/kernel/busses/agp_gart - korli