diff options
-rw-r--r-- | drivers/gpu/drm/i915/i915_suspend.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_suspend.c b/drivers/gpu/drm/i915/i915_suspend.c index 60a94d2b5264..e8152d23d5b6 100644 --- a/drivers/gpu/drm/i915/i915_suspend.c +++ b/drivers/gpu/drm/i915/i915_suspend.c | |||
@@ -678,6 +678,7 @@ void i915_save_display(struct drm_device *dev) | |||
678 | } | 678 | } |
679 | 679 | ||
680 | /* VGA state */ | 680 | /* VGA state */ |
681 | mutex_lock(&dev->struct_mutex); | ||
681 | dev_priv->saveVGA0 = I915_READ(VGA0); | 682 | dev_priv->saveVGA0 = I915_READ(VGA0); |
682 | dev_priv->saveVGA1 = I915_READ(VGA1); | 683 | dev_priv->saveVGA1 = I915_READ(VGA1); |
683 | dev_priv->saveVGA_PD = I915_READ(VGA_PD); | 684 | dev_priv->saveVGA_PD = I915_READ(VGA_PD); |
@@ -687,6 +688,7 @@ void i915_save_display(struct drm_device *dev) | |||
687 | dev_priv->saveVGACNTRL = I915_READ(VGACNTRL); | 688 | dev_priv->saveVGACNTRL = I915_READ(VGACNTRL); |
688 | 689 | ||
689 | i915_save_vga(dev); | 690 | i915_save_vga(dev); |
691 | mutex_unlock(&dev->struct_mutex); | ||
690 | } | 692 | } |
691 | 693 | ||
692 | void i915_restore_display(struct drm_device *dev) | 694 | void i915_restore_display(struct drm_device *dev) |
@@ -780,6 +782,8 @@ void i915_restore_display(struct drm_device *dev) | |||
780 | I915_WRITE(CPU_VGACNTRL, dev_priv->saveVGACNTRL); | 782 | I915_WRITE(CPU_VGACNTRL, dev_priv->saveVGACNTRL); |
781 | else | 783 | else |
782 | I915_WRITE(VGACNTRL, dev_priv->saveVGACNTRL); | 784 | I915_WRITE(VGACNTRL, dev_priv->saveVGACNTRL); |
785 | |||
786 | mutex_lock(&dev->struct_mutex); | ||
783 | I915_WRITE(VGA0, dev_priv->saveVGA0); | 787 | I915_WRITE(VGA0, dev_priv->saveVGA0); |
784 | I915_WRITE(VGA1, dev_priv->saveVGA1); | 788 | I915_WRITE(VGA1, dev_priv->saveVGA1); |
785 | I915_WRITE(VGA_PD, dev_priv->saveVGA_PD); | 789 | I915_WRITE(VGA_PD, dev_priv->saveVGA_PD); |
@@ -787,6 +791,7 @@ void i915_restore_display(struct drm_device *dev) | |||
787 | udelay(150); | 791 | udelay(150); |
788 | 792 | ||
789 | i915_restore_vga(dev); | 793 | i915_restore_vga(dev); |
794 | mutex_unlock(&dev->struct_mutex); | ||
790 | } | 795 | } |
791 | 796 | ||
792 | int i915_save_state(struct drm_device *dev) | 797 | int i915_save_state(struct drm_device *dev) |