Re: [PATCH 04/10] gpu: host1x: Lock classes during job submission

2017-12-06 Thread Mikko Perttunen
On 07.11.2017 23:23, Dmitry Osipenko wrote: On 07.11.2017 15:28, Mikko Perttunen wrote: On 05.11.2017 18:46, Dmitry Osipenko wrote: On 05.11.2017 14:01, Mikko Perttunen wrote: ... +static int mlock_id_for_class(unsigned int class) +{ +#if HOST1X_HW >= 6 +switch (class) +{ +case HO

Re: [PATCH 04/10] gpu: host1x: Lock classes during job submission

2017-12-06 Thread Dmitry Osipenko
On 05.12.2017 16:21, Mikko Perttunen wrote: > On 07.11.2017 23:23, Dmitry Osipenko wrote: >> On 07.11.2017 15:28, Mikko Perttunen wrote: >>> On 05.11.2017 18:46, Dmitry Osipenko wrote: On 05.11.2017 14:01, Mikko Perttunen wrote: > ... > > +static int mlock_id_for_class(unsigned int

Re: [PATCH 04/10] gpu: host1x: Lock classes during job submission

2017-11-08 Thread Dmitry Osipenko
On 07.11.2017 15:28, Mikko Perttunen wrote: > On 05.11.2017 18:46, Dmitry Osipenko wrote: >> On 05.11.2017 14:01, Mikko Perttunen wrote: >>> ... >>> >>> +static int mlock_id_for_class(unsigned int class) >>> +{ >>> +#if HOST1X_HW >= 6 >>> +    switch (class) >>> +    { >>> +    case HOST1X_CLASS_HO

Re: [PATCH 04/10] gpu: host1x: Lock classes during job submission

2017-11-08 Thread Mikko Perttunen
On 05.11.2017 18:46, Dmitry Osipenko wrote: On 05.11.2017 14:01, Mikko Perttunen wrote: >> ... +static int mlock_id_for_class(unsigned int class) +{ +#if HOST1X_HW >= 6 + switch (class) + { + case HOST1X_CLASS_HOST1X: + return 0; + case HOST1X_CLASS_VIC: +

Re: [PATCH 04/10] gpu: host1x: Lock classes during job submission

2017-11-06 Thread Dmitry Osipenko
On 05.11.2017 14:01, Mikko Perttunen wrote: > Host1x has a feature called MLOCKs which allow a certain class > (~HW unit) to be locked (in the mutex sense) and unlocked during > command execution, preventing other channels from accessing the > class while it is locked. This is necessary to prevent

[PATCH 04/10] gpu: host1x: Lock classes during job submission

2017-11-05 Thread Mikko Perttunen
Host1x has a feature called MLOCKs which allow a certain class (~HW unit) to be locked (in the mutex sense) and unlocked during command execution, preventing other channels from accessing the class while it is locked. This is necessary to prevent concurrent jobs from messing up class state. This h