diff options
author | Keith Whitwell <[email protected]> | 2003-05-02 17:32:24 +0000 |
---|---|---|
committer | Keith Whitwell <[email protected]> | 2003-05-02 17:32:24 +0000 |
commit | b975fcadfa3480c771c74d23b6a00a833712c98e (patch) | |
tree | 999f1d327e9ddf20dbb357f7e2057b7c702f1a7e | |
parent | f92291e02e6c0457dbf3fd44a14202b9e6517422 (diff) |
mprotect sarea when focus lost
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_context.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_context.c b/src/mesa/drivers/dri/radeon/radeon_context.c index 130cecc622f..7ea650d42c7 100644 --- a/src/mesa/drivers/dri/radeon/radeon_context.c +++ b/src/mesa/drivers/dri/radeon/radeon_context.c @@ -293,8 +293,9 @@ radeonCreateContext( const __GLcontextModes *glVisual, rmesa->sarea = (RADEONSAREAPrivPtr)((GLubyte *)sPriv->pSAREA + radeonScreen->sarea_priv_offset); - +#if _HAVE_FULL_GL rmesa->dma.buf0_address = rmesa->radeonScreen->buffers->list[0].address; +#endif for ( i = 0 ; i < radeonScreen->numTexHeaps ; i++ ) { make_empty_list( &rmesa->texture.objects[i] ); @@ -733,6 +734,7 @@ void radeonNotifyFocus( int have_focus ) if (have_focus && !rmesa->radeonScreen->buffers) { rmesa->radeonScreen->buffers = drmMapBufs( rmesa->dri.fd ); + rmesa->dma.buf0_address = rmesa->radeonScreen->buffers->list[0].address; /* Use mprotect rather than unmapping the framebuffer due to the * large number of derived pointers into the sarea which would @@ -748,7 +750,7 @@ void radeonNotifyFocus( int have_focus ) drmUnmapBufs( rmesa->radeonScreen->buffers ); rmesa->radeonScreen->buffers = 0; - mprotect(rmesa->dri.screen->pSAREA, SAREASize, PROT_NONE); + mprotect(rmesa->dri.screen->pSAREA, SAREASize, PROT_READ); assert(!rmesa->dma.current.buf); } |