sna: Disable use of Y-tiling for gen4

This problematic GPU still seems to like to fallover when faced with
Y-tiling. It was reserved only for use with glyphs, but even that
occasionally runs into trouble, so disable all selection of Y-tiling for
our own use.

Bugzilla: https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/1222203
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2013-09-10 12:29:24 +01:00
parent 8ff8eb2b38
commit 9a66d77efa
5 changed files with 9 additions and 10 deletions

View File

@ -1200,6 +1200,10 @@ void kgem_init(struct kgem *kgem, int fd, struct pci_device *dev, unsigned gen)
DBG(("%s: can blt to cpu? %d\n", __FUNCTION__,
kgem->can_blt_cpu));
kgem->can_render_y = gen != 021 && (gen >> 3) != 4;
DBG(("%s: can render to Y-tiled surfaces? %d\n", __FUNCTION__,
kgem->can_render_y));
kgem->has_secure_batches = test_has_secure_batches(kgem);
DBG(("%s: can use privileged batchbuffers? %d\n", __FUNCTION__,
kgem->has_secure_batches));
@ -3657,6 +3661,9 @@ int kgem_choose_tiling(struct kgem *kgem, int tiling, int width, int height, int
if (tiling < 0)
return tiling;
if (tiling == I915_TILING_Y && !kgem->can_render_y)
tiling = I915_TILING_X;
if (tiling && (height == 1 || width == 1)) {
DBG(("%s: disabling tiling [%dx%d] for single row/col\n",
__FUNCTION__,width, height));

View File

@ -184,6 +184,7 @@ struct kgem {
uint32_t has_handle_lut :1;
uint32_t can_blt_cpu :1;
uint32_t can_render_y :1;
uint16_t fence_max;
uint16_t half_cpu_cache_pages;

View File

@ -909,7 +909,6 @@ 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)
{

View File

@ -1238,14 +1238,6 @@ static PixmapPtr sna_create_pixmap(ScreenPtr screen,
else
goto fallback;
case SNA_CREATE_GLYPHS:
if (flags & KGEM_CAN_CREATE_GPU)
return sna_pixmap_create_scratch(screen,
width, height, depth,
-I915_TILING_Y);
else
goto fallback;
case SNA_CREATE_SCRATCH:
if (flags & KGEM_CAN_CREATE_GPU)
return sna_pixmap_create_scratch(screen,

View File

@ -238,7 +238,7 @@ bool sna_glyphs_create(struct sna *sna)
CACHE_PICTURE_SIZE,
CACHE_PICTURE_SIZE,
depth,
SNA_CREATE_GLYPHS);
SNA_CREATE_SCRATCH);
if (!pixmap) {
DBG(("%s: failed to allocate pixmap for Glyph cache\n",
__FUNCTION__));