[Intel-gfx] About dealing with CSB.context element switch in execlist mode.

Wang, Zhi A zhi.a.wang at intel.com
Wed Nov 25 05:17:49 PST 2015


OK. I see. Thanks Michel! :) Have a nice day. :)

Thanks,
Zhi.

> -----Original Message-----
> From: Thierry, Michel
> Sent: Wednesday, November 25, 2015 9:15 PM
> To: Wang, Zhi A; intel-gfx at lists.freedesktop.org
> Cc: Han, Xu; Li, Weinan Z; He, Min; Lv, Zhiyuan; Tian, Kevin
> Subject: Re: [Intel-gfx] About dealing with CSB.context element switch in
> execlist mode.
> 
> On 11/25/2015 1:00 PM, Wang, Zhi A wrote:
> > Another question about EXECLIST is: Can a preemption happen between
> element switch?
> >
> > I know this is beyond the scope of i915 a little. I'm just curious if it's possible.
> >
> > Let's say we have context A B C
> >
> > At first, we submit context A B in one ELSP write.
> > Then, we submit context C in another ELSP write at some time.
> >
> > If context A or B is running and gets preempted, then there will be
> CSB.preempted in CSB buffer. This is the normal behavior.
> >
> > I'm wondering that if there is any possibility that a preemption can happen
> between the two elements.
> >
> > Then the CSB should look like:
> >
> > [CSB 0 idle-to-active]
> > [CSB 1 CTX A element_switch/context_complete] [CSB 2 CTX C
> > active-to-idle/context_complete]
> >
> > Is it possible?
> 
> I would expect to always have a preempted event in the CSB, even in the
> remote case that A already completed and B hasn't started; there was an
> active execlist and it has been replaced by a new one:
> 
>   [CSB 0 idle-to-active]
>   [CSB 1 CTX A element_switch/context_complete]
>   [CSB 2 preempted ]
>   [CSB 3 CTX C active-to-idle/context_complete]


More information about the Intel-gfx mailing list