[PATCH RFC 094/111] staging: etnaviv: plug in fence waiting in cpu_prepare

Lucas Stach l.stach at pengutronix.de
Tue Apr 7 00:26:03 PDT 2015


Am Sonntag, den 05.04.2015, 20:51 +0200 schrieb Christian Gmeiner:
> 2015-04-02 17:30 GMT+02:00 Lucas Stach <l.stach at pengutronix.de>:
> > Allows userspace to properly synchronize with the GPU when accessing
> > buffers.
> >
> > Signed-off-by: Lucas Stach <l.stach at pengutronix.de>
> > ---
> >  drivers/staging/etnaviv/etnaviv_gem.c | 18 +++++++++---------
> >  1 file changed, 9 insertions(+), 9 deletions(-)
> >
> > diff --git a/drivers/staging/etnaviv/etnaviv_gem.c b/drivers/staging/etnaviv/etnaviv_gem.c
> > index 849d5cbb510c..57f3080fb632 100644
> > --- a/drivers/staging/etnaviv/etnaviv_gem.c
> > +++ b/drivers/staging/etnaviv/etnaviv_gem.c
> > @@ -467,28 +467,28 @@ void etnaviv_gem_move_to_inactive(struct drm_gem_object *obj)
> >  int etnaviv_gem_cpu_prep(struct drm_gem_object *obj, uint32_t op,
> >                 struct timespec *timeout)
> >  {
> > -/*
> > +
> >         struct drm_device *dev = obj->dev;
> >         struct etnaviv_gem_object *etnaviv_obj = to_etnaviv_bo(obj);
> > -*/
> > +
> >         int ret = 0;
> > -       /* TODO */
> > -#if 0
> > +
> >         if (is_active(etnaviv_obj)) {
> >                 uint32_t fence = 0;
> >
> > -               if (op & MSM_PREP_READ)
> > +               if (op & ETNA_PREP_READ)
> >                         fence = etnaviv_obj->write_fence;
> > -               if (op & MSM_PREP_WRITE)
> > +               if (op & ETNA_PREP_WRITE)
> >                         fence = max(fence, etnaviv_obj->read_fence);
> > -               if (op & MSM_PREP_NOSYNC)
> > +               if (op & ETNA_PREP_NOSYNC)
> >                         timeout = NULL;
> >
> > -               ret = etnaviv_wait_fence_interruptable(dev, fence, timeout);
> > +               ret = etnaviv_wait_fence_interruptable(dev, etnaviv_obj->gpu,
> > +                                                      fence, timeout);
> >         }
> >
> >         /* TODO cache maintenance */
> > -#endif
> > +
> >         return ret;
> >  }
> >
> > --
> > 2.1.4
> >
> 
> looks like a part from
> https://github.com/austriancoder/linux/commit/0c347857d7eff27834bd82d5485c97c3b16339ce
> 
Oh, yep. Together with the previous commit this looks like the same
thing. I would rather leave it as two commits, so it's logically
separated, but would be happy to hand over authorship of the commits to
you if you are ok with that.

Regards,
Lucas

-- 
Pengutronix e.K.             | Lucas Stach                 |
Industrial Linux Solutions   | http://www.pengutronix.de/  |



More information about the dri-devel mailing list