diff options
Diffstat (limited to 'drivers/gpu/drm/drm_stub.c')
-rw-r--r-- | drivers/gpu/drm/drm_stub.c | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/drivers/gpu/drm/drm_stub.c b/drivers/gpu/drm/drm_stub.c index d59edc18301..0bf2c773c6c 100644 --- a/drivers/gpu/drm/drm_stub.c +++ b/drivers/gpu/drm/drm_stub.c | |||
@@ -269,25 +269,14 @@ int drm_fill_in_dev(struct drm_device *dev, | |||
269 | 269 | ||
270 | dev->driver = driver; | 270 | dev->driver = driver; |
271 | 271 | ||
272 | if (drm_core_has_AGP(dev)) { | 272 | if (dev->driver->bus->agp_init) { |
273 | if (drm_device_is_agp(dev)) | 273 | retcode = dev->driver->bus->agp_init(dev); |
274 | dev->agp = drm_agp_init(dev); | 274 | if (retcode) |
275 | if (drm_core_check_feature(dev, DRIVER_REQUIRE_AGP) | ||
276 | && (dev->agp == NULL)) { | ||
277 | DRM_ERROR("Cannot initialize the agpgart module.\n"); | ||
278 | retcode = -EINVAL; | ||
279 | goto error_out_unreg; | 275 | goto error_out_unreg; |
280 | } | ||
281 | if (drm_core_has_MTRR(dev)) { | ||
282 | if (dev->agp) | ||
283 | dev->agp->agp_mtrr = | ||
284 | mtrr_add(dev->agp->agp_info.aper_base, | ||
285 | dev->agp->agp_info.aper_size * | ||
286 | 1024 * 1024, MTRR_TYPE_WRCOMB, 1); | ||
287 | } | ||
288 | } | 276 | } |
289 | 277 | ||
290 | 278 | ||
279 | |||
291 | retcode = drm_ctxbitmap_init(dev); | 280 | retcode = drm_ctxbitmap_init(dev); |
292 | if (retcode) { | 281 | if (retcode) { |
293 | DRM_ERROR("Cannot allocate memory for context bitmap.\n"); | 282 | DRM_ERROR("Cannot allocate memory for context bitmap.\n"); |
@@ -425,7 +414,6 @@ int drm_put_minor(struct drm_minor **minor_p) | |||
425 | * | 414 | * |
426 | * Cleans up all DRM device, calling drm_lastclose(). | 415 | * Cleans up all DRM device, calling drm_lastclose(). |
427 | * | 416 | * |
428 | * \sa drm_init | ||
429 | */ | 417 | */ |
430 | void drm_put_dev(struct drm_device *dev) | 418 | void drm_put_dev(struct drm_device *dev) |
431 | { | 419 | { |