Re: [Mesa-dev] [PATCH 1/3] panfrost: Cache BO imports

2019-07-05 Thread Alyssa Rosenzweig
> struct panfrost_bo { > -struct pipe_reference reference; > +int refcnt; > > /* Mapping for the entire object (all levels) */ Why are we open-coding this instead of using pipe_reference? > +pthread_mutex_lock(&screen->handle_table_lock); > +_mesa_hash_

Re: [Mesa-dev] [PATCH 1/3] panfrost: Cache BO imports

2019-07-04 Thread Boris Brezillon
Hi Tomeu, On Thu, 4 Jul 2019 10:04:41 +0200 Tomeu Vizoso wrote: > If two jobs use the same GEM object at the same time, the job that > finishes first will (previous to this commit) close the GEM object, even > if there's a job still referencing it. > > To prevent this, have all jobs use the sa

[Mesa-dev] [PATCH 1/3] panfrost: Cache BO imports

2019-07-04 Thread Tomeu Vizoso
If two jobs use the same GEM object at the same time, the job that finishes first will (previous to this commit) close the GEM object, even if there's a job still referencing it. To prevent this, have all jobs use the same panfrost_bo for a given GEM object, so it's only closed once the last job i