i915: init bo mm at driver init only when modeset=1

To avoid bo memory manager being inited twice, it will be called
at firstopen when modeset is not enabled.
main
Hong Liu 2008-05-19 17:06:38 +08:00 committed by Jesse Barnes
parent e4f29968f4
commit e8320a716d
1 changed files with 10 additions and 9 deletions

View File

@ -353,16 +353,17 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
#endif #endif
#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)) { 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); ret = i915_load_modeset_init(dev);
if (ret < 0) { if (ret < 0) {
DRM_ERROR("failed to init modeset\n"); DRM_ERROR("failed to init modeset\n");