OSDN Git Service

i915: init bo mm at driver init only when modeset=1
authorHong Liu <hong.liu@intel.com>
Mon, 19 May 2008 09:06:38 +0000 (17:06 +0800)
committerJesse Barnes <jbarnes@virtuousgeek.org>
Thu, 22 May 2008 17:34:08 +0000 (10:34 -0700)
To avoid bo memory manager being inited twice, it will be called
at firstopen when modeset is not enabled.

shared-core/i915_init.c

index 98908a5..f5fe5ba 100644 (file)
@@ -353,16 +353,17 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
 #endif
 #endif
 
-       /*
-        * Initialize the memory manager for local and AGP space
-        */
-       ret = drm_bo_driver_init(dev);
-       if (ret) {
-               DRM_ERROR("fail to init memory manager for local & AGP space\n");
-               goto out_rmmap;
-       }
-
        if (drm_core_check_feature(dev, DRIVER_MODESET)) {
+               /*
+                * Initialize the memory manager for local and AGP space
+                */
+               ret = drm_bo_driver_init(dev);
+               if (ret) {
+                       DRM_ERROR("fail to init memory manager for "
+                                 "local & AGP space\n");
+                       goto out_rmmap;
+               }
+
                ret = i915_load_modeset_init(dev);
                if (ret < 0) {
                        DRM_ERROR("failed to init modeset\n");