Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 185619
b: refs/heads/master
c: 1f7a6e3
h: refs/heads/master
i:
  185617: bf98cb3
  185615: ab1d67c
v: v3
  • Loading branch information
Zhenyu Wang authored and Eric Anholt committed Feb 26, 2010
1 parent 19a5c6e commit 8734748
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 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: c619eed4b2ee1b2bde3e02464eb81632a08bb976
refs/heads/master: 1f7a6e372e9cb4d749f34c0738d832e6cadb4071
10 changes: 8 additions & 2 deletions trunk/drivers/char/agp/intel-agp.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
#include <linux/agp_backend.h>
#include "agp.h"

int intel_agp_enabled;
EXPORT_SYMBOL(intel_agp_enabled);

/*
* If we have Intel graphics, we're not going to have anything other than
* an Intel IOMMU. So make the correct use of the PCI DMA API contingent
Expand Down Expand Up @@ -2473,7 +2476,7 @@ static int __devinit agp_intel_probe(struct pci_dev *pdev,
struct agp_bridge_data *bridge;
u8 cap_ptr = 0;
struct resource *r;
int i;
int i, err;

cap_ptr = pci_find_capability(pdev, PCI_CAP_ID_AGP);

Expand Down Expand Up @@ -2565,7 +2568,10 @@ static int __devinit agp_intel_probe(struct pci_dev *pdev,
}

pci_set_drvdata(pdev, bridge);
return agp_add_bridge(bridge);
err = agp_add_bridge(bridge);
if (!err)
intel_agp_enabled = 1;
return err;
}

static void __devexit agp_intel_remove(struct pci_dev *pdev)
Expand Down
6 changes: 6 additions & 0 deletions trunk/drivers/gpu/drm/i915/i915_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ unsigned int i915_lvds_downclock = 0;
module_param_named(lvds_downclock, i915_lvds_downclock, int, 0400);

static struct drm_driver driver;
extern int intel_agp_enabled;

#define INTEL_VGA_DEVICE(id, info) { \
.class = PCI_CLASS_DISPLAY_VGA << 8, \
Expand Down Expand Up @@ -558,6 +559,11 @@ static struct drm_driver driver = {

static int __init i915_init(void)
{
if (!intel_agp_enabled) {
DRM_ERROR("drm/i915 can't work without intel_agp module!\n");
return -ENODEV;
}

driver.num_ioctls = i915_max_ioctl;

i915_gem_shrinker_init();
Expand Down

0 comments on commit 8734748

Please sign in to comment.