xf86-video-intel: 2 commits - src/sna/sna_accel.c src/sna/sna_display.c
Chris Wilson
ickle at kemper.freedesktop.org
Wed Jun 19 08:17:17 PDT 2013
src/sna/sna_accel.c | 11 -----------
src/sna/sna_display.c | 27 ++++++++++++++++++++++++++-
2 files changed, 26 insertions(+), 12 deletions(-)
New commits:
commit 06679c1433cfb21ba925584700e2e97439fdf64a
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Wed Jun 19 16:16:14 2013 +0100
Revert "sna: Apply scanout stride limits to tiling selection"
This reverts commit cc08f6e0ef54744434fe0fd6d76348ee6099a62d.
Prefer to keep the frontbuffer as tiled, and use an per-crtc pixmap in
case the frontbuffer is not suitable as the framebuffer.
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index 075a09a..0f5c392 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -576,18 +576,7 @@ pure static uint32_t sna_pixmap_choose_tiling(PixmapPtr pixmap,
/* Use tiling by default, but disable per user request */
if (pixmap->usage_hint == SNA_CREATE_FB) {
- unsigned long tiled_limit;
-
tiling = -I915_TILING_X;
-
- if ((sna->kgem.gen >> 3) > 4)
- tiled_limit = 32 * 1024 * 8;
- else if ((sna->kgem.gen >> 3) == 4)
- tiled_limit = 16 * 1024 * 8;
- else
- tiled_limit = 8 * 1024 * 8;
- if ((unsigned long)pixmap->drawable.width * pixmap->drawable.bitsPerPixel > tiled_limit)
- tiling = I915_TILING_NONE;
bit = SNA_TILING_FB;
} else {
tiling = default_tiling(pixmap, tiling);
commit f165d2e21358703c5f4ed302a4a57219db482a59
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Wed Jun 19 16:15:32 2013 +0100
sna: Switch to a per-crtc pixmap if the pitch exceeds scanout limitations
References: https://bugs.freedesktop.org/show_bug.cgi?id=65099
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 f6c3d05..f7fe533 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -1126,6 +1126,8 @@ static bool use_shadow(struct sna *sna, xf86CrtcPtr crtc)
RRTransformPtr transform;
PictTransform crtc_to_fb;
struct pict_f_transform f_crtc_to_fb, f_fb_to_crtc;
+ unsigned long pitch_limit;
+ struct kgem_bo *bo;
BoxRec b;
assert(sna->scrn->virtualX && sna->scrn->virtualY);
@@ -1150,6 +1152,16 @@ static bool use_shadow(struct sna *sna, xf86CrtcPtr crtc)
return true;
}
+ bo = sna_pixmap_get_bo(sna->front);
+ if ((sna->kgem.gen >> 3) > 4)
+ pitch_limit = 32 * 1024;
+ else if ((sna->kgem.gen >> 3) == 4)
+ pitch_limit = bo->tiling ? 16 * 1024 : 32 * 1024;
+ else
+ pitch_limit = 8 * 1024;
+ if (bo->pitch > pitch_limit)
+ return true;
+
transform = NULL;
if (crtc->transformPresent)
transform = &crtc->transform;
@@ -1206,16 +1218,29 @@ static struct kgem_bo *sna_crtc_attach(xf86CrtcPtr crtc)
sna_crtc->transform = true;
return kgem_bo_reference(bo);
} else if (use_shadow(sna, crtc)) {
+ unsigned long tiled_limit;
+ int tiling;
+
if (!sna_crtc_enable_shadow(sna, sna_crtc))
return NULL;
DBG(("%s: attaching to per-crtc pixmap %dx%d\n",
__FUNCTION__, crtc->mode.HDisplay, crtc->mode.VDisplay));
+ tiling = I915_TILING_X;
+ if ((sna->kgem.gen >> 3) > 4)
+ tiled_limit = 32 * 1024 * 8;
+ else if ((sna->kgem.gen >> 3) == 4)
+ tiled_limit = 16 * 1024 * 8;
+ else
+ tiled_limit = 8 * 1024 * 8;
+ if ((unsigned long)crtc->mode.HDisplay * scrn->bitsPerPixel > tiled_limit)
+ tiling = I915_TILING_NONE;
+
bo = kgem_create_2d(&sna->kgem,
crtc->mode.HDisplay, crtc->mode.VDisplay,
scrn->bitsPerPixel,
- I915_TILING_X, CREATE_SCANOUT);
+ tiling, CREATE_EXACT | CREATE_SCANOUT);
if (bo == NULL)
return NULL;
More information about the xorg-commit
mailing list