diff options
| -rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_fbcon.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_fbcon.c b/drivers/gpu/drm/nouveau/nouveau_fbcon.c index f7707849bb53..2b12d82aac15 100644 --- a/drivers/gpu/drm/nouveau/nouveau_fbcon.c +++ b/drivers/gpu/drm/nouveau/nouveau_fbcon.c | |||
| @@ -223,7 +223,7 @@ void | |||
| 223 | nouveau_fbcon_accel_save_disable(struct drm_device *dev) | 223 | nouveau_fbcon_accel_save_disable(struct drm_device *dev) |
| 224 | { | 224 | { |
| 225 | struct nouveau_drm *drm = nouveau_drm(dev); | 225 | struct nouveau_drm *drm = nouveau_drm(dev); |
| 226 | if (drm->fbcon) { | 226 | if (drm->fbcon && drm->fbcon->helper.fbdev) { |
| 227 | drm->fbcon->saved_flags = drm->fbcon->helper.fbdev->flags; | 227 | drm->fbcon->saved_flags = drm->fbcon->helper.fbdev->flags; |
| 228 | drm->fbcon->helper.fbdev->flags |= FBINFO_HWACCEL_DISABLED; | 228 | drm->fbcon->helper.fbdev->flags |= FBINFO_HWACCEL_DISABLED; |
| 229 | } | 229 | } |
| @@ -233,7 +233,7 @@ void | |||
| 233 | nouveau_fbcon_accel_restore(struct drm_device *dev) | 233 | nouveau_fbcon_accel_restore(struct drm_device *dev) |
| 234 | { | 234 | { |
| 235 | struct nouveau_drm *drm = nouveau_drm(dev); | 235 | struct nouveau_drm *drm = nouveau_drm(dev); |
| 236 | if (drm->fbcon) { | 236 | if (drm->fbcon && drm->fbcon->helper.fbdev) { |
| 237 | drm->fbcon->helper.fbdev->flags = drm->fbcon->saved_flags; | 237 | drm->fbcon->helper.fbdev->flags = drm->fbcon->saved_flags; |
| 238 | } | 238 | } |
| 239 | } | 239 | } |
| @@ -245,7 +245,8 @@ nouveau_fbcon_accel_fini(struct drm_device *dev) | |||
| 245 | struct nouveau_fbdev *fbcon = drm->fbcon; | 245 | struct nouveau_fbdev *fbcon = drm->fbcon; |
| 246 | if (fbcon && drm->channel) { | 246 | if (fbcon && drm->channel) { |
| 247 | console_lock(); | 247 | console_lock(); |
| 248 | fbcon->helper.fbdev->flags |= FBINFO_HWACCEL_DISABLED; | 248 | if (fbcon->helper.fbdev) |
| 249 | fbcon->helper.fbdev->flags |= FBINFO_HWACCEL_DISABLED; | ||
| 249 | console_unlock(); | 250 | console_unlock(); |
| 250 | nouveau_channel_idle(drm->channel); | 251 | nouveau_channel_idle(drm->channel); |
| 251 | nvif_object_fini(&fbcon->twod); | 252 | nvif_object_fini(&fbcon->twod); |
