diff options
author | Eric Anholt <eric@anholt.net> | 2008-12-05 13:06:05 -0800 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2009-03-06 14:49:31 -0800 |
commit | 73aa23d9150121a4e4b70a78cab910acd164abf5 (patch) | |
tree | bce77e1935bb300f8b10b1fc55d445cb08c2a121 /src | |
parent | abb213d933ac0d808fc10d4f8d88d7b8cef76346 (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')
-rw-r--r-- | src/i830_display.c | 5 | ||||
-rw-r--r-- | src/i830_dri.c | 11 |
2 files changed, 12 insertions, 4 deletions
diff --git a/src/i830_display.c b/src/i830_display.c index 3139d406..ca55906d 100644 --- a/src/i830_display.c +++ b/src/i830_display.c @@ -1085,6 +1085,11 @@ i830_crtc_commit (xf86CrtcPtr crtc) /* Reenable FB compression if possible */ if (i830_use_fb_compression(crtc)) i830_enable_fb_compression(crtc); + +#ifdef XF86DRI + /* Tell DRI1 the news about new output config */ + i830_update_dri_buffers(crtc->scrn); +#endif } void 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; |