sna/gen2,3: Don't set BLT_DST_TILED
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 23 Jan 2014 19:04:27 +0000 (19:04 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 23 Jan 2014 19:14:49 +0000 (19:14 +0000)
This bit only exists for gen4+ so avoid setting it on gen2 and gen3,
whilst setting it doesn't seem to cause any harm, there is no reason to
risk it...

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
src/sna/sna_blt.c

index 9fad292..61e8672 100644 (file)
@@ -206,7 +206,7 @@ static bool sna_blt_fill_init(struct sna *sna,
                        b[0] = XY_SETUP_MONO_PATTERN_SL_BLT | 7;
                        if (bpp == 32)
                                b[0] |= BLT_WRITE_ALPHA | BLT_WRITE_RGB;
-                       if (bo->tiling)
+                       if (bo->tiling && kgem->gen >= 040)
                                b[0] |= BLT_DST_TILED;
                        b[1] = blt->br13;
                        b[2] = 0;
@@ -270,7 +270,7 @@ noinline static void sna_blt_fill_begin(struct sna *sna,
                b[0] = XY_SETUP_MONO_PATTERN_SL_BLT | 7;
                if (blt->bpp == 32)
                        b[0] |= BLT_WRITE_ALPHA | BLT_WRITE_RGB;
-               if (blt->bo[0]->tiling)
+               if (blt->bo[0]->tiling && kgem->gen >= 040)
                        b[0] |= BLT_DST_TILED;
                b[1] = blt->br13;
                b[2] = 0;
@@ -3124,7 +3124,7 @@ bool sna_blt_fill_boxes(struct sna *sna, uint8_t alu,
                        b[0] = XY_SETUP_MONO_PATTERN_SL_BLT | 7;
                        if (bpp == 32)
                                b[0] |= BLT_WRITE_ALPHA | BLT_WRITE_RGB;
-                       if (bo->tiling)
+                       if (bo->tiling && kgem->gen >= 040)
                                b[0] |= BLT_DST_TILED;
                        b[1] = br13;
                        b[2] = 0;
@@ -3210,7 +3210,7 @@ bool sna_blt_fill_boxes(struct sna *sna, uint8_t alu,
                                b[0] = XY_SETUP_MONO_PATTERN_SL_BLT | 7;
                                if (bpp == 32)
                                        b[0] |= BLT_WRITE_ALPHA | BLT_WRITE_RGB;
-                               if (bo->tiling)
+                               if (bo->tiling && kgem->gen >= 040)
                                        b[0] |= BLT_DST_TILED;
                                b[1] = br13;
                                b[2] = 0;