aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/gma500/psb_drv.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/gma500/psb_drv.c')
-rw-r--r--drivers/gpu/drm/gma500/psb_drv.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/gpu/drm/gma500/psb_drv.c b/drivers/gpu/drm/gma500/psb_drv.c
index dd1fbfa7e467..111e3df9c5de 100644
--- a/drivers/gpu/drm/gma500/psb_drv.c
+++ b/drivers/gpu/drm/gma500/psb_drv.c
@@ -149,6 +149,16 @@ static struct drm_ioctl_desc psb_ioctls[] = {
149 149
150static void psb_lastclose(struct drm_device *dev) 150static void psb_lastclose(struct drm_device *dev)
151{ 151{
152 int ret;
153 struct drm_psb_private *dev_priv = dev->dev_private;
154 struct psb_fbdev *fbdev = dev_priv->fbdev;
155
156 drm_modeset_lock_all(dev);
157 ret = drm_fb_helper_restore_fbdev_mode(&fbdev->psb_fb_helper);
158 if (ret)
159 DRM_DEBUG("failed to restore crtc mode\n");
160 drm_modeset_unlock_all(dev);
161
152 return; 162 return;
153} 163}
154 164
@@ -476,7 +486,7 @@ static int psb_mode_operation_ioctl(struct drm_device *dev, void *data,
476 case PSB_MODE_OPERATION_MODE_VALID: 486 case PSB_MODE_OPERATION_MODE_VALID:
477 umode = &arg->mode; 487 umode = &arg->mode;
478 488
479 mutex_lock(&dev->mode_config.mutex); 489 drm_modeset_lock_all(dev);
480 490
481 obj = drm_mode_object_find(dev, obj_id, 491 obj = drm_mode_object_find(dev, obj_id,
482 DRM_MODE_OBJECT_CONNECTOR); 492 DRM_MODE_OBJECT_CONNECTOR);
@@ -525,7 +535,7 @@ static int psb_mode_operation_ioctl(struct drm_device *dev, void *data,
525 if (mode) 535 if (mode)
526 drm_mode_destroy(dev, mode); 536 drm_mode_destroy(dev, mode);
527mode_op_out: 537mode_op_out:
528 mutex_unlock(&dev->mode_config.mutex); 538 drm_modeset_unlock_all(dev);
529 return ret; 539 return ret;
530 540
531 default: 541 default: