diff --git a/src/radeon_driver.c b/src/radeon_driver.c
index 1ae6018..1a3b74a 100644
--- a/src/radeon_driver.c
+++ b/src/radeon_driver.c
@@ -5590,8 +5590,11 @@ Bool RADEONEnterVT(int scrnIndex, int flags)
}
- if (info->drm_mm)
+ if (info->drm_mm) {
radeon_bind_all_memory(pScrn);
+ info->XInited3D = FALSE;
+ info->engineMode = EXA_ENGINEMODE_UNKNOWN;
+ }
radeon_update_dri_buffers(pScrn);
diff --git a/src/radeon_memory.c b/src/radeon_memory.c
index ccc3bb8..8a23ccd 100644
--- a/src/radeon_memory.c
+++ b/src/radeon_memory.c
@@ -21,6 +21,10 @@ radeon_bind_memory(ScrnInfoPtr pScrn, struct radeon_memory *mem)
int ret;
+ if (mem->pool == RADEON_POOL_VRAM)
+ pin.pin_domain = RADEON_GEM_DOMAIN_VRAM;
+ else
+ pin.pin_domain = RADEON_GEM_DOMAIN_GTT;
pin.handle = mem->kernel_bo_handle;
pin.alignment = mem->alignment;