]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/3.0.52/drm-vmwgfx-fix-hibernation-device-reset.patch
Drop nfc patches from older trees
[thirdparty/kernel/stable-queue.git] / releases / 3.0.52 / drm-vmwgfx-fix-hibernation-device-reset.patch
CommitLineData
d4dbfc08
GKH
1From 95e8f6a21996c4cc2c4574b231c6e858b749dce3 Mon Sep 17 00:00:00 2001
2From: Thomas Hellstrom <thellstrom@vmware.com>
3Date: Fri, 9 Nov 2012 10:05:57 +0100
4Subject: drm/vmwgfx: Fix hibernation device reset
5
6From: Thomas Hellstrom <thellstrom@vmware.com>
7
8commit 95e8f6a21996c4cc2c4574b231c6e858b749dce3 upstream.
9
10The device would not reset properly when resuming from hibernation.
11
12Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
13Reviewed-by: Brian Paul <brianp@vmware.com>
14Reviewed-by: Dmitry Torokhov <dtor@vmware.com>
15Cc: linux-graphics-maintainer@vmware.com
16Signed-off-by: Dave Airlie <airlied@redhat.com>
17Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
18
19---
20 drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 5 +++++
21 1 file changed, 5 insertions(+)
22
23--- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
24+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
25@@ -858,6 +858,11 @@ static void vmw_pm_complete(struct devic
26 struct drm_device *dev = pci_get_drvdata(pdev);
27 struct vmw_private *dev_priv = vmw_priv(dev);
28
29+ mutex_lock(&dev_priv->hw_mutex);
30+ vmw_write(dev_priv, SVGA_REG_ID, SVGA_ID_2);
31+ (void) vmw_read(dev_priv, SVGA_REG_ID);
32+ mutex_unlock(&dev_priv->hw_mutex);
33+
34 /**
35 * Reclaim 3d reference held by fbdev and potentially
36 * start fifo.