diff options
Diffstat (limited to 'drivers/gpu/drm/i915/i915_dma.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_dma.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c index b2ebf02e4f8a..59a2bf8592ec 100644 --- a/drivers/gpu/drm/i915/i915_dma.c +++ b/drivers/gpu/drm/i915/i915_dma.c | |||
@@ -1402,19 +1402,19 @@ static int i915_load_modeset_init(struct drm_device *dev, | |||
1402 | /* if we have > 1 VGA cards, then disable the radeon VGA resources */ | 1402 | /* if we have > 1 VGA cards, then disable the radeon VGA resources */ |
1403 | ret = vga_client_register(dev->pdev, dev, NULL, i915_vga_set_decode); | 1403 | ret = vga_client_register(dev->pdev, dev, NULL, i915_vga_set_decode); |
1404 | if (ret) | 1404 | if (ret) |
1405 | goto destroy_ringbuffer; | 1405 | goto cleanup_ringbuffer; |
1406 | 1406 | ||
1407 | ret = vga_switcheroo_register_client(dev->pdev, | 1407 | ret = vga_switcheroo_register_client(dev->pdev, |
1408 | i915_switcheroo_set_state, | 1408 | i915_switcheroo_set_state, |
1409 | i915_switcheroo_can_switch); | 1409 | i915_switcheroo_can_switch); |
1410 | if (ret) | 1410 | if (ret) |
1411 | goto destroy_ringbuffer; | 1411 | goto cleanup_vga_client; |
1412 | 1412 | ||
1413 | intel_modeset_init(dev); | 1413 | intel_modeset_init(dev); |
1414 | 1414 | ||
1415 | ret = drm_irq_install(dev); | 1415 | ret = drm_irq_install(dev); |
1416 | if (ret) | 1416 | if (ret) |
1417 | goto destroy_ringbuffer; | 1417 | goto cleanup_vga_switcheroo; |
1418 | 1418 | ||
1419 | /* Always safe in the mode setting case. */ | 1419 | /* Always safe in the mode setting case. */ |
1420 | /* FIXME: do pre/post-mode set stuff in core KMS code */ | 1420 | /* FIXME: do pre/post-mode set stuff in core KMS code */ |
@@ -1426,11 +1426,20 @@ static int i915_load_modeset_init(struct drm_device *dev, | |||
1426 | 1426 | ||
1427 | I915_WRITE(INSTPM, (1 << 5) | (1 << 21)); | 1427 | I915_WRITE(INSTPM, (1 << 5) | (1 << 21)); |
1428 | 1428 | ||
1429 | intel_fbdev_init(dev); | 1429 | ret = intel_fbdev_init(dev); |
1430 | if (ret) | ||
1431 | goto cleanup_irq; | ||
1432 | |||
1430 | drm_kms_helper_poll_init(dev); | 1433 | drm_kms_helper_poll_init(dev); |
1431 | return 0; | 1434 | return 0; |
1432 | 1435 | ||
1433 | destroy_ringbuffer: | 1436 | cleanup_irq: |
1437 | drm_irq_uninstall(dev); | ||
1438 | cleanup_vga_switcheroo: | ||
1439 | vga_switcheroo_unregister_client(dev->pdev); | ||
1440 | cleanup_vga_client: | ||
1441 | vga_client_register(dev->pdev, NULL, NULL, NULL); | ||
1442 | cleanup_ringbuffer: | ||
1434 | mutex_lock(&dev->struct_mutex); | 1443 | mutex_lock(&dev->struct_mutex); |
1435 | i915_gem_cleanup_ringbuffer(dev); | 1444 | i915_gem_cleanup_ringbuffer(dev); |
1436 | mutex_unlock(&dev->struct_mutex); | 1445 | mutex_unlock(&dev->struct_mutex); |