[Intel-gfx] [PATCH 09/12] drm/i915: don't check intel_agp_enabled any more

Daniel Vetter daniel.vetter at ffwll.ch
Thu Jun 7 15:56:01 CEST 2012


We won't enabled agp unconditionally. Furthermore we do have
the right checks for agp support in place in our ->load
function.

The only thing this variable still does is enforce the module
load order we want (and I'm not even sure whether it succeeds
for that). Hence just use it in a harmless place somewhere.

Signed-off-by: Daniel Vetter <daniel.vetter at ffwll.ch>
---
 drivers/gpu/drm/i915/i915_dma.c |    6 +++++-
 drivers/gpu/drm/i915/i915_drv.c |    6 ------
 2 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index 29aee99..e21b3ff 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -1404,6 +1404,8 @@ i915_mtrr_setup(struct drm_i915_private *dev_priv, unsigned long base,
 	}
 }
 
+extern int intel_agp_enabled;
+
 /**
  * i915_driver_load - setup chip and create an initial config
  * @dev: DRM device
@@ -1451,7 +1453,9 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
 			return ret;
 
 		if (!dev->agp) {
-			DRM_ERROR("Cannot initialize the agpgart module.\n");
+			DRM_ERROR("Cannot initialize the agpgart module,"
+				  "intel_agp_enabled: %i.\n",
+				  intel_agp_enabled);
 			return -EINVAL;
 		}
 	}
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 818e3c7..1bf7597 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -119,7 +119,6 @@ MODULE_PARM_DESC(i915_enable_ppgtt,
 		"Enable PPGTT (default: true)");
 
 static struct drm_driver driver;
-extern int intel_agp_enabled;
 
 #define INTEL_VGA_DEVICE(id, info) {		\
 	.class = PCI_BASE_CLASS_DISPLAY << 16,	\
@@ -1091,11 +1090,6 @@ static struct pci_driver i915_pci_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;
 
 	/*
-- 
1.7.7.6




More information about the Intel-gfx mailing list