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
Unified · Split
| @@ -306,7 +306,7 @@ void vmw_bo_pin(struct ttm_buffer_object *bo, bool pin) · 305 unmodified lines | |||
| 306 | 306 | ||
| 307 | BUG_ON(!atomic_read(&bo->reserved)); | 307 | BUG_ON(!atomic_read(&bo->reserved)); |
| 308 | BUG_ON(old_mem_type != TTM_PL_VRAM && | 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 | pl_flags = TTM_PL_FLAG_VRAM | VMW_PL_FLAG_GMR | TTM_PL_FLAG_CACHED; | 311 | pl_flags = TTM_PL_FLAG_VRAM | VMW_PL_FLAG_GMR | TTM_PL_FLAG_CACHED; |
| 312 | if (pin) | 312 | if (pin) |
| @@ -1098,6 +1098,11 @@ static void vmw_pm_complete(struct device *kdev) · 1097 unmodified lines | |||
| 1098 | struct drm_device *dev = pci_get_drvdata(pdev); | 1098 | struct drm_device *dev = pci_get_drvdata(pdev); |
| 1099 | struct vmw_private *dev_priv = vmw_priv(dev); | 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 | * Reclaim 3d reference held by fbdev and potentially | 1107 | * Reclaim 3d reference held by fbdev and potentially |
| 1103 | * start fifo. | 1108 | * start fifo. |