diff options
-rw-r--r-- | drivers/acpi/video.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index 66e8f7333e9b..609262dc1258 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c | |||
@@ -1743,10 +1743,18 @@ static int acpi_video_bus_remove(struct acpi_device *device, int type) | |||
1743 | return 0; | 1743 | return 0; |
1744 | } | 1744 | } |
1745 | 1745 | ||
1746 | static int __init is_i740(struct pci_dev *dev) | ||
1747 | { | ||
1748 | if (dev->device == 0x00D1) | ||
1749 | return 1; | ||
1750 | if (dev->device == 0x7000) | ||
1751 | return 1; | ||
1752 | return 0; | ||
1753 | } | ||
1754 | |||
1746 | static int __init intel_opregion_present(void) | 1755 | static int __init intel_opregion_present(void) |
1747 | { | 1756 | { |
1748 | int i915 = 0; | 1757 | int opregion = 0; |
1749 | #if defined(CONFIG_DRM_I915) || defined(CONFIG_DRM_I915_MODULE) | ||
1750 | struct pci_dev *dev = NULL; | 1758 | struct pci_dev *dev = NULL; |
1751 | u32 address; | 1759 | u32 address; |
1752 | 1760 | ||
@@ -1755,13 +1763,15 @@ static int __init intel_opregion_present(void) | |||
1755 | continue; | 1763 | continue; |
1756 | if (dev->vendor != PCI_VENDOR_ID_INTEL) | 1764 | if (dev->vendor != PCI_VENDOR_ID_INTEL) |
1757 | continue; | 1765 | continue; |
1766 | /* We don't want to poke around undefined i740 registers */ | ||
1767 | if (is_i740(dev)) | ||
1768 | continue; | ||
1758 | pci_read_config_dword(dev, 0xfc, &address); | 1769 | pci_read_config_dword(dev, 0xfc, &address); |
1759 | if (!address) | 1770 | if (!address) |
1760 | continue; | 1771 | continue; |
1761 | i915 = 1; | 1772 | opregion = 1; |
1762 | } | 1773 | } |
1763 | #endif | 1774 | return opregion; |
1764 | return i915; | ||
1765 | } | 1775 | } |
1766 | 1776 | ||
1767 | int acpi_video_register(void) | 1777 | int acpi_video_register(void) |