diff options
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_fbcon.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_fbcon.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_fbcon.c b/drivers/gpu/drm/nouveau/nouveau_fbcon.c index ea879a2efef3..68cedd9194fe 100644 --- a/drivers/gpu/drm/nouveau/nouveau_fbcon.c +++ b/drivers/gpu/drm/nouveau/nouveau_fbcon.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include <linux/fb.h> | 36 | #include <linux/fb.h> |
37 | #include <linux/init.h> | 37 | #include <linux/init.h> |
38 | #include <linux/screen_info.h> | 38 | #include <linux/screen_info.h> |
39 | #include <linux/vga_switcheroo.h> | ||
39 | 40 | ||
40 | #include "drmP.h" | 41 | #include "drmP.h" |
41 | #include "drm.h" | 42 | #include "drm.h" |
@@ -370,6 +371,7 @@ nouveau_fbcon_create(struct drm_device *dev, uint32_t fb_width, | |||
370 | nvbo->bo.offset, nvbo); | 371 | nvbo->bo.offset, nvbo); |
371 | 372 | ||
372 | mutex_unlock(&dev->struct_mutex); | 373 | mutex_unlock(&dev->struct_mutex); |
374 | vga_switcheroo_client_fb_set(dev->pdev, info); | ||
373 | return 0; | 375 | return 0; |
374 | 376 | ||
375 | out_unref: | 377 | out_unref: |
@@ -401,10 +403,8 @@ nouveau_fbcon_remove(struct drm_device *dev, struct drm_framebuffer *fb) | |||
401 | 403 | ||
402 | unregister_framebuffer(info); | 404 | unregister_framebuffer(info); |
403 | nouveau_bo_unmap(nouveau_fb->nvbo); | 405 | nouveau_bo_unmap(nouveau_fb->nvbo); |
404 | mutex_lock(&dev->struct_mutex); | 406 | drm_gem_object_unreference_unlocked(nouveau_fb->nvbo->gem); |
405 | drm_gem_object_unreference(nouveau_fb->nvbo->gem); | ||
406 | nouveau_fb->nvbo = NULL; | 407 | nouveau_fb->nvbo = NULL; |
407 | mutex_unlock(&dev->struct_mutex); | ||
408 | if (par) | 408 | if (par) |
409 | drm_fb_helper_free(&par->helper); | 409 | drm_fb_helper_free(&par->helper); |
410 | framebuffer_release(info); | 410 | framebuffer_release(info); |