]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
drm/vmwgfx: Fix hibernation device reset
authorThomas Hellstrom <thellstrom@vmware.com>
Fri, 9 Nov 2012 09:05:57 +0000 (10:05 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 17 Nov 2012 21:19:05 +0000 (13:19 -0800)
commit 95e8f6a21996c4cc2c4574b231c6e858b749dce3 upstream.

The device would not reset properly when resuming from hibernation.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dmitry Torokhov <dtor@vmware.com>
Cc: linux-graphics-maintainer@vmware.com
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/vmwgfx/vmwgfx_drv.c

index ba2c35dbf10e3a7c90095d3fce4265dd3cfd14ff..4a04ae0584a1521064f822e4959ce8a7d6be0b23 100644 (file)
@@ -1099,6 +1099,11 @@ static void vmw_pm_complete(struct device *kdev)
        struct drm_device *dev = pci_get_drvdata(pdev);
        struct vmw_private *dev_priv = vmw_priv(dev);
 
+       mutex_lock(&dev_priv->hw_mutex);
+       vmw_write(dev_priv, SVGA_REG_ID, SVGA_ID_2);
+       (void) vmw_read(dev_priv, SVGA_REG_ID);
+       mutex_unlock(&dev_priv->hw_mutex);
+
        /**
         * Reclaim 3d reference held by fbdev and potentially
         * start fifo.