xf86-video-intel: 3 commits - src/i830_uxa.c
Chris Wilson
ickle at kemper.freedesktop.org
Tue May 11 07:02:10 PDT 2010
src/i830_uxa.c | 23 +++++++++++++----------
1 file changed, 13 insertions(+), 10 deletions(-)
New commits:
commit dfbaf9aab80cf33d47148f087fa747eacd508b05
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Tue May 11 14:54:15 2010 +0100
i830: Never create a bo for depth=1 pixmaps.
As we can not accelerate these either as a destination or a source,
don't bother allocating a buffer object for them.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/i830_uxa.c b/src/i830_uxa.c
index 8255fb7..b5fc6b8 100644
--- a/src/i830_uxa.c
+++ b/src/i830_uxa.c
@@ -914,6 +914,8 @@ i830_uxa_create_pixmap(ScreenPtr screen, int w, int h, int depth,
if (w > 32767 || h > 32767)
return NullPixmap;
+ if (depth == 1)
+ return fbCreatePixmap(screen, w, h, depth, usage);
if (usage == CREATE_PIXMAP_USAGE_GLYPH_PICTURE && w <= 32 && h <= 32)
return fbCreatePixmap(screen, w, h, depth, usage);
@@ -956,7 +958,7 @@ i830_uxa_create_pixmap(ScreenPtr screen, int w, int h, int depth,
return NullPixmap;
}
- /* Perform a premilinary search for an in-flight bo */
+ /* Perform a preliminary search for an in-flight bo */
if (usage != UXA_CREATE_PIXMAP_FOR_MAP) {
int aligned_h;
commit 5b7efe375ae951ffcdb2c81e2ad8a2ed86ffbdf2
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Tue May 11 14:53:29 2010 +0100
i830: Use set_pixmap_bo() instead of open-coding.
The advantage is that this enables in-flight reuse of the old pixmap if
possible.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/i830_uxa.c b/src/i830_uxa.c
index 544eb39..8255fb7 100644
--- a/src/i830_uxa.c
+++ b/src/i830_uxa.c
@@ -741,18 +741,12 @@ i830_uxa_pixmap_swap_bo_with_image(PixmapPtr pixmap,
if (tiling != I915_TILING_NONE)
drm_intel_bo_set_tiling(bo, &tiling, stride);
- dri_bo_unreference(priv->bo);
- priv->bo = bo;
- priv->tiling = tiling;
- priv->stride = stride;
- priv->batch_read_domains = priv->batch_write_domain = 0;
- priv->flush_read_domains = priv->flush_write_domain = 0;
- list_del(&priv->batch);
- list_del(&priv->flush);
pixmap->drawable.pScreen->ModifyPixmapHeader(pixmap,
w, h,
0, 0,
stride, NULL);
+ i830_set_pixmap_bo(pixmap, bo);
+ dri_bo_unreference(bo);
} else {
bo = priv->bo;
stride = i830_pixmap_pitch(pixmap);
commit ad8af95dd35921118f45d6cff355c80cf0906ff0
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Tue May 11 14:52:54 2010 +0100
i830: Do not cache in-flight non-reusable buffers.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/i830_uxa.c b/src/i830_uxa.c
index e96f0a9..544eb39 100644
--- a/src/i830_uxa.c
+++ b/src/i830_uxa.c
@@ -556,8 +556,15 @@ void i830_set_pixmap_bo(PixmapPtr pixmap, dri_bo * bo)
priv = i830_get_pixmap_intel(pixmap);
+ if (priv == NULL && bo == NULL)
+ return;
+
if (priv != NULL) {
- if (list_is_empty(&priv->batch)) {
+ if (priv->bo == bo)
+ return;
+
+ if (list_is_empty(&priv->batch) ||
+ !drm_intel_bo_is_reusable(priv->bo)) {
dri_bo_unreference(priv->bo);
} else {
list_add(&priv->in_flight, &intel->in_flight);
More information about the xorg-commit
mailing list