xf86-video-intel: 2 commits - src/sna/sna_accel.c src/sna/sna_driver.c src/sna/sna.h

Chris Wilson ickle at kemper.freedesktop.org
Fri Mar 1 01:18:39 PST 2013


 src/sna/sna.h        |    8 ++++----
 src/sna/sna_accel.c  |    9 +++++++++
 src/sna/sna_driver.c |    2 +-
 3 files changed, 14 insertions(+), 5 deletions(-)

New commits:
commit 4174c7bb14ea3428d86dc327950e76d0589e0cc4
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Fri Mar 1 09:21:03 2013 +0000

    sna: Use depth-15 rather than depth-16 for reduced bw devices
    
    Keeping the number of bits identical between the RGB channels helps
    prevent discoloration.
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/sna_driver.c b/src/sna/sna_driver.c
index 5d7a1a2..bc1daef 100644
--- a/src/sna/sna_driver.c
+++ b/src/sna/sna_driver.c
@@ -512,7 +512,7 @@ static Bool sna_pre_init(ScrnInfoPtr scrn, int flags)
 
 	flags24 = Support32bppFb | PreferConvert24to32 | SupportConvert24to32;
 
-	preferred_depth = sna->info->gen < 040 ? 16 : 24;
+	preferred_depth = sna->info->gen < 040 ? 15 : 24;
 	if (!xf86SetDepthBpp(scrn, preferred_depth, 0, 0, flags24))
 		return FALSE;
 
commit e05d2e481434084291503efdb84c944a560d8c29
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Fri Mar 1 09:08:19 2013 +0000

    sna: Track number of pixmaps allocated whilst counting bo leaks
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/sna.h b/src/sna/sna.h
index f259e2b..7dc838c 100644
--- a/src/sna/sna.h
+++ b/src/sna/sna.h
@@ -296,10 +296,10 @@ struct sna {
 
 #if DEBUG_MEMORY
 	struct {
-	       int shadow_pixels_allocs;
-	       int cpu_bo_allocs;
-	       size_t shadow_pixels_bytes;
-	       size_t cpu_bo_bytes;
+		int pixmap_allocs;
+		int cpu_bo_allocs;
+		size_t shadow_pixels_bytes;
+		size_t cpu_bo_bytes;
 	} debug_memory;
 #endif
 };
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index bacd431..fd2337f 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -760,6 +760,9 @@ create_pixmap(struct sna *sna, ScreenPtr screen,
 #endif
 
 	pixmap->usage_hint = usage_hint;
+#if DEBUG_MEMORY
+	sna->debug_memory.pixmap_allocs++;
+#endif
 
 	DBG(("%s: serial=%ld, usage=%d, %dx%d\n",
 	     __FUNCTION__,
@@ -1313,6 +1316,10 @@ static Bool sna_destroy_pixmap(PixmapPtr pixmap)
 	if (--pixmap->refcnt)
 		return TRUE;
 
+#if DEBUG_MEMORY
+	to_sna_from_pixmap(pixmap)->debug_memory.pixmap_allocs--;
+#endif
+
 	priv = sna_pixmap(pixmap);
 	DBG(("%s: pixmap=%ld, attached?=%d\n",
 	     __FUNCTION__, pixmap->drawable.serialNumber, priv != NULL));
@@ -14021,6 +14028,8 @@ static bool sna_accel_do_debug_memory(struct sna *sna)
 
 static void sna_accel_debug_memory(struct sna *sna)
 {
+	ErrorF("Allocated pixmaps: %d\n",
+	       sna->debug_memory.pixmap_allocs);
 	ErrorF("Allocated bo: %d, %ld bytes\n",
 	       sna->kgem.debug_memory.bo_allocs,
 	       (long)sna->kgem.debug_memory.bo_bytes);


More information about the xorg-commit mailing list