Commit a1c2d60889d633ffecfa9f1f7ac0bdb474b7484e
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Pull drm fixes (again) from Dave Airlie: "dropped the ball on a vmware patch, so two more fixes for vmwgfx are here, one for hibernate issue, one for a BUG trigger." * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: drm/vmwgfx: Fix a case where the code would BUG when trying to pin GMR memory drm/vmwgfx: Fix hibernation device reset
Showing 2 changed files Side-by-side Diff
drivers/gpu/drm/vmwgfx/vmwgfx_dmabuf.c
... | ... | @@ -306,7 +306,7 @@ |
306 | 306 | |
307 | 307 | BUG_ON(!atomic_read(&bo->reserved)); |
308 | 308 | BUG_ON(old_mem_type != TTM_PL_VRAM && |
309 | - old_mem_type != VMW_PL_FLAG_GMR); | |
309 | + old_mem_type != VMW_PL_GMR); | |
310 | 310 | |
311 | 311 | pl_flags = TTM_PL_FLAG_VRAM | VMW_PL_FLAG_GMR | TTM_PL_FLAG_CACHED; |
312 | 312 | if (pin) |
drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
... | ... | @@ -1098,6 +1098,11 @@ |
1098 | 1098 | struct drm_device *dev = pci_get_drvdata(pdev); |
1099 | 1099 | struct vmw_private *dev_priv = vmw_priv(dev); |
1100 | 1100 | |
1101 | + mutex_lock(&dev_priv->hw_mutex); | |
1102 | + vmw_write(dev_priv, SVGA_REG_ID, SVGA_ID_2); | |
1103 | + (void) vmw_read(dev_priv, SVGA_REG_ID); | |
1104 | + mutex_unlock(&dev_priv->hw_mutex); | |
1105 | + | |
1101 | 1106 | /** |
1102 | 1107 | * Reclaim 3d reference held by fbdev and potentially |
1103 | 1108 | * start fifo. |