<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/staging/android/uapi, branch v4.7</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v4.7</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.7'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2016-04-30T00:37:10Z</updated>
<entry>
<title>dma-buf/sync_file: de-stage sync_file headers</title>
<updated>2016-04-30T00:37:10Z</updated>
<author>
<name>Gustavo Padovan</name>
<email>gustavo.padovan@collabora.co.uk</email>
</author>
<published>2016-04-28T13:46:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=460bfc41fd52959311ed0328163f785e023857af'/>
<id>urn:sha1:460bfc41fd52959311ed0328163f785e023857af</id>
<content type='text'>
Move sync_file headers file to include/ dir.

Signed-off-by: Gustavo Padovan &lt;gustavo.padovan@collabora.co.uk&gt;
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>staging/android: prepare sync_file for de-staging</title>
<updated>2016-04-30T00:37:10Z</updated>
<author>
<name>Gustavo Padovan</name>
<email>gustavo.padovan@collabora.co.uk</email>
</author>
<published>2016-04-28T13:46:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d4cab38e153d62ecd502645390c0289c1b8337df'/>
<id>urn:sha1:d4cab38e153d62ecd502645390c0289c1b8337df</id>
<content type='text'>
Move its functions and structs to their own file. Also moves function's
docs to the .c file.

Signed-off-by: Gustavo Padovan &lt;gustavo.padovan@collabora.co.uk&gt;
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>staging/android: remove redundant comments on sync_merge_data</title>
<updated>2016-04-30T00:37:10Z</updated>
<author>
<name>Gustavo Padovan</name>
<email>gustavo.padovan@collabora.co.uk</email>
</author>
<published>2016-04-28T13:46:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a64d6a68667e61f34b27df294e25da6a45f31ff2'/>
<id>urn:sha1:a64d6a68667e61f34b27df294e25da6a45f31ff2</id>
<content type='text'>
struct sync_merge_data already have documentation on top of the
struct definition. No need to duplicate it.

Signed-off-by: Gustavo Padovan &lt;gustavo.padovan@collabora.co.uk&gt;
Reviewed-by: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>staging/android: refactor SYNC IOCTLs</title>
<updated>2016-04-30T00:03:49Z</updated>
<author>
<name>Gustavo Padovan</name>
<email>gustavo.padovan@collabora.co.uk</email>
</author>
<published>2016-04-26T15:32:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2d75c88fefb228aedfb135228acb6620db8f0e40'/>
<id>urn:sha1:2d75c88fefb228aedfb135228acb6620db8f0e40</id>
<content type='text'>
Change SYNC_IOC_FILE_INFO (former SYNC_IOC_FENCE_INFO) behaviour to avoid
future API breaks and optimize buffer allocation.

Now num_fences can be filled by the caller to inform how many fences it
wants to retrieve from the kernel. If the num_fences passed is greater
than zero info-&gt;sync_fence_info should point to a buffer with enough space
to fit all fences.

However if num_fences passed to the kernel is 0, the kernel will reply
with number of fences of the sync_file.

Sending first an ioctl with num_fences = 0 can optimize buffer allocation,
in a first call with num_fences = 0 userspace will receive the actual
number of fences in the num_fences filed.

Then it can allocate a buffer with the correct size on sync_fence_info and
call SYNC_IOC_FILE_INFO again, but now with the actual value of num_fences
in the sync_file.

info-&gt;sync_fence_info was converted to __u64 pointer to prevent 32bit
compatibility issues. And a flags member was added.

An example userspace code for the later would be:

	struct sync_file_info *info;
	int err, size, num_fences;

	info = malloc(sizeof(*info));

	info.flags = 0;
	err = ioctl(fd, SYNC_IOC_FILE_INFO, info);
	num_fences = info-&gt;num_fences;

	if (num_fences) {
		info.flags = 0;
		size = sizeof(struct sync_fence_info) * num_fences;
		info-&gt;num_fences = num_fences;
		info-&gt;sync_fence_info = (uint64_t) calloc(num_fences,
							  sizeof(struct sync_fence_info));

		err = ioctl(fd, SYNC_IOC_FILE_INFO, info);
	}

Finally the IOCTLs numbers were changed to avoid any potential old
userspace running the old API to get weird errors. Changing the opcodes
will make them fail right away. This is just a precaution, there no
upstream users of these interfaces yet and the only user is Android, but
we don't expect anyone trying to run android userspace and all it
dependencies on top of upstream kernels.

Signed-off-by: Gustavo Padovan &lt;gustavo.padovan@collabora.co.uk&gt;
Reviewed-by: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
Acked-by: Greg Hackmann &lt;ghackmann@google.com&gt;
Acked-by: Rob Clark &lt;robdclark@gmail.com&gt;
Acked-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>staging/android: remove len field from struct sync_fence_info</title>
<updated>2016-02-08T01:34:58Z</updated>
<author>
<name>Gustavo Padovan</name>
<email>gustavo.padovan@collabora.co.uk</email>
</author>
<published>2016-02-03T13:25:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=323de43f79c5055af71c2db44f34e060ac15e1df'/>
<id>urn:sha1:323de43f79c5055af71c2db44f34e060ac15e1df</id>
<content type='text'>
After removing driver_data struct sync_fence_info has now a fixed size,
thus it doesn't need any field to tell its size, it is already known.

Signed-off-by: Gustavo Padovan &lt;gustavo.padovan@collabora.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>staging/android: remove driver_data from struct sync_fence_info</title>
<updated>2016-02-08T01:34:58Z</updated>
<author>
<name>Gustavo Padovan</name>
<email>gustavo.padovan@collabora.co.uk</email>
</author>
<published>2016-02-03T13:25:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c7434b8436f9fb79855f0a52e4e9665becb77aea'/>
<id>urn:sha1:c7434b8436f9fb79855f0a52e4e9665becb77aea</id>
<content type='text'>
It is unclear in what situations driver_data should be used thus better do
not upstream it for now. If a need arises in the future a discussion can
be started to re-add it.

Signed-off-by: Gustavo Padovan &lt;gustavo.padovan@collabora.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>staging/android: rename sync_file_info_data to sync_file_info</title>
<updated>2016-02-08T01:34:58Z</updated>
<author>
<name>Gustavo Padovan</name>
<email>gustavo.padovan@collabora.co.uk</email>
</author>
<published>2016-02-03T13:25:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b5b24ac57af99b6b580eb52118167702e442da02'/>
<id>urn:sha1:b5b24ac57af99b6b580eb52118167702e442da02</id>
<content type='text'>
info_data is a bit redundant, let's keep it as only sync_file_info. It is
also smaller.

Signed-off-by: Gustavo Padovan &lt;gustavo.padovan@collabora.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>staging/android: rename sync_pt_info to sync_fence_info</title>
<updated>2016-02-08T01:34:58Z</updated>
<author>
<name>Gustavo Padovan</name>
<email>gustavo.padovan@collabora.co.uk</email>
</author>
<published>2016-02-03T13:25:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e1786348e4e5442e82b4b35f8ade6f4d0f434e18'/>
<id>urn:sha1:e1786348e4e5442e82b4b35f8ade6f4d0f434e18</id>
<content type='text'>
As struct sync_pt doesn't exist anymore it is a good idea remove any
reference to it in the sync_framework. sync_pts were replaced directly by
fences and here we rename it to sync_fence_info to let the fence namespace
clean.

v2: rename fence_info to sync_fence_info (Maarten)

Signed-off-by: Gustavo Padovan &lt;gustavo.padovan@collabora.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>staging/android: remove SYNC_WAIT ioctl</title>
<updated>2016-02-08T01:34:58Z</updated>
<author>
<name>Gustavo Padovan</name>
<email>gustavo.padovan@collabora.co.uk</email>
</author>
<published>2016-02-03T13:25:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=84013bb4651e568d543f4cd3fa65c7931943da73'/>
<id>urn:sha1:84013bb4651e568d543f4cd3fa65c7931943da73</id>
<content type='text'>
This ioctl is replicating the work of poll() syscall so let's take the
opportunity that this is still on staging tree and remove the duplication
and force new users to use the poll() standard interface.

Signed-off-by: Gustavo Padovan &lt;gustavo.padovan@collabora.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>staging/android: rename sync_fence to sync_file</title>
<updated>2016-02-08T01:34:58Z</updated>
<author>
<name>Gustavo Padovan</name>
<email>gustavo.padovan@collabora.co.uk</email>
</author>
<published>2016-01-21T12:49:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d7fdb0ae9d115fa14ff3a5382c8a62de41c7786a'/>
<id>urn:sha1:d7fdb0ae9d115fa14ff3a5382c8a62de41c7786a</id>
<content type='text'>
sync_file has a more close meaning to what a sync_fence really, a struct
that represent a file that can be used by userspace to get information on
a fence, or wait for it to be signaled.

Signed-off-by: Gustavo Padovan &lt;gustavo.padovan@collabora.co.uk&gt;
Reviewed-by: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
