summaryrefslogtreecommitdiff
path: root/src/i830_dri.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2008-12-05 13:06:05 -0800
committerEric Anholt <eric@anholt.net>2009-03-06 14:49:31 -0800
commit73aa23d9150121a4e4b70a78cab910acd164abf5 (patch)
treebce77e1935bb300f8b10b1fc55d445cb08c2a121 /src/i830_dri.c
parentabb213d933ac0d808fc10d4f8d88d7b8cef76346 (diff)
DRI1: Update sarea (and other information) when CRTC configuration changes.
Bug #14423. Signed-off-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'src/i830_dri.c')
-rw-r--r--src/i830_dri.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/i830_dri.c b/src/i830_dri.c
index b7ebd920..f61c5640 100644
--- a/src/i830_dri.c
+++ b/src/i830_dri.c
@@ -1387,9 +1387,6 @@ i830_update_dri_mappings(ScrnInfoPtr pScrn, drmI830Sarea *sarea)
{
I830Ptr pI830 = I830PTR(pScrn);
- if (pI830->directRenderingType == DRI_DRI2)
- return TRUE;
-
if (!i830_do_addmap(pScrn, pI830->front_buffer, &sarea->front_handle,
&sarea->front_size, &sarea->front_offset)) {
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Disabling DRI.\n");
@@ -1447,9 +1444,15 @@ Bool
i830_update_dri_buffers(ScrnInfoPtr pScrn)
{
ScreenPtr pScreen = pScrn->pScreen;
- drmI830Sarea *sarea = (drmI830Sarea *) DRIGetSAREAPrivate(pScreen);
+ I830Ptr pI830 = I830PTR(pScrn);
+ drmI830Sarea *sarea;
Bool success;
+ if (pI830->directRenderingType == DRI_DRI2)
+ return TRUE;
+
+ sarea = (drmI830Sarea *) DRIGetSAREAPrivate(pScreen);
+
success = i830_update_dri_mappings(pScrn, sarea);
if (!success)
return FALSE;