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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2015-04-02 17:30 GMT+02:00 Lucas Stach <l.stach@xxxxxxxxxxxxxx>:
> Allows userspace to properly synchronize with the GPU when accessing
> buffers.
>
> Signed-off-by: Lucas Stach <l.stach@xxxxxxxxxxxxxx>
> ---
>  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

--
Christian Gmeiner, MSc

https://soundcloud.com/christian-gmeiner
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel





[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux