xf86-video-intel: 2 commits - src/i830_accel.c src/i830_driver.c src/i830_exa.c

Eric Anholt anholt at kemper.freedesktop.org
Mon Apr 27 11:19:38 PDT 2009


 src/i830_accel.c  |    2 +-
 src/i830_driver.c |    6 ++++++
 src/i830_exa.c    |    6 ++++--
 3 files changed, 11 insertions(+), 3 deletions(-)

New commits:
commit e55d943126cdd3eac7dfec5f40e794f89dbf038b
Author: Eric Anholt <eric at anholt.net>
Date:   Mon Apr 27 11:18:07 2009 -0700

    Don't try to do anything for I830Sync when VT switched.
    
    Fixes a crash with fake bufmgr and UXA.

diff --git a/src/i830_accel.c b/src/i830_accel.c
index 67f264c..cae36dc 100644
--- a/src/i830_accel.c
+++ b/src/i830_accel.c
@@ -177,7 +177,7 @@ I830Sync(ScrnInfoPtr pScrn)
    if (I810_DEBUG & (DEBUG_VERBOSE_ACCEL | DEBUG_VERBOSE_SYNC))
       ErrorF("I830Sync\n");
 
-   if (pI830->accel == ACCEL_NONE)
+   if (pI830->accel == ACCEL_NONE || !pScrn->vtSema || !pI830->batch_bo)
        return;
 
 #ifdef XF86DRI
commit 9748aa5594a8357754c06dd82108b131260b1a71
Author: Shuang He <shuang.he at intel.com>
Date:   Sat Apr 18 11:48:08 2009 +0800

    Free front buffer bo when X exit
    
    It's needed when KMS or DRI2 is enabled, or there will be memory leak.
    Also fixes a segfault at startup with fake bufmgr.
    
    Signed-off-by: Eric Anholt <eric at anholt.net>

diff --git a/src/i830_driver.c b/src/i830_driver.c
index 276132e..b4e1737 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -3694,6 +3694,12 @@ I830CloseScreen(int scrnIndex, ScreenPtr pScreen)
        pI830->uxa_driver = NULL;
    }
 #endif
+   if (pI830->front_buffer) {
+	i830_set_pixmap_bo(pScreen->GetScreenPixmap(pScreen), NULL);
+	i830_free_memory(pScrn, pI830->front_buffer);
+	pI830->front_buffer = NULL;
+   }
+
    xf86_cursors_fini (pScreen);
 
    i830_allocator_fini(pScrn);
diff --git a/src/i830_exa.c b/src/i830_exa.c
index 5199cef..9896d43 100644
--- a/src/i830_exa.c
+++ b/src/i830_exa.c
@@ -788,7 +788,8 @@ i830_set_pixmap_bo(PixmapPtr pixmap, dri_bo *bo)
 	dri_bo_unreference (old_bo);
 #if I830_USE_UXA
     if (i830->accel == ACCEL_UXA) {
-	dri_bo_reference(bo);
+	if (bo != NULL)
+	    dri_bo_reference(bo);
 	dixSetPrivate(&pixmap->devPrivates, &uxa_pixmap_index, bo);
     }
 #endif
@@ -797,7 +798,8 @@ i830_set_pixmap_bo(PixmapPtr pixmap, dri_bo *bo)
 	struct i830_exa_pixmap_priv *driver_priv =
 	    exaGetPixmapDriverPrivate(pixmap);
 	if (driver_priv) {
-	    dri_bo_reference(bo);
+	    if (bo != NULL)
+		dri_bo_reference(bo);
 	    driver_priv->bo = bo;
 	}
     }


More information about the xorg-commit mailing list