xf86-video-intel: src/drmmode_display.c src/i830_display.c

Jesse Barnes jbarnes at kemper.freedesktop.org
Thu Jul 2 13:08:29 PDT 2009


 src/drmmode_display.c |    4 +++-
 src/i830_display.c    |    4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)

New commits:
commit c1755599db1d9a20954b84ccc07afd892bb6ac9e
Author: Jesse Barnes <jbarnes at virtuousgeek.org>
Date:   Thu Jul 2 13:04:51 2009 -0700

    Clear the bo on the rotate scratch pixmap
    
    Since the scratch pixmap header will be re-used after allocation, we
    need to clear its bo attachment when we stop using it, otherwise a later
    user will use a bogus bo.
    
    Reviewed-by: Keith Packard <keithp at keithp.com>
    Signed-off-by: Jesse Barnes <jbarnes at virtuousgeek.org>

diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index d5904ad..e9296dc 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -382,8 +382,10 @@ drmmode_crtc_shadow_destroy(xf86CrtcPtr crtc, PixmapPtr rotate_pixmap, void *dat
 	drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
 	drmmode_ptr drmmode = drmmode_crtc->drmmode;
 
-	if (rotate_pixmap)
+	if (rotate_pixmap) {
+		i830_set_pixmap_bo(rotate_pixmap, NULL);
 		FreeScratchPixmapHeader(rotate_pixmap);
+	}
 
 
 	if (data) {
diff --git a/src/i830_display.c b/src/i830_display.c
index 26874c5..59ededc 100644
--- a/src/i830_display.c
+++ b/src/i830_display.c
@@ -1966,8 +1966,10 @@ i830_crtc_shadow_destroy(xf86CrtcPtr crtc, PixmapPtr rotate_pixmap, void *data)
     ScrnInfoPtr pScrn = crtc->scrn;
     I830CrtcPrivatePtr intel_crtc = crtc->driver_private;
 
-    if (rotate_pixmap)
+    if (rotate_pixmap) {
+	i830_set_pixmap_bo(rotate_pixmap, NULL);
 	FreeScratchPixmapHeader(rotate_pixmap);
+    }
 
     if (data) {
 	/* Be sure to sync acceleration before the memory gets unbound. */


More information about the xorg-commit mailing list