Revert "i915: restore only the mode of this driver on lastclose"
authorDave Airlie <airlied@redhat.com>
Tue, 12 Apr 2011 23:20:24 +0000 (09:20 +1000)
committerDave Airlie <airlied@redhat.com>
Tue, 12 Apr 2011 23:20:24 +0000 (09:20 +1000)
This reverts commit 0a0883c8433c743dad0a4d9ebe2717558f2c209e.

this was in my tree by accident, I meant to rebase it out and
didn't realise in time.

Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/i915/i915_dma.c
drivers/gpu/drm/i915/intel_drv.h
drivers/gpu/drm/i915/intel_fb.c

index 12876f2795d2b373d9cac4130ec0052b44db23e6..72730377a01b7cac5fec231c2fd93e5b81b01f99 100644 (file)
@@ -2207,7 +2207,7 @@ void i915_driver_lastclose(struct drm_device * dev)
        drm_i915_private_t *dev_priv = dev->dev_private;
 
        if (!dev_priv || drm_core_check_feature(dev, DRIVER_MODESET)) {
-               intel_fb_restore_mode(dev);
+               drm_fb_helper_restore();
                vga_switcheroo_process_delayed_switch();
                return;
        }
index 1d20712d527f1e5d38a192f59f2aa3c6493e5e53..f5b0d8306d8372142f8c649f815a170d348be99e 100644 (file)
@@ -338,5 +338,4 @@ extern int intel_overlay_attrs(struct drm_device *dev, void *data,
                               struct drm_file *file_priv);
 
 extern void intel_fb_output_poll_changed(struct drm_device *dev);
-extern void intel_fb_restore_mode(struct drm_device *dev);
 #endif /* __INTEL_DRV_H__ */
index 96a45c4e9a16b9fb0ab8ae104c21ecc6f8055150..512782728e5127aed5ea383efb7f4d79dd2b8cb7 100644 (file)
@@ -264,19 +264,3 @@ void intel_fb_output_poll_changed(struct drm_device *dev)
        drm_i915_private_t *dev_priv = dev->dev_private;
        drm_fb_helper_hotplug_event(&dev_priv->fbdev->helper);
 }
-
-void intel_fb_restore_mode(struct drm_device *dev)
-{
-       drm_i915_private_t *dev_priv = dev->dev_private;
-       int ret, i;
-
-       if (!dev_priv->fbdev)
-               return;
-
-       for (i = 0; i < dev_priv->fbdev->helper.crtc_count; i++) {
-               struct drm_mode_set *mode_set = &dev_priv->fbdev->helper.crtc_info[i].mode_set;
-               ret = drm_crtc_helper_set_config(mode_set);
-               if (ret)
-                       DRM_DEBUG("failed to restore crtc mode\n");
-       }
-}