diff options
author | Zhenyu Wang <zhenyuw@linux.intel.com> | 2010-02-23 14:05:24 +0800 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2010-02-26 13:23:20 -0800 |
commit | 1f7a6e372e9cb4d749f34c0738d832e6cadb4071 (patch) | |
tree | dd9d5a80528078424dd4b3385917c3e82ee374cd /drivers/char | |
parent | c619eed4b2ee1b2bde3e02464eb81632a08bb976 (diff) | |
download | kernel_samsung_tuna-1f7a6e372e9cb4d749f34c0738d832e6cadb4071.zip kernel_samsung_tuna-1f7a6e372e9cb4d749f34c0738d832e6cadb4071.tar.gz kernel_samsung_tuna-1f7a6e372e9cb4d749f34c0738d832e6cadb4071.tar.bz2 |
drm/i915: Add dependency on the intel agp module
See http://bugzilla.kernel.org/show_bug.cgi?id=15021
Make sure that the appropriate AGP module is loaded and probed before
trying to set up the DRM. The DRM already depends on the AGP core,
but in this case we know the specific AGP driver we need too, and can
help users avoid the trap of loading the AGP driver after the DRM
driver.
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/agp/intel-agp.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c index 918e484..c1c07a2 100644 --- a/drivers/char/agp/intel-agp.c +++ b/drivers/char/agp/intel-agp.c @@ -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 @@ -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); @@ -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) |