diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-11-30 11:43:56 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-11-30 11:43:56 +0000 |
commit | 131600020638ef15166361214cd5e1a0c08c2ea6 (patch) | |
tree | 3a0350df18ca63c9b23e990304a36e7971fd961c /src/sna | |
parent | ee4d1873ff504c2150b51d13864164b02b85dd53 (diff) |
sna: Prevent gen4 from rendering to I915_TILING_Y
It always seems to end up in a hang...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna')
-rw-r--r-- | src/sna/kgem.c | 4 | ||||
-rw-r--r-- | src/sna/sna.h | 1 | ||||
-rw-r--r-- | src/sna/sna_accel.c | 8 | ||||
-rw-r--r-- | src/sna/sna_glyphs.c | 2 |
4 files changed, 14 insertions, 1 deletions
diff --git a/src/sna/kgem.c b/src/sna/kgem.c index b4798170..32187b1c 100644 --- a/src/sna/kgem.c +++ b/src/sna/kgem.c @@ -2993,6 +2993,10 @@ int kgem_choose_tiling(struct kgem *kgem, int tiling, int width, int height, int goto done; } } else { + /* XXX rendering to I915_TILING_Y seems broken? */ + if (kgem->gen < 50 && tiling == I915_TILING_Y) + tiling = I915_TILING_X; + if (width*bpp > (MAXSHORT-512) * 8) { DBG(("%s: large pitch [%d], forcing TILING_X\n", __FUNCTION__, width*bpp/8)); diff --git a/src/sna/sna.h b/src/sna/sna.h index 6028c4fd..9b93ed91 100644 --- a/src/sna/sna.h +++ b/src/sna/sna.h @@ -804,6 +804,7 @@ memcpy_xor(const void *src, void *dst, int bpp, #define SNA_CREATE_FB 0x10 #define SNA_CREATE_SCRATCH 0x11 +#define SNA_CREATE_GLYPHS 0x12 inline static bool is_power_of_two(unsigned x) { diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index 2f49f12c..79514c52 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -1170,6 +1170,14 @@ static PixmapPtr sna_create_pixmap(ScreenPtr screen, goto fallback; } + if (usage == SNA_CREATE_GLYPHS) { + if (flags & KGEM_CAN_CREATE_GPU) + return sna_pixmap_create_scratch(screen, + width, height, depth, + -I915_TILING_Y); + else + goto fallback; + } if (usage == SNA_CREATE_SCRATCH) { if (flags & KGEM_CAN_CREATE_GPU) return sna_pixmap_create_scratch(screen, diff --git a/src/sna/sna_glyphs.c b/src/sna/sna_glyphs.c index a58ddcf4..be1ce835 100644 --- a/src/sna/sna_glyphs.c +++ b/src/sna/sna_glyphs.c @@ -215,7 +215,7 @@ bool sna_glyphs_create(struct sna *sna) CACHE_PICTURE_SIZE, CACHE_PICTURE_SIZE, depth, - SNA_CREATE_SCRATCH); + SNA_CREATE_GLYPHS); if (!pixmap) goto bail; |