summaryrefslogtreecommitdiff
path: root/src/i830_driver.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/i830_driver.c')
-rw-r--r--src/i830_driver.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/i830_driver.c b/src/i830_driver.c
index f9ca77cf..12fc5241 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -7041,10 +7041,23 @@ IntelEmitInvarientState(ScrnInfoPtr pScrn)
{
I830Ptr pI830 = I830PTR(pScrn);
CARD32 ctx_addr;
+#ifdef XF86DRI
+ drmI830Sarea *sarea;
+#endif
if (pI830->noAccel)
return;
+#ifdef XF86DRI
+ if (pI830->directRenderingEnabled) {
+ sarea = DRIGetSAREAPrivate(pScrn->pScreen);
+
+ /* Mark that the X Server was the last holder of the context */
+ if (sarea)
+ sarea->ctxOwner = DRIGetContext(pScrn->pScreen);
+ }
+#endif
+
ctx_addr = pI830->ContextMem.Start;
/* Align to a 2k boundry */
ctx_addr = ((ctx_addr + 2048 - 1) / 2048) * 2048;