Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1622761

Re: [PATCH v2 4/5] drm/etnaviv: Reuse dma_fence_release.

From Daniel Vetter <daniel@ffwll.ch>
Newsgroups linux.kernel
Subject Re: [PATCH v2 4/5] drm/etnaviv: Reuse dma_fence_release.
Date 2017-04-13 09:10 +0200
Message-ID <tvH3c-7S2-7@gated-at.bofh.it> (permalink)
References <tvvY5-8tR-5@gated-at.bofh.it> <tvvY5-8tR-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, Apr 12, 2017 at 12:12:01PM -0700, Eric Anholt wrote:
> If we follow the typical pattern of the base class being the first
> member, we can use the default dma_fence_free function.
> 
> Signed-off-by: Eric Anholt <eric@anholt.net>

On 3&4: Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>

> Cc: Lucas Stach <l.stach@pengutronix.de>
> Cc: Russell King <linux+etnaviv@armlinux.org.uk>
> Cc: Christian Gmeiner <christian.gmeiner@gmail.com>
> Cc: etnaviv@lists.freedesktop.org
> ---
>  drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 11 ++---------
>  1 file changed, 2 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
> index da48819ff2e6..0d26ca56e94b 100644
> --- a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
> +++ b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
> @@ -998,8 +998,8 @@ static void hangcheck_disable(struct etnaviv_gpu *gpu)
>  
>  /* fence object management */
>  struct etnaviv_fence {
> -	struct etnaviv_gpu *gpu;
>  	struct dma_fence base;
> +	struct etnaviv_gpu *gpu;
>  };
>  
>  static inline struct etnaviv_fence *to_etnaviv_fence(struct dma_fence *fence)
> @@ -1031,20 +1031,13 @@ static bool etnaviv_fence_signaled(struct dma_fence *fence)
>  	return fence_completed(f->gpu, f->base.seqno);
>  }
>  
> -static void etnaviv_fence_release(struct dma_fence *fence)
> -{
> -	struct etnaviv_fence *f = to_etnaviv_fence(fence);
> -
> -	kfree_rcu(f, base.rcu);
> -}
> -
>  static const struct dma_fence_ops etnaviv_fence_ops = {
>  	.get_driver_name = etnaviv_fence_get_driver_name,
>  	.get_timeline_name = etnaviv_fence_get_timeline_name,
>  	.enable_signaling = etnaviv_fence_enable_signaling,
>  	.signaled = etnaviv_fence_signaled,
>  	.wait = dma_fence_default_wait,
> -	.release = etnaviv_fence_release,
> +	.release = dma_fence_free,
>  };
>  
>  static struct dma_fence *etnaviv_gpu_fence_alloc(struct etnaviv_gpu *gpu)
> -- 
> 2.11.0
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2 0/5] vc4 V3D fencing and msm/etnaviv cleanups Eric Anholt <eric@anholt.net> - 2017-04-12 21:20 +0200
  [PATCH v2 4/5] drm/etnaviv: Reuse dma_fence_release. Eric Anholt <eric@anholt.net> - 2017-04-12 21:20 +0200
    Re: [PATCH v2 4/5] drm/etnaviv: Reuse dma_fence_release. Daniel Vetter <daniel@ffwll.ch> - 2017-04-13 09:10 +0200
  [PATCH v2 5/5] drm/vc4: Expose dma-buf fences for V3D rendering. Eric Anholt <eric@anholt.net> - 2017-04-12 21:20 +0200
    Re: [PATCH v2 5/5] drm/vc4: Expose dma-buf fences for V3D rendering. Daniel Vetter <daniel@ffwll.ch> - 2017-04-13 09:20 +0200
      Re: [PATCH v2 5/5] drm/vc4: Expose dma-buf fences for V3D rendering. Eric Anholt <eric@anholt.net> - 2017-04-13 19:20 +0200
      Re: [PATCH v2 5/5] drm/vc4: Expose dma-buf fences for V3D rendering. Eric Anholt <eric@anholt.net> - 2017-04-13 20:10 +0200
  [PATCH v2 2/5] drm/etnaviv: Expose our reservation object when exporting a dmabuf. Eric Anholt <eric@anholt.net> - 2017-04-12 21:20 +0200
  [PATCH v2 1/5] drm/msm: Expose our reservation object when exporting a dmabuf. Eric Anholt <eric@anholt.net> - 2017-04-12 21:20 +0200
  [PATCH v2 3/5] drm/msm: Reuse dma_fence_release. Eric Anholt <eric@anholt.net> - 2017-04-12 21:20 +0200

csiph-web