[Intel-gfx] [PATCH] uxa: Default to using TILING_X for pixmaps.

Chris Wilson chris at chris-wilson.co.uk
Wed Mar 24 09:28:29 CET 2010


On Tue, 23 Mar 2010 15:19:01 -0700, Carl Worth <cworth at cworth.org> wrote:
> On Tue, 23 Mar 2010 17:51:23 +0000, Chris Wilson <chris at chris-wilson.co.uk> wrote:
> > I believe that we have resolved all the issues since then -- as the glyph
> > cache is tiled once more and nobody has been complaining about broken
> > glyphs. [Except for the first few months nobody could even run 2.10 due to
> > the SET_TILING brokenness...] So I think this is a relatively safe patch,
> > but would appreciate a second or third opinion before merging it at this
> > point.
> 
> That analysis all sounds pretty good to me.
> 
> > -		if (size < 4096)
> > +		if (size <= 4096) {
> >  			*tiling = I915_TILING_NONE;
> > +		} else if (!IS_I965G(intel)) {
> > +			/* Older hardware requires massive fences to be pot
> > +			 * size aligned with a minimum of 1 MiB, so
> > +			 * causes massive overallocation for small textures.
> > +			 */
> > +			if (size <= 1024*1024/2)
> > +				*tiling = I915_TILING_NONE;
> > +		}
> >  	}
> 
> The nesting of these conditions seems backwards to me. Isn't the
> distinction of the hardware class more significant? (In which case the
> smaller 4096 limit is covered by the larger 1024*1024/2 limit anyway).
> 
> That is, I'd expect to see:
> 
> 	if (!IS_I965G(intel)) {
> 		if (size <= 1024*1024/2)
> 			disable tiling;
> 	} else if (size < 4096) {
> 		disable tiling;
> 	}
> 
> No change in the result, of course, just something that seems to make
> more sense to me at least.

I left it the other way around because the 4096 has a special meaning of
being a PAGE_SIZE and tiling beneath that is silly on any architecture.
Except that Cantiga has a super-fast solid fill instruction that can only
be run on a tiled surface... Will change.

As this has been reported to fix one GPU hang that happens to be in our
list of blockers, I'm going to take the brave step of applying this patch
later today.
-ickle

-- 
Chris Wilson, Intel Open Source Technology Centre



More information about the Intel-gfx mailing list