lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170412124715.j75nrmrdlycl4edm@phenom.ffwll.local>
Date:   Wed, 12 Apr 2017 14:47:15 +0200
From:   Daniel Vetter <daniel@...ll.ch>
To:     Eric Anholt <eric@...olt.net>
Cc:     dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
        stable@...r.kernel.org, etnaviv@...ts.freedesktop.org,
        Russell King <linux+etnaviv@...linux.org.uk>
Subject: Re: [PATCH 2/3] drm/etnaviv: Expose our reservation object when
 exporting a dmabuf.

On Mon, Apr 10, 2017 at 06:44:13PM -0700, Eric Anholt wrote:
> Without this, polling on the dma-buf (and presumably other devices
> synchronizing against our rendering) would return immediately, even
> while the BO was busy.
> 
> Signed-off-by: Eric Anholt <eric@...olt.net>
> Cc: stable@...r.kernel.org
> Cc: Lucas Stach <l.stach@...gutronix.de>
> Cc: Russell King <linux+etnaviv@...linux.org.uk>
> Cc: Christian Gmeiner <christian.gmeiner@...il.com>
> Cc: etnaviv@...ts.freedesktop.org

On the first 2 patches:

Reviewed-by: Daniel Vetter <daniel.vetter@...ll.ch>

If you get an ack from Rob/Lucas I guess we could push these also through
drm-misc.
-Daniel

> ---
> 
> Note: compile-tested only.
> 
>  drivers/gpu/drm/etnaviv/etnaviv_drv.c       | 1 +
>  drivers/gpu/drm/etnaviv/etnaviv_drv.h       | 1 +
>  drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c | 7 +++++++
>  3 files changed, 9 insertions(+)
> 
> diff --git a/drivers/gpu/drm/etnaviv/etnaviv_drv.c b/drivers/gpu/drm/etnaviv/etnaviv_drv.c
> index 587e45043542..ff6db8f0d966 100644
> --- a/drivers/gpu/drm/etnaviv/etnaviv_drv.c
> +++ b/drivers/gpu/drm/etnaviv/etnaviv_drv.c
> @@ -495,6 +495,7 @@ static struct drm_driver etnaviv_drm_driver = {
>  	.prime_fd_to_handle = drm_gem_prime_fd_to_handle,
>  	.gem_prime_export   = drm_gem_prime_export,
>  	.gem_prime_import   = drm_gem_prime_import,
> +	.gem_prime_res_obj  = etnaviv_gem_prime_res_obj,
>  	.gem_prime_pin      = etnaviv_gem_prime_pin,
>  	.gem_prime_unpin    = etnaviv_gem_prime_unpin,
>  	.gem_prime_get_sg_table = etnaviv_gem_prime_get_sg_table,
> diff --git a/drivers/gpu/drm/etnaviv/etnaviv_drv.h b/drivers/gpu/drm/etnaviv/etnaviv_drv.h
> index e41f38667c1c..058389f93b69 100644
> --- a/drivers/gpu/drm/etnaviv/etnaviv_drv.h
> +++ b/drivers/gpu/drm/etnaviv/etnaviv_drv.h
> @@ -80,6 +80,7 @@ void *etnaviv_gem_prime_vmap(struct drm_gem_object *obj);
>  void etnaviv_gem_prime_vunmap(struct drm_gem_object *obj, void *vaddr);
>  int etnaviv_gem_prime_mmap(struct drm_gem_object *obj,
>  			   struct vm_area_struct *vma);
> +struct reservation_object *etnaviv_gem_prime_res_obj(struct drm_gem_object *obj);
>  struct drm_gem_object *etnaviv_gem_prime_import_sg_table(struct drm_device *dev,
>  	struct dma_buf_attachment *attach, struct sg_table *sg);
>  int etnaviv_gem_prime_pin(struct drm_gem_object *obj);
> diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c b/drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c
> index 62b47972a52e..abed6f781281 100644
> --- a/drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c
> +++ b/drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c
> @@ -150,3 +150,10 @@ struct drm_gem_object *etnaviv_gem_prime_import_sg_table(struct drm_device *dev,
>  
>  	return ERR_PTR(ret);
>  }
> +
> +struct reservation_object *etnaviv_gem_prime_res_obj(struct drm_gem_object *obj)
> +{
> +	struct etnaviv_gem_object *etnaviv_obj = to_etnaviv_bo(obj);
> +
> +	return etnaviv_obj->resv;
> +}
> -- 
> 2.11.0
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@...ts.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ