summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2015-04-21 15:02:13 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2015-04-21 15:07:21 +0100
commit33374755c5462849cb0bb1d549328cd9b00ba1d5 (patch)
tree61bad8a8aafa39a24254d8a457701e1ea9aa1613
parent65cc48757e00c81834d39fe90638255723eeb3c6 (diff)
sna: Add a define to change scanout tilings by default
Just for testing, you hear? Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/sna_accel.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index ce096650..8e63b14e 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -67,7 +67,8 @@
#define FORCE_FLUSH 0
#define FORCE_FULL_SYNC 0 /* https://bugs.freedesktop.org/show_bug.cgi?id=61628 */
-#define DEFAULT_TILING I915_TILING_X
+#define DEFAULT_PIXMAP_TILING I915_TILING_X
+#define DEFAULT_SCANOUT_TILING I915_TILING_X
#define USE_INPLACE 1
#define USE_SPANS 0 /* -1 force CPU, 1 force GPU */
@@ -613,9 +614,9 @@ static bool sna_pixmap_free_cpu(struct sna *sna, struct sna_pixmap *priv, bool a
static inline uint32_t default_tiling(struct sna *sna, PixmapPtr pixmap)
{
-#if DEFAULT_TILING == I915_TILING_NONE
+#if DEFAULT_PIXMAP_TILING == I915_TILING_NONE
return I915_TILING_NONE;
-#elif DEFAULT_TILING == I915_TILING_X
+#elif DEFAULT_PIXMAP_TILING == I915_TILING_X
return I915_TILING_X;
#else
/* Try to avoid hitting the Y-tiling GTT mapping bug on 855GM */
@@ -1648,7 +1649,7 @@ static bool sna_pixmap_alloc_gpu(struct sna *sna,
if (pixmap->usage_hint == SNA_CREATE_FB && (sna->flags & SNA_LINEAR_FB) == 0) {
flags |= CREATE_SCANOUT;
tiling = kgem_choose_tiling(&sna->kgem,
- -I915_TILING_X,
+ -DEFAULT_SCANOUT_TILING,
pixmap->drawable.width,
pixmap->drawable.height,
pixmap->drawable.bitsPerPixel);