Commit d5818938 authored by Daniel Vetter's avatar Daniel Vetter

drm/i915: Remove DRIVER_MODESET checks from suspend/resume code

UMS is dead, yay!
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
Reviewed-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 17fa6463
...@@ -574,6 +574,7 @@ static int i915_drm_suspend(struct drm_device *dev) ...@@ -574,6 +574,7 @@ static int i915_drm_suspend(struct drm_device *dev)
struct drm_i915_private *dev_priv = dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
struct drm_crtc *crtc; struct drm_crtc *crtc;
pci_power_t opregion_target_state; pci_power_t opregion_target_state;
int error;
/* ignore lid events during suspend */ /* ignore lid events during suspend */
mutex_lock(&dev_priv->modeset_restore_lock); mutex_lock(&dev_priv->modeset_restore_lock);
...@@ -588,10 +589,6 @@ static int i915_drm_suspend(struct drm_device *dev) ...@@ -588,10 +589,6 @@ static int i915_drm_suspend(struct drm_device *dev)
pci_save_state(dev->pdev); pci_save_state(dev->pdev);
/* If KMS is active, we do the leavevt stuff here */
if (drm_core_check_feature(dev, DRIVER_MODESET)) {
int error;
error = i915_gem_suspend(dev); error = i915_gem_suspend(dev);
if (error) { if (error) {
dev_err(&dev->pdev->dev, dev_err(&dev->pdev->dev,
...@@ -618,7 +615,6 @@ static int i915_drm_suspend(struct drm_device *dev) ...@@ -618,7 +615,6 @@ static int i915_drm_suspend(struct drm_device *dev)
intel_suspend_encoders(dev_priv); intel_suspend_encoders(dev_priv);
intel_suspend_hw(dev); intel_suspend_hw(dev);
}
i915_gem_suspend_gtt_mappings(dev); i915_gem_suspend_gtt_mappings(dev);
...@@ -690,17 +686,13 @@ static int i915_drm_resume(struct drm_device *dev) ...@@ -690,17 +686,13 @@ static int i915_drm_resume(struct drm_device *dev)
{ {
struct drm_i915_private *dev_priv = dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
if (drm_core_check_feature(dev, DRIVER_MODESET)) {
mutex_lock(&dev->struct_mutex); mutex_lock(&dev->struct_mutex);
i915_gem_restore_gtt_mappings(dev); i915_gem_restore_gtt_mappings(dev);
mutex_unlock(&dev->struct_mutex); mutex_unlock(&dev->struct_mutex);
}
i915_restore_state(dev); i915_restore_state(dev);
intel_opregion_setup(dev); intel_opregion_setup(dev);
/* KMS EnterVT equivalent */
if (drm_core_check_feature(dev, DRIVER_MODESET)) {
intel_init_pch_refclk(dev); intel_init_pch_refclk(dev);
drm_mode_config_reset(dev); drm_mode_config_reset(dev);
...@@ -736,7 +728,6 @@ static int i915_drm_resume(struct drm_device *dev) ...@@ -736,7 +728,6 @@ static int i915_drm_resume(struct drm_device *dev)
intel_hpd_init(dev_priv); intel_hpd_init(dev_priv);
/* Config may have changed between suspend and resume */ /* Config may have changed between suspend and resume */
drm_helper_hpd_irq_event(dev); drm_helper_hpd_irq_event(dev);
}
intel_opregion_init(dev); intel_opregion_init(dev);
......
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