xf86-video-intel: 3 commits - src/sna/kgem.c src/sna/sna_display.c
Chris Wilson
ickle at kemper.freedesktop.org
Thu Aug 14 13:35:57 PDT 2014
src/sna/kgem.c | 24 +++++++++++++++++++-----
src/sna/sna_display.c | 6 +++++-
2 files changed, 24 insertions(+), 6 deletions(-)
New commits:
commit f8e632f396bf4b0473dca0516567d56a29954cf3
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Thu Aug 14 21:35:34 2014 +0100
sna: Select appropriate tiling mode for TearFree shadow buffer
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c
index e96825d..ebda05e 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -1885,7 +1885,11 @@ static struct kgem_bo *sna_crtc_attach(xf86CrtcPtr crtc)
region.extents.x2,
region.extents.y2,
scrn->bitsPerPixel,
- I915_TILING_X,
+ kgem_choose_tiling(&sna->kgem,
+ I915_TILING_X,
+ region.extents.x2,
+ region.extents.y2,
+ sna->scrn->bitsPerPixel),
CREATE_SCANOUT);
if (shadow == NULL) {
DBG(("%s: failed to allocate TearFree shadow bo\n", __FUNCTION__));
commit c3b093b3c0676d6c9851af2b0c16806140c55258
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Thu Aug 14 21:32:48 2014 +0100
sna: DBG log invalid surface sizes
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index efce026..16f72a0 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -1655,15 +1655,21 @@ static uint32_t kgem_surface_size(struct kgem *kgem,
/* If it is too wide for the blitter, don't even bother. */
if (tiling != I915_TILING_NONE) {
- if (*pitch > 8192)
+ if (*pitch > 8192) {
+ DBG(("%s: too wide for tiled surface (pitch=%d, limit=%d)\n",
+ __FUNCTION__, *pitch, 8192));
return 0;
+ }
for (size = tile_width; size < *pitch; size <<= 1)
;
*pitch = size;
} else {
- if (*pitch >= 32768)
+ if (*pitch >= 32768) {
+ DBG(("%s: too wide for linear surface (pitch=%d, limit=%d)\n",
+ __FUNCTION__, *pitch, 32767));
return 0;
+ }
}
size = *pitch * height;
commit e59ea828f521e2f1963152a9211c36b8091bf655
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Thu Aug 14 21:31:32 2014 +0100
sna: DBG log all bo allocation failure paths
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index 2b146ca..efce026 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -4478,8 +4478,10 @@ struct kgem_bo *kgem_create_2d(struct kgem *kgem,
size = kgem_surface_size(kgem, kgem->has_relaxed_fencing, flags,
width, height, bpp, tiling, &pitch);
- if (size == 0)
+ if (size == 0) {
+ DBG(("%s: invalid surface size (too large?)\n", __FUNCTION__));
return NULL;
+ }
size /= PAGE_SIZE;
bucket = cache_bucket(size);
@@ -5058,17 +5060,22 @@ no_retire:
}
create:
- if (flags & CREATE_CACHED)
+ if (flags & CREATE_CACHED) {
+ DBG(("%s: no cached bo found, requested not to create a new bo\n", __FUNCTION__));
return NULL;
+ }
if (bucket >= NUM_CACHE_BUCKETS)
size = ALIGN(size, 1024);
handle = gem_create(kgem->fd, size);
- if (handle == 0)
+ if (handle == 0) {
+ DBG(("%s: kernel allocation (gem_create) failure\n", __FUNCTION__));
return NULL;
+ }
bo = __kgem_bo_alloc(handle, size);
if (!bo) {
+ DBG(("%s: malloc failed\n", __FUNCTION__));
gem_close(kgem->fd, handle);
return NULL;
}
@@ -5082,6 +5089,7 @@ create:
__kgem_bo_make_scanout(kgem, bo, width, height);
} else {
if (flags & CREATE_EXACT) {
+ DBG(("%s: failed to set exact tiling (gem_set_tiling)\n", __FUNCTION__));
gem_close(kgem->fd, handle);
free(bo);
return NULL;
More information about the xorg-commit
mailing list