[Intel-gfx] [RFC PATCH 00/11] Refactor HW workaround code

Oscar Mateo oscar.mateo at intel.com
Tue Oct 10 20:35:49 UTC 2017



On 10/10/2017 01:10 PM, Chris Wilson wrote:
> Quoting Oscar Mateo (2017-10-10 19:24:18)
>> * Above method can be used to create a complete logical context with
>> engine context populated by the hardware. This Logical context can be
>> used as an Golden Context Image or template for subsequently created
>> contexts.
> It's the template part we want (sending down a pair of contexts to be
> executed in sequence is problematic).

Ahh, I see.

Notice that what the BSpec suggests is to send the null state BB only 
once (for the kernel default context image) and then copy (memcpy or 
DMA) that context image over all new contexts that get created. That 
takes care of the problem with nonpriv registers, because absolutely 
everything inside the context image get blasted with a clean copy everytime.

> The current fire are the nonpriv registers that are leaking across the
> proto-context, i.e. mesa does LRI that get inherited into a libva
> context. Adding those to the context image requires approx a hundred
> LRI, so a not impossible task to proofread (esp. as many are just
> setting register groups, e.g. the 32 CS_GPR registers, to 0).
>
> But it is still a task that we need to maintain that list of nonpriv
> registers.

or, alternatively, follow the BSpec's "template" approach, with or 
without null state BB

> (State outside of the nonpriv that doesn't have a defined
> default, cannot be either modified by userspace or assume to have any
> particular value.)
> -Chris


More information about the Intel-gfx mailing list