]> err.no Git - linux-2.6/commitdiff
drm: call driver load function after initialising AGP
authorDave Airlie <airlied@linux.ie>
Thu, 22 Nov 2007 08:23:13 +0000 (18:23 +1000)
committerDave Airlie <airlied@redhat.com>
Thu, 7 Feb 2008 05:09:39 +0000 (15:09 +1000)
needed to intel chipset flushing

Signed-off-by: Dave Airlie <airlied@linux.ie>
drivers/char/drm/drm_stub.c

index 2ed7a5c67906bfaef4b1a613c6976e28318f1af6..def072df90281330effdd74d38d2411949970fe5 100644 (file)
@@ -98,10 +98,6 @@ static int drm_fill_in_dev(struct drm_device * dev, struct pci_dev *pdev,
 
        dev->driver = driver;
 
-       if (dev->driver->load)
-               if ((retcode = dev->driver->load(dev, ent->driver_data)))
-                       goto error_out_unreg;
-
        if (drm_core_has_AGP(dev)) {
                if (drm_device_is_agp(dev))
                        dev->agp = drm_agp_init(dev);
@@ -120,6 +116,10 @@ static int drm_fill_in_dev(struct drm_device * dev, struct pci_dev *pdev,
                }
        }
 
+       if (dev->driver->load)
+               if ((retcode = dev->driver->load(dev, ent->driver_data)))
+                       goto error_out_unreg;
+
        retcode = drm_ctxbitmap_init(dev);
        if (retcode) {
                DRM_ERROR("Cannot allocate memory for context bitmap.\n");