diff options
author | Maarten Lankhorst <maarten.lankhorst@canonical.com> | 2015-01-13 09:18:49 +0100 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2015-01-22 12:15:08 +1000 |
commit | 4dc63933ea518501fe9cfe6a8f8797d21095e76f (patch) | |
tree | eb98c163485dba66a0dac05e41188d3e14ce3bc4 /drivers/gpu/drm/nouveau/nouveau_fbcon.c | |
parent | 4d8bb03bced49526304592728002ebea54c7f224 (diff) | |
download | op-kernel-dev-4dc63933ea518501fe9cfe6a8f8797d21095e76f.zip op-kernel-dev-4dc63933ea518501fe9cfe6a8f8797d21095e76f.tar.gz |
drm/nouveau: dont switch vt on suspend
Restore the nv50 cursor bo on resume, and load the lut in
nv50_display_display_init so it gets set on resume too.
Tested on a fermi and a curie.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@ubuntu.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_fbcon.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_fbcon.c | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_fbcon.c b/drivers/gpu/drm/nouveau/nouveau_fbcon.c index 3ed12a8..d6e6958 100644 --- a/drivers/gpu/drm/nouveau/nouveau_fbcon.c +++ b/drivers/gpu/drm/nouveau/nouveau_fbcon.c @@ -370,6 +370,7 @@ nouveau_fbcon_create(struct drm_fb_helper *helper, ret = -ENOMEM; goto out_unlock; } + info->skip_vt_switch = 1; ret = fb_alloc_cmap(&info->cmap, 256, 0); if (ret) { @@ -487,30 +488,17 @@ static const struct drm_fb_helper_funcs nouveau_fbcon_helper_funcs = { .fb_probe = nouveau_fbcon_create, }; -static void -nouveau_fbcon_set_suspend_work(struct work_struct *work) -{ - struct nouveau_fbdev *fbcon = container_of(work, typeof(*fbcon), work); - console_lock(); - nouveau_fbcon_accel_restore(fbcon->dev); - nouveau_fbcon_zfill(fbcon->dev, fbcon); - fb_set_suspend(fbcon->helper.fbdev, FBINFO_STATE_RUNNING); - console_unlock(); -} - void nouveau_fbcon_set_suspend(struct drm_device *dev, int state) { struct nouveau_drm *drm = nouveau_drm(dev); if (drm->fbcon) { - if (state == FBINFO_STATE_RUNNING) { - schedule_work(&drm->fbcon->work); - return; - } - flush_work(&drm->fbcon->work); console_lock(); + if (state == FBINFO_STATE_RUNNING) + nouveau_fbcon_accel_restore(dev); fb_set_suspend(drm->fbcon->helper.fbdev, state); - nouveau_fbcon_accel_save_disable(dev); + if (state != FBINFO_STATE_RUNNING) + nouveau_fbcon_accel_save_disable(dev); console_unlock(); } } @@ -531,7 +519,6 @@ nouveau_fbcon_init(struct drm_device *dev) if (!fbcon) return -ENOMEM; - INIT_WORK(&fbcon->work, nouveau_fbcon_set_suspend_work); fbcon->dev = dev; drm->fbcon = fbcon; |