Re: [Mesa-dev] [PATCH v2 24/37] panfrost: Cache GPU accesses to BOs

2019-09-16 Thread Alyssa Rosenzweig
> > > +/* If ->gpu_access is 0, the BO is idle, and if the > > > WRITE flag > > > + * is cleared, that means we only have readers. > > > + */ > > > +if (!bo->gpu_access) > > > +return true; > > > +

Re: [Mesa-dev] [PATCH v2 24/37] panfrost: Cache GPU accesses to BOs

2019-09-16 Thread Boris Brezillon
On Mon, 16 Sep 2019 10:05:52 -0400 Alyssa Rosenzweig wrote: > > +/* If ->gpu_access is 0, the BO is idle, and if the WRITE > > flag > > + * is cleared, that means we only have readers. > > + */ > > +if (!bo->gpu_access) > > +

Re: [Mesa-dev] [PATCH v2 24/37] panfrost: Cache GPU accesses to BOs

2019-09-16 Thread Alyssa Rosenzweig
> +/* If ->gpu_access is 0, the BO is idle, and if the WRITE > flag > + * is cleared, that means we only have readers. > + */ > +if (!bo->gpu_access) > +return true; > +else if (!(access_type &

[Mesa-dev] [PATCH v2 24/37] panfrost: Cache GPU accesses to BOs

2019-09-16 Thread Boris Brezillon
This way we can avoid calling ioctl(WAIT_BO) when we already know the BO is idle because it hasn't been touched by a GPU job or because the previous call to panfrost_bo_wait() returned true. Signed-off-by: Boris Brezillon --- src/gallium/drivers/panfrost/pan_bo.c | 40 +++---