acpi_video: Intel video is not always i915
Stop it poking at random registers on the i740 cards that may be out there still. As per Matthew's feedback remove the conditional checks and never enable the opregion handling unless an appropriate driver has been loaded. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
This commit is contained in:
parent
cfb46f433a
commit
c6996bdd85
1 changed files with 15 additions and 5 deletions
|
@ -1743,10 +1743,18 @@ static int acpi_video_bus_remove(struct acpi_device *device, int type)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int __init is_i740(struct pci_dev *dev)
|
||||||
|
{
|
||||||
|
if (dev->device == 0x00D1)
|
||||||
|
return 1;
|
||||||
|
if (dev->device == 0x7000)
|
||||||
|
return 1;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static int __init intel_opregion_present(void)
|
static int __init intel_opregion_present(void)
|
||||||
{
|
{
|
||||||
int i915 = 0;
|
int opregion = 0;
|
||||||
#if defined(CONFIG_DRM_I915) || defined(CONFIG_DRM_I915_MODULE)
|
|
||||||
struct pci_dev *dev = NULL;
|
struct pci_dev *dev = NULL;
|
||||||
u32 address;
|
u32 address;
|
||||||
|
|
||||||
|
@ -1755,13 +1763,15 @@ static int __init intel_opregion_present(void)
|
||||||
continue;
|
continue;
|
||||||
if (dev->vendor != PCI_VENDOR_ID_INTEL)
|
if (dev->vendor != PCI_VENDOR_ID_INTEL)
|
||||||
continue;
|
continue;
|
||||||
|
/* We don't want to poke around undefined i740 registers */
|
||||||
|
if (is_i740(dev))
|
||||||
|
continue;
|
||||||
pci_read_config_dword(dev, 0xfc, &address);
|
pci_read_config_dword(dev, 0xfc, &address);
|
||||||
if (!address)
|
if (!address)
|
||||||
continue;
|
continue;
|
||||||
i915 = 1;
|
opregion = 1;
|
||||||
}
|
}
|
||||||
#endif
|
return opregion;
|
||||||
return i915;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int acpi_video_register(void)
|
int acpi_video_register(void)
|
||||||
|
|
Loading…
Add table
Reference in a new issue