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: <1458758847-21170-3-git-send-email-gustavo@padovan.org>
Date:	Wed, 23 Mar 2016 15:47:23 -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 2/6] dma-buf/fence: add struct fence_collection

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

The struct aggregates fences that we need to wait on before proceed with
some specific operation. In DRM, for example, we may wait for a group of
fences to signal before we scanout the buffers related to those fences.

Signed-off-by: Gustavo Padovan <gustavo.padovan@...labora.co.uk>
---
 include/linux/fence.h | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/include/linux/fence.h b/include/linux/fence.h
index 605bd88..3d1151f 100644
--- a/include/linux/fence.h
+++ b/include/linux/fence.h
@@ -104,6 +104,22 @@ struct fence_cb {
 	fence_func_t func;
 };
 
+typedef void (*collection_put_func_t)(void *data);
+
+/**
+ * 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[];
+};
+
 /**
  * struct fence_ops - operations implemented for fence
  * @get_driver_name: returns the driver name.
-- 
2.5.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ