ACPI / video: update the skip case for acpi_video_device_in_dod()
[linux-2.6-block.git] / drivers / acpi / video.c
index 185a57d137230bf46933d235f8e61291e6e15e00..1eaadff2e198037ac9b8567517e8f37e37f09d4a 100644 (file)
@@ -155,6 +155,7 @@ struct acpi_video_bus {
        u8 dos_setting;
        struct acpi_video_enumerated_device *attached_array;
        u8 attached_count;
+       u8 child_count;
        struct acpi_video_bus_cap cap;
        struct acpi_video_bus_flags flags;
        struct list_head video_device_list;
@@ -1159,8 +1160,12 @@ static bool acpi_video_device_in_dod(struct acpi_video_device *device)
        struct acpi_video_bus *video = device->video;
        int i;
 
-       /* If we have a broken _DOD, no need to test */
-       if (!video->attached_count)
+       /*
+        * If we have a broken _DOD or we have more than 8 output devices
+        * under the graphics controller node that we can't proper deal with
+        * in the operation region code currently, no need to test.
+        */
+       if (!video->attached_count || video->child_count > 8)
                return true;
 
        for (i = 0; i < video->attached_count; i++) {
@@ -1413,6 +1418,7 @@ acpi_video_bus_get_devices(struct acpi_video_bus *video,
                        dev_err(&dev->dev, "Can't attach device\n");
                        break;
                }
+               video->child_count++;
        }
        return status;
 }