Commit 0a0883c8 authored by Dave Airlie's avatar Dave Airlie

i915: restore only the mode of this driver on lastclose

This has always used a big hammer, but that hammer is probably
too big, I'm also not sure its necessary but at least this
should be safe.

Should fix: https://bugzilla.kernel.org/show_bug.cgi?id=23592Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 94c8a984
...@@ -2207,7 +2207,7 @@ void i915_driver_lastclose(struct drm_device * dev) ...@@ -2207,7 +2207,7 @@ void i915_driver_lastclose(struct drm_device * dev)
drm_i915_private_t *dev_priv = dev->dev_private; drm_i915_private_t *dev_priv = dev->dev_private;
if (!dev_priv || drm_core_check_feature(dev, DRIVER_MODESET)) { if (!dev_priv || drm_core_check_feature(dev, DRIVER_MODESET)) {
drm_fb_helper_restore(); intel_fb_restore_mode(dev);
vga_switcheroo_process_delayed_switch(); vga_switcheroo_process_delayed_switch();
return; return;
} }
......
...@@ -338,4 +338,5 @@ extern int intel_overlay_attrs(struct drm_device *dev, void *data, ...@@ -338,4 +338,5 @@ extern int intel_overlay_attrs(struct drm_device *dev, void *data,
struct drm_file *file_priv); struct drm_file *file_priv);
extern void intel_fb_output_poll_changed(struct drm_device *dev); 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__ */ #endif /* __INTEL_DRV_H__ */
...@@ -264,3 +264,19 @@ void intel_fb_output_poll_changed(struct drm_device *dev) ...@@ -264,3 +264,19 @@ void intel_fb_output_poll_changed(struct drm_device *dev)
drm_i915_private_t *dev_priv = dev->dev_private; drm_i915_private_t *dev_priv = dev->dev_private;
drm_fb_helper_hotplug_event(&dev_priv->fbdev->helper); 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");
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment