xf86-video-intel: 2 commits - src/intel_module.c src/sna/sna_dri.c

Chris Wilson ickle at kemper.freedesktop.org
Wed Feb 15 15:40:44 PST 2012


 src/intel_module.c |    6 ++----
 src/sna/sna_dri.c  |   16 ++++++++++++----
 2 files changed, 14 insertions(+), 8 deletions(-)

New commits:
commit 8050ced6204f5aca12e6c57f86308b6ad1b98209
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Wed Feb 15 17:01:18 2012 +0000

    sna/dri: Mark bo as reusable after completion of a flip-event
    
    After the flip chain is completed, any residual buffers are no longer in
    use and so available for reuse.
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/sna_dri.c b/src/sna/sna_dri.c
index c83d580..0689fc5 100644
--- a/src/sna/sna_dri.c
+++ b/src/sna/sna_dri.c
@@ -721,12 +721,18 @@ sna_dri_frame_event_info_free(struct sna_dri_frame_event *info)
 	_sna_dri_destroy_buffer(info->sna, info->front);
 	_sna_dri_destroy_buffer(info->sna, info->back);
 
-	if (info->old_front.bo)
+	if (info->old_front.bo) {
+		info->old_front.bo->reusable = true;
 		kgem_bo_destroy(&info->sna->kgem, info->old_front.bo);
-	if (info->next_front.bo)
+	}
+	if (info->next_front.bo) {
+		info->next_front.bo->reusable = true;
 		kgem_bo_destroy(&info->sna->kgem, info->next_front.bo);
-	if (info->cache.bo)
+	}
+	if (info->cache.bo) {
+		info->cache.bo->reusable = true;
 		kgem_bo_destroy(&info->sna->kgem, info->cache.bo);
+	}
 
 	free(info);
 }
commit fc046aabde76142fce130773d78d797d7d750ab7
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Wed Feb 15 16:08:23 2012 +0000

    sna/dri: Don't attempt to change tiling if it is a no-op
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/intel_module.c b/src/intel_module.c
index 6e2af57..2c0e5cc 100644
--- a/src/intel_module.c
+++ b/src/intel_module.c
@@ -280,10 +280,8 @@ static Bool has_kernel_mode_setting(struct pci_device *dev)
 		 dev->domain, dev->bus, dev->dev, dev->func);
 
 	ret = drmCheckModesettingSupported(id);
-	if (ret) {
-		if (xf86LoadKernelModule("i915"))
-			ret = drmCheckModesettingSupported(id);
-	}
+	if (ret && xf86LoadKernelModule("i915"))
+		ret = drmCheckModesettingSupported(id);
 	/* Be nice to the user and load fbcon too */
 	if (!ret)
 		(void)xf86LoadKernelModule("fbcon");
diff --git a/src/sna/sna_dri.c b/src/sna/sna_dri.c
index d0e19cf..c83d580 100644
--- a/src/sna/sna_dri.c
+++ b/src/sna/sna_dri.c
@@ -157,7 +157,7 @@ static struct kgem_bo *sna_pixmap_set_dri(struct sna *sna,
 					  PixmapPtr pixmap)
 {
 	struct sna_pixmap *priv;
-	uint32_t tiling;
+	int tiling;
 
 	priv = sna_pixmap_force_to_gpu(pixmap, MOVE_READ | MOVE_WRITE);
 	if (priv == NULL)
@@ -167,6 +167,8 @@ static struct kgem_bo *sna_pixmap_set_dri(struct sna *sna,
 		return ref(priv->gpu_bo);
 
 	tiling = color_tiling(sna, &pixmap->drawable);
+	if (tiling < 0)
+		tiling = -tiling;
 	if (priv->gpu_bo->tiling != tiling)
 		sna_pixmap_change_tiling(pixmap, tiling);
 


More information about the xorg-commit mailing list