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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170622100349.4200af30@bbrezillon>
Date:   Thu, 22 Jun 2017 10:03:49 +0200
From:   Boris Brezillon <boris.brezillon@...e-electrons.com>
To:     Eric Anholt <eric@...olt.net>
Cc:     dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/4] drm/vc4: Hook up plane prepare_fb to lookup dma-buf
 reservations.

On Wed, 21 Jun 2017 11:49:59 -0700
Eric Anholt <eric@...olt.net> wrote:

> This way drm_atomic_helper_wait_for_fences() will actually do
> something.  The vc4_seqno_cb has been doing the fence waits on V3D
> manually, so far.
> 
> Signed-off-by: Eric Anholt <eric@...olt.net>

Reviewed-by: Boris Brezillon <boris.brezillon@...e-electrons.com>

> ---
>  drivers/gpu/drm/vc4/vc4_plane.c | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
> 
> diff --git a/drivers/gpu/drm/vc4/vc4_plane.c b/drivers/gpu/drm/vc4/vc4_plane.c
> index fa6809d8b0fe..8853e9a4f005 100644
> --- a/drivers/gpu/drm/vc4/vc4_plane.c
> +++ b/drivers/gpu/drm/vc4/vc4_plane.c
> @@ -759,9 +759,26 @@ void vc4_plane_async_set_fb(struct drm_plane *plane, struct drm_framebuffer *fb)
>  	vc4_state->dlist[vc4_state->ptr0_offset] = addr;
>  }
>  
> +static int vc4_prepare_fb(struct drm_plane *plane,
> +			  struct drm_plane_state *state)
> +{
> +	struct vc4_bo *bo;
> +	struct dma_fence *fence;
> +
> +	if ((plane->state->fb == state->fb) || !state->fb)
> +		return 0;
> +
> +	bo = to_vc4_bo(&drm_fb_cma_get_gem_obj(state->fb, 0)->base);
> +	fence = reservation_object_get_excl_rcu(bo->resv);
> +	drm_atomic_set_fence_for_plane(state, fence);
> +
> +	return 0;
> +}
> +
>  static const struct drm_plane_helper_funcs vc4_plane_helper_funcs = {
>  	.atomic_check = vc4_plane_atomic_check,
>  	.atomic_update = vc4_plane_atomic_update,
> +	.prepare_fb = vc4_prepare_fb,
>  };
>  
>  static void vc4_plane_destroy(struct drm_plane *plane)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ