[Intel-gfx] [PATCH 1/2] drm/i915: Re-order some checks to do the unlikely one first

Dave Gordon david.s.gordon at intel.com
Thu Feb 19 02:26:49 PST 2015


On 16/02/15 21:03, Chris Wilson wrote:
> On Mon, Feb 16, 2015 at 06:25:10PM +0000, Damien Lespiau wrote:
>> instpm_mode != relative_constants_mode is quite unlikely to happen, so
>> we can test it first to use C's && short-circuiting and not test on
>> 'ring'.
>>
>> I know, probably a useless micro-optimisation in the big scheme of
>> things, but I'm going to add another test here, so might as well do it.
> 
> If you want to get pedantic, we want to move this to per-context :)
> -Chris

This test-and-set of instpm_mode will get reworked anyway when we add
preemption support, as that means we can no longer assume the value set
in the last execbuffer call is still in force at the beginning of the next.

.Dave.


More information about the Intel-gfx mailing list