Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 310530
b: refs/heads/master
c: c6996bd
h: refs/heads/master
v: v3
  • Loading branch information
Alan Cox authored and Len Brown committed Jun 1, 2012
1 parent 8df3495 commit 0391b4b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cfb46f433a4da97c31780e08a259fac2cb6bd61f
refs/heads/master: c6996bdd850fb53319918487d5f674203517fdc5
20 changes: 15 additions & 5 deletions trunk/drivers/acpi/video.c
Original file line number Diff line number Diff line change
Expand Up @@ -1743,10 +1743,18 @@ static int acpi_video_bus_remove(struct acpi_device *device, int type)
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)
{
int i915 = 0;
#if defined(CONFIG_DRM_I915) || defined(CONFIG_DRM_I915_MODULE)
int opregion = 0;
struct pci_dev *dev = NULL;
u32 address;

Expand All @@ -1755,13 +1763,15 @@ static int __init intel_opregion_present(void)
continue;
if (dev->vendor != PCI_VENDOR_ID_INTEL)
continue;
/* We don't want to poke around undefined i740 registers */
if (is_i740(dev))
continue;
pci_read_config_dword(dev, 0xfc, &address);
if (!address)
continue;
i915 = 1;
opregion = 1;
}
#endif
return i915;
return opregion;
}

int acpi_video_register(void)
Expand Down

0 comments on commit 0391b4b

Please sign in to comment.