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-next>] [day] [month] [year] [list]
Date:	Wed, 23 Mar 2016 15:47:21 -0300
From:	Gustavo Padovan <gustavo@...ovan.org>
To:	dri-devel@...ts.freedesktop.org
Cc:	linux-kernel@...r.kernel.org, Daniel Stone <daniels@...labora.com>,
	Arve Hjønnevåg <arve@...roid.com>,
	Riley Andrews <riandrews@...roid.com>,
	Daniel Vetter <daniel.vetter@...ll.ch>,
	Rob Clark <robdclark@...il.com>,
	Greg Hackmann <ghackmann@...gle.com>,
	John Harrison <John.C.Harrison@...el.com>,
	Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
	Gustavo Padovan <gustavo.padovan@...labora.co.uk>
Subject: [RFC 0/6] drm/fences: add in-fences to DRM

From: Gustavo Padovan <gustavo.padovan@...labora.co.uk>

Hi,

This is a first proposal to discuss the addition of in-fences support
to DRM. It adds a new struct to fence.c to abstract the use of sync_file
in DRM drivers. The new struct fence_collection contains a array with all
fences that a atomic commit needs to wait on

/**
 * struct fence_collection - aggregate fences together
 * @num_fences: number of fence in the collection.
 * @user_data: user data.
 * @func: user callback to put user data.
 * @fences: array of @num_fences fences.
 */
struct fence_collection {
       int num_fences;
       void *user_data;
       collection_put_func_t func;
       struct fence *fences[];
};


The fence_collection is allocated and filled by sync_file_fences_get() and
atomic_commit helpers can use fence_collection_wait() to wait the fences to
signal.

These patches depends on the sync ABI rework:

https://www.spinics.net/lists/dri-devel/msg102795.html

and the patch to de-stage the sync framework:

https://www.spinics.net/lists/dri-devel/msg102799.html


I also hacked together some sync support into modetest for testing:

https://git.collabora.com/cgit/user/padovan/libdrm.git/log/?h=atomic


	Gustavo


Gustavo Padovan (6):
  drm/fence: add FENCE_FD property to planes
  dma-buf/fence: add struct fence_collection
  dma-buf/sync_file: add sync_file_fences_get()
  dma-buf/fence: add fence_collection_put()
  dma-buf/fence: add fence_collection_wait()
  drm/fence: support fence_collection on atomic commit

 drivers/dma-buf/fence.c             | 33 +++++++++++++++++++++++++++++++++
 drivers/dma-buf/sync_file.c         | 36 ++++++++++++++++++++++++++++++++++++
 drivers/gpu/drm/drm_atomic.c        | 13 +++++++++++++
 drivers/gpu/drm/drm_atomic_helper.c | 10 ++++++----
 drivers/gpu/drm/drm_crtc.c          |  7 +++++++
 include/drm/drm_crtc.h              |  5 ++++-
 include/linux/fence.h               | 19 +++++++++++++++++++
 include/linux/sync_file.h           |  8 ++++++++
 8 files changed, 126 insertions(+), 5 deletions(-)

-- 
2.5.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ