On 08/13/2015 08:09 AM, Thomas Hellstrom wrote:
> Tiago,
>
> I take it, this is intended to be a generic interface used mostly for 2D
> rendering.
yup. "generic" is an important point that I've actually forgot to
mention in the description, which is probably the whole motivation for
bringing thi
On 08/13/2015 04:01 AM, Daniel Vetter wrote:
> On Wed, Aug 12, 2015 at 08:29:16PM -0300, Tiago Vignatti wrote:
>> This patch adds test_correct_cpu_write, which maps the texture buffer
>> through a
>> prime fd and then writes directly to it using the CPU. It stresses the d
Hi Daniel,
On 08/13/2015 04:04 AM, Daniel Vetter wrote:
> On Wed, Aug 12, 2015 at 08:29:14PM -0300, Tiago Vignatti wrote:
>> +/* Map too big */
>> +handle = gem_create(fd, BO_SIZE);
>> +fill_bo(handle, BO_SIZE);
>> +dma_buf_fd = prime_handle_to_fd(fd,
_IMPORT to the list of ioctl that probably should go.
>
> Cc: Laura Abbott
> Cc: sumit.semwal at linaro.org
> Cc: laurent.pinchart at ideasonboard.com
> Cc: ghackmann at google.com
> Cc: robdclark at gmail.com
> Cc: david.brown at arm.com
> Cc: romlem at google.com
> Cc: Tiago
Hi back!
On 08/20/2015 03:48 AM, Thomas Hellstrom wrote:
> Hi, Tiago!
Something that the Chrome OS folks told me today is whether we could
change the sync API to use a syscall for that instead. Reason for that
is to eventually fit this in nicely in their sandbox architecture
requirements, so y
On 08/24/2015 02:42 PM, Thomas Hellstrom wrote:
> On 08/24/2015 07:12 PM, Daniel Stone wrote:
>> Hi,
>>
>> On 24 August 2015 at 18:10, Thomas Hellstrom
>> wrote:
>>> On 08/24/2015 07:04 PM, Daniel Stone wrote:
On 24 August 2015 at 17:56, Thomas Hellstrom
wrote:
> On 08/24/2015 05:
On 08/24/2015 03:01 PM, Tiago Vignatti wrote:
> yup, I think so. So IIUC the main changes needed for the drivers
> implement 2D sync lies in the dma_buf_sync_2d structure only. I.e.
> there's nothing really to be changed in the common code, right?
Do we have any special requirem
On 08/25/2015 06:30 AM, Thomas Hellstrom wrote:
> On 08/25/2015 11:02 AM, Daniel Vetter wrote:
>> I really feel like any kind of multi-range flush interface is feature
>> bloat, and if we do it then we should only do it later on when there's a
>> clear need for it.
>
> IMO all the use-cases so far
gned-off-by: Daniel Vetter
Signed-off-by: Tiago Vignatti
---
I'm unable to test the 2d sync properly, because begin/end access in i915
don't track mapped range for nothing.
Documentation/dma-buf-sharing.txt | 13 ++
drivers/dma-buf/dma-buf.c
On 08/26/2015 09:58 AM, Daniel Vetter wrote:
> The other is that right now there's no user nor implementation in sight
> which actually does range-based flush optimizations, so I'm pretty much
> expecting we'll get it wrong. Maybe instead we should go one step further
> and remove the range from th
On 08/26/2015 11:51 AM, Daniel Vetter wrote:
> On Wed, Aug 26, 2015 at 11:32:30AM -0300, Tiago Vignatti wrote:
>> On 08/26/2015 09:58 AM, Daniel Vetter wrote:
>>> The other is that right now there's no user nor implementation in sight
>>> which actually does range-b
me on the latter now. PTAL.
Tiago
Daniel Thompson (1):
drm: prime: Honour O_RDWR during prime-handle-to-fd
Daniel Vetter (1):
dma-buf: Add ioctls to allow userspace to flush
Tiago Vignatti (4):
dma-buf: Remove range-based flush
dma-buf: DRAFT: Make SYNC mandatory when userspace mmap
access.
This is safe because the flags are seldom touched by drm; mostly they
are passed verbatim to dma_buf calls.
v3 (Tiago): removed unused flags variable from drm_prime_handle_to_fd_ioctl.
Reviewed-by: Chris Wilson
Signed-off-by: Daniel Thompson
Signed-off-by: Tiago Vignatti
---
drivers
s) we can use the upcoming dma-buf sync ioctl for
such.
Cc: Sumit Semwal
Cc: Daniel Vetter
Signed-off-by: Tiago Vignatti
---
Documentation/dma-buf-sharing.txt | 19 ---
drivers/dma-buf/dma-buf.c | 13 -
drivers/gpu/drm/i915/i915_gem_dmabuf.c
heck for overflows in start/length.
v4 (Tiago): use 2d regions for sync.
v5 (Tiago): forget about 2d regions (v4); use _IOW in DMA_BUF_IOCTL_SYNC and
remove range information from struct dma_buf_sync.
Cc: Sumit Semwal
Signed-off-by: Daniel Vetter
Signed-off-by: Tiago Vignatti
---
Documentation
This is my (failed) attempt to make the SYNC_* mandatory. I've tried to revoke
write access to the mapped region until begin_cpu_access is called.
The tasklet schedule order seems alright but the whole logic is not working and
I guess it's something related to the fs trick I'm trying to do with th
to spit out when it ever happens.
v2: disable interruption to make sure errors are reported.
v3: update to the new end_cpu_access API.
Reviewed-by: Chris Wilson
Signed-off-by: Tiago Vignatti
---
drivers/gpu/drm/i915/i915_gem_dmabuf.c | 22 ++
1 file changed, 22 insertions
the WARN_ON.
Reviewed-by: Chris Wilson
Signed-off-by: Tiago Vignatti
---
drivers/gpu/drm/i915/i915_gem_dmabuf.c | 18 +-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/i915_gem_dmabuf.c
b/drivers/gpu/drm/i915/i915_gem_dmabuf.c
index 9dba
On 08/27/2015 01:36 PM, Emil Velikov wrote:
> Hi all,
>
> On 27 August 2015 at 00:29, Tiago Vignatti
> wrote:
>> From: Daniel Thompson
>>
>> Currently DRM_IOCTL_PRIME_HANDLE_TO_FD rejects all flags except
>> (DRM|O)_CLOEXEC making it difficult (maybe imposs
On 08/27/2015 09:06 AM, Hwang, Dongseong wrote:
> On Thu, Aug 27, 2015 at 2:29 AM, Tiago Vignatti
>> +#define DMA_BUF_BASE 'b'
>
> 'b' is occupied by vme and qat driver;
> https://github.com/torvalds/linux/blob/master/Documentation/ioctl/ioctl-numb
On 08/27/2015 05:03 AM, Chris Wilson wrote:
> On Wed, Aug 26, 2015 at 08:29:15PM -0300, Tiago Vignatti wrote:
>> +#ifndef _DMA_BUF_UAPI_H_
>> +#define _DMA_BUF_UAPI_H_
>> +
>> +enum dma_buf_sync_flags {
>> +DMA_BUF_SYNC_READ = (1 << 0
On 02/04/2016 06:55 PM, Stéphane Marchesin wrote:
> On Tue, Dec 22, 2015 at 1:36 PM, Tiago Vignatti
> wrote:
>> Hey back,
>>
>> Thank you Daniel, Chris, Alex and Thomas for reviewing the last series. I
>> think I addressed most of the comments now in version 7, incl
Thanks for reviewing, David. Please take a look in my comments in-line.
On 02/09/2016 07:26 AM, David Herrmann wrote:
>
> On Tue, Dec 22, 2015 at 10:36 PM, Tiago Vignatti
> wrote:
>> From: Daniel Vetter
>>
>> The userspace might need some sort of cache coherency m
Herrmann
Cc: Sumit Semwal
Reviewed-by: Stéphane Marchesin
Signed-off-by: Daniel Vetter
Signed-off-by: Tiago Vignatti
---
I left SYNC_START and SYNC_END exclusive, just how the logic was before. If we
see an useful use case, maybe like the way David said, to store two frames
next to each other i
On 03/05/2016 06:34 AM, Daniel Vetter wrote:
> On Mon, Feb 29, 2016 at 03:02:09PM +, Chris Wilson wrote:
>> On Mon, Feb 29, 2016 at 03:54:19PM +0100, Daniel Vetter wrote:
>>> On Thu, Feb 25, 2016 at 06:01:22PM +, Chris Wilson wrote:
>>>> On Thu, Feb 11, 2
case of failure (e.g. in a
case where the ioctl wouldn't try again in a return error) this test does not
reliably catch the problem with 100% of accuracy.
Cc: Chris Wilson
Signed-off-by: Tiago Vignatti
---
Chris, your unpolished dma-buf patch for adding return error into the ioctl
calls lgtm
On 03/17/2016 06:01 PM, Chris Wilson wrote:
> On Thu, Mar 17, 2016 at 03:18:03PM -0300, Tiago Vignatti wrote:
>> This patch adds ioctl-errors subtest to be used for exercising prime sync
>> ioctl
>> errors.
>>
>> The subtest constantly interrupts via signals a f
case of failure (e.g. in a
case where the ioctl wouldn't try again in a return error) this test does not
reliably catch the problem with 100% of accuracy.
v2: fix prime sync direction when reading mmap'ed file.
Cc: Chris Wilson
Signed-off-by: Tiago Vignatti
---
tests/prime_mmap_cohere
ned-off-by: Tiago Vignatti
---
tests/prime_mmap_coherency.c | 89
1 file changed, 89 insertions(+)
diff --git a/tests/prime_mmap_coherency.c b/tests/prime_mmap_coherency.c
index 180d8a4..d2b2a4f 100644
--- a/tests/prime_mmap_coherency.c
+
On 03/18/2016 03:11 PM, Daniel Vetter wrote:
> On Fri, Mar 18, 2016 at 03:08:56PM -0300, Tiago Vignatti wrote:
>> This patch adds ioctl-errors subtest to be used for exercising prime sync
>> ioctl
>> errors.
>>
>> The subtest constantly interrupts via signals a f
Testcase: igt/gem_concurrent_blit/*dmabuf*interruptible
> Testcase: igt/prime_mmap_coherency/ioctl-errors
> Signed-off-by: Chris Wilson
> Cc: Tiago Vignatti
> Cc: Stéphane Marchesin
> Cc: David Herrmann
> Cc: Sumit Semwal
> Cc: Daniel Vetter
> CC: linux-media at vger.
On 03/21/2016 04:51 AM, Daniel Vetter wrote:
> Just a bit of wording polish plus mentioning that it can fail and must
> be restarted.
>
> Requested by Sumit.
>
> v2: Fix them typos (Hans).
>
> Cc: Chris Wilson
> Cc: Tiago Vignatti
> Cc: Stéphane Marchesin
>
On 03/23/2016 12:42 PM, Chris Wilson wrote:
> On Wed, Mar 23, 2016 at 04:32:59PM +0100, David Herrmann wrote:
>> Hi
>>
>> On Wed, Mar 23, 2016 at 12:56 PM, Chris Wilson
>> wrote:
>>> On Wed, Mar 23, 2016 at 12:30:42PM +0100, David Herrmann wrote:
My question was rather about why we do this?
On 03/29/2016 06:47 AM, David Herrmann wrote:
> Hi
>
> On Mon, Mar 28, 2016 at 9:42 PM, Tiago Vignatti
> wrote:
>> Do we have an agreement here after all? David? I need to know whether this
>> fixup is okay to go cause I'll need to submit to Chrome OS then.
>
We want to be able to use CONFIG_DYNAMIC_DEBUG in arbiter code, switch
the few existing pr_devel() calls to pr_debug().
Also, add one more debug information regarding decoding count.
Signed-off-by: Tiago Vignatti
---
drivers/gpu/vga/vgaarb.c | 35 ++-
1 files
Signed-off-by: Tiago Vignatti
Cc: Henry Zhao
---
Jesse and Dave, that was send two times already and no one said anything.
Please, pull it. Oracle's Henry Zhao is already employing it in Solaris and,
after all authors agreed, we haven't changed yet the license.
drivers/gpu/vga/vgaar
We want to be able to use CONFIG_DYNAMIC_DEBUG in arbiter code, switch
the few existing pr_devel() calls to pr_debug().
Also, add one more debug information regarding decoding count.
Signed-off-by: Tiago Vignatti
---
drivers/gpu/vga/vgaarb.c | 35 ++-
1 files
Signed-off-by: Tiago Vignatti
Cc: Henry Zhao
---
Jesse and Dave, that was send two times already and no one said anything.
Please, pull it. Oracle's Henry Zhao is already employing it in Solaris and,
after all authors agreed, we haven't changed yet the license.
drivers/gpu/vga/vgaar
tps://github.com/tiagovignatti/intel-gpu-tools/commits/prime_mmap
Thank you,
Tiago
Daniel Thompson (1):
drm: prime: Honour O_RDWR during prime-handle-to-fd
Tiago Vignatti (1):
drm/i915: Use CPU mapping for userspace dma-buf mmap()
drivers/gpu/drm/drm_prime.c| 10 ++
n setting up dma-buf ioctls to
allow userspace flush, controlling manually the synchronization via
begin{,end}_cpu_access.
Signed-off-by: Tiago Vignatti
---
drivers/gpu/drm/i915/i915_gem_dmabuf.c | 21 -
1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/
access.
This is safe because the flags are seldom touched by drm; mostly they
are passed verbatim to dma_buf calls.
v3 (Tiago): removed unused flags variable from drm_prime_handle_to_fd_ioctl.
Signed-off-by: Daniel Thompson
Signed-off-by: Tiago Vignatti
---
drivers/gpu/drm/drm_prime.c | 10
com/tiagovignatti/intel-gpu-tools/commits/dma-buf-mmap-v6
Tiago
Daniel Thompson (1):
drm: prime: Honour O_RDWR during prime-handle-to-fd
Daniel Vetter (1):
dma-buf: Add ioctls to allow userspace to flush
Tiago Vignatti (3):
dma-buf: Remove range-based flush
drm/i915: Implement end_cpu_acc
access.
This is safe because the flags are seldom touched by drm; mostly they
are passed verbatim to dma_buf calls.
v3 (Tiago): removed unused flags variable from drm_prime_handle_to_fd_ioctl.
Reviewed-by: Chris Wilson
Signed-off-by: Daniel Thompson
Signed-off-by: Tiago Vignatti
---
drivers
s) we can use the upcoming dma-buf sync ioctl for
such.
Cc: Sumit Semwal
Cc: Daniel Vetter
Signed-off-by: Tiago Vignatti
---
Documentation/dma-buf-sharing.txt | 19 ---
drivers/dma-buf/dma-buf.c | 13 -
drivers/gpu/drm/i915/i915_gem_dmabuf.c
endation on using sync ioctls.
Cc: Sumit Semwal
Signed-off-by: Daniel Vetter
Signed-off-by: Tiago Vignatti
---
Documentation/dma-buf-sharing.txt | 22 +++-
drivers/dma-buf/dma-buf.c | 43 +++
include/uapi/linux/dma-buf.h
to spit out when it ever happens.
v2: disable interruption to make sure errors are reported.
v3: update to the new end_cpu_access API.
Reviewed-by: Chris Wilson
Signed-off-by: Tiago Vignatti
---
drivers/gpu/drm/i915/i915_gem_dmabuf.c | 22 ++
1 file changed, 22 insertions
the WARN_ON.
Reviewed-by: Chris Wilson
Signed-off-by: Tiago Vignatti
---
drivers/gpu/drm/i915/i915_gem_dmabuf.c | 18 +-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/i915_gem_dmabuf.c
b/drivers/gpu/drm/i915/i915_gem_dmabuf.c
index 9dba
back in
the caller; bring gem_userptr_sync back to gem_userptr_blits; added gtkdoc.
Signed-off-by: Tiago Vignatti
---
benchmarks/gem_userptr_benchmark.c | 55 +++-
lib/ioctl_wrappers.c | 41 +++
lib/ioctl_wrappers.h | 13 +
d userptr for testing. Add test for buffer
overlapping.
Signed-off-by: Rob Bradford
Signed-off-by: Tiago Vignatti
---
tests/Makefile.sources | 1 +
tests/prime_mmap.c | 417 +
2 files changed, 418 insertions(+)
create mode 100644 tests/prime_mmap.
going to use it as well, so make it public and available in the lib.
v2: adds prime_handle_to_fd_with_mmap for skipping test in older kernels and
test for invalid flags.
Signed-off-by: Tiago Vignatti
---
lib/ioctl_wrappers.c | 25 +++
lib/ioctl_wrappers.h
This patch adds dma-buf mmap synchronization ioctls that can be used by tests
for cache coherency management e.g. when CPU and GPU domains are being accessed
through dma-buf at the same time.
Signed-off-by: Tiago Vignatti
---
lib/ioctl_wrappers.c | 26 ++
lib
: use library's prime_sync_{start,end} instead.
Signed-off-by: Tiago Vignatti
---
tests/Makefile.sources | 1 +
tests/kms_mmap_write_crc.c | 281 +
2 files changed, 282 insertions(+)
create mode 100644 tests/kms_mmap_write_crc.c
diff --git a/t
respectively.
Signed-off-by: Tiago Vignatti
---
tests/Makefile.sources | 1 +
tests/prime_mmap_coherency.c | 246 +++
2 files changed, 247 insertions(+)
create mode 100644 tests/prime_mmap_coherency.c
diff --git a/tests/Makefile.sources b/tests
On 12/17/2015 04:19 PM, Alex Deucher wrote:
> On Wed, Dec 16, 2015 at 5:25 PM, Tiago Vignatti
> wrote:
>> From: Daniel Vetter
>>
>> The userspace might need some sort of cache coherency management e.g. when
>> CPU
>> and GPU domains are being accessed
On 12/17/2015 06:01 AM, Chris Wilson wrote:
> On Wed, Dec 16, 2015 at 08:25:36PM -0200, Tiago Vignatti wrote:
>> This function is meant to be used with dma-buf mmap, when finishing the CPU
>> access of the mapped pointer.
>>
>> +static void i915_gem_end_cpu_access(st
On 12/18/2015 05:02 PM, Tiago Vignatti wrote:
> On 12/17/2015 06:01 AM, Chris Wilson wrote:
>> On Wed, Dec 16, 2015 at 08:25:36PM -0200, Tiago Vignatti wrote:
>>> This function is meant to be used with dma-buf mmap, when finishing
>>> the CPU
>>> access of the
On 12/17/2015 07:58 PM, Thomas Hellstrom wrote:
> On 12/16/2015 11:25 PM, Tiago Vignatti wrote:
>> From: Daniel Vetter
>>
>> The userspace might need some sort of cache coherency management e.g. when
>> CPU
>> and GPU domains are being accessed through dma-buf a
Hey back,
Thank you Daniel, Chris, Alex and Thomas for reviewing the last series. I
think I addressed most of the comments now in version 7, including:
- being even more wording in the doc about sync usage.
- pass .write = false always in i915 end_cpu_access.
- add sync invalid flags test (i
access.
This is safe because the flags are seldom touched by drm; mostly they
are passed verbatim to dma_buf calls.
v3 (Tiago): removed unused flags variable from drm_prime_handle_to_fd_ioctl.
Reviewed-by: Chris Wilson
Signed-off-by: Daniel Thompson
Signed-off-by: Tiago Vignatti
---
drivers
s) we can use the upcoming dma-buf sync ioctl for
such.
Cc: Sumit Semwal
Cc: Daniel Vetter
Signed-off-by: Tiago Vignatti
---
Documentation/dma-buf-sharing.txt | 19 ---
drivers/dma-buf/dma-buf.c | 13 -
drivers/gpu/drm/i915/i915_gem_dmabuf.c
endation on using sync ioctls.
v7 (Tiago): Alex' nit on flags definition and being even more wording in the
doc about sync usage.
Cc: Sumit Semwal
Signed-off-by: Daniel Vetter
Signed-off-by: Tiago Vignatti
---
Documentation/dma-buf-sharing.txt | 21 ++-
drivers/dma-
to spit out when it ever happens.
v2: disable interruption to make sure errors are reported.
v3: update to the new end_cpu_access API.
v7: use .write = false cause it doesn't need to know whether it's write.
Reviewed-by: Chris Wilson
Signed-off-by: Tiago Vignatti
---
drivers/gp
the WARN_ON.
Reviewed-by: Chris Wilson
Signed-off-by: Tiago Vignatti
---
drivers/gpu/drm/i915/i915_gem_dmabuf.c | 18 +-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/i915_gem_dmabuf.c
b/drivers/gpu/drm/i915/i915_gem_dmabuf.c
index 8c9e
back in
the caller; bring gem_userptr_sync back to gem_userptr_blits; added gtkdoc.
Signed-off-by: Tiago Vignatti
---
benchmarks/gem_userptr_benchmark.c | 55 +++-
lib/ioctl_wrappers.c | 41 +++
lib/ioctl_wrappers.h | 13 +
d userptr for testing. Add test for buffer
overlapping.
Signed-off-by: Rob Bradford
Signed-off-by: Tiago Vignatti
---
tests/Makefile.sources | 1 +
tests/prime_mmap.c | 417 +
2 files changed, 418 insertions(+)
create mode 100644 tests/prime_mmap.
going to use it as well, so make it public and available in the lib.
v2: adds prime_handle_to_fd_with_mmap for skipping test in older kernels and
test for invalid flags.
Signed-off-by: Tiago Vignatti
---
lib/ioctl_wrappers.c | 25 +++
lib/ioctl_wrappers.h
This patch adds dma-buf mmap synchronization ioctls that can be used by tests
for cache coherency management e.g. when CPU and GPU domains are being accessed
through dma-buf at the same time.
v7: add sync invalid flags test.
Signed-off-by: Tiago Vignatti
---
lib/ioctl_wrappers.c | 26
merge end_cpu_access() patch with this and provide options to disable sync.
v4: use library's prime_sync_{start,end} instead.
v7: use CPU hog instead and use testing rounds to catch the sync problems.
Signed-off-by: Tiago Vignatti
---
tests/Makefil
respectively.
Signed-off-by: Tiago Vignatti
---
tests/Makefile.sources | 1 +
tests/prime_mmap_coherency.c | 246 +++
2 files changed, 247 insertions(+)
create mode 100644 tests/prime_mmap_coherency.c
diff --git a/tests/Makefile.sources b/tests
From 3e130ac2b274f1a3f68855559c78cb72d0673ca2 Mon Sep 17 00:00:00 2001
From: Tiago Vignatti
Date: Tue, 4 Aug 2015 13:38:09 -0300
Subject: [PATCH] tests: Add prime_crc for cache coherency
This program can be used to detect when the writes don't land in
scanout, due
cache incoherency.
Run it
On 08/05/2015 04:08 AM, Daniel Vetter wrote:
> On Tue, Aug 04, 2015 at 06:30:25PM -0300, Tiago Vignatti wrote:
> Nah they don't have to be equal since the problem isn't that nothing goes
> out to memory where the display can see it, but usually only parts of it.
> I.e. you ne
a-buf: Add ioctls to allow userspace to flush
Tiago Vignatti (1):
drm/i915: Use CPU mapping for userspace dma-buf mmap()
drivers/dma-buf/dma-buf.c | 47 ++
drivers/gpu/drm/drm_prime.c| 10 +++-
drivers/gpu/drm/i915/i915_gem_dmabuf
access.
This is safe because the flags are seldom touched by drm; mostly they
are passed verbatim to dma_buf calls.
v3 (Tiago): removed unused flags variable from drm_prime_handle_to_fd_ioctl.
Signed-off-by: Daniel Thompson
Signed-off-by: Tiago Vignatti
---
drivers/gpu/drm/drm_prime.c | 10
kmap interfaces are much different ... We might need to add a
mapping enum to the begin/end dma-buf functions.
v2 (Tiago): Fix header file type names (u64 -> __u64)
Signed-off-by: Daniel Vetter
Signed-off-by: Tiago Vignatti
---
drivers/dma-buf/dma-buf.c
Userspace is the one in charge of flush CPU by wrapping mmap with
begin{,end}_cpu_access.
v2: Remove LLC check cause we have dma-buf sync providers now. Also, fix return
before transferring ownership when mmap fails.
Signed-off-by: Tiago Vignatti
---
drivers/gpu/drm/i915/i915_gem_dmabuf.c | 18
his I'm using igt, and sending the tests for review now.
Please take a look.
Tiago
Daniel Thompson (1):
drm: prime: Honour O_RDWR during prime-handle-to-fd
Daniel Vetter (1):
dma-buf: Add ioctls to allow userspace to flush
Tiago Vignatti (2):
drm/i915: Implement end_cpu_access
drm/
access.
This is safe because the flags are seldom touched by drm; mostly they
are passed verbatim to dma_buf calls.
v3 (Tiago): removed unused flags variable from drm_prime_handle_to_fd_ioctl.
Signed-off-by: Daniel Thompson
Signed-off-by: Tiago Vignatti
---
drivers/gpu/drm/drm_prime.c | 10
kmap interfaces are much different ... We might need to add a
mapping enum to the begin/end dma-buf functions.
v2 (Tiago): Fix header file type names (u64 -> __u64)
Signed-off-by: Daniel Vetter
Signed-off-by: Tiago Vignatti
---
drivers/dma-buf/dma-buf.c
Signed-off-by: Tiago Vignatti
---
drivers/gpu/drm/i915/i915_gem_dmabuf.c | 10 ++
1 file changed, 10 insertions(+)
diff --git a/drivers/gpu/drm/i915/i915_gem_dmabuf.c
b/drivers/gpu/drm/i915/i915_gem_dmabuf.c
index e9c2bfd..8447ba4 100644
--- a/drivers/gpu/drm/i915/i915_gem_dmabuf.c
Userspace is the one in charge of flush CPU by wrapping mmap with
begin{,end}_cpu_access.
v2: Remove LLC check cause we have dma-buf sync providers now. Also, fix return
before transferring ownership when mmap fails.
v3: Fix return values.
Signed-off-by: Tiago Vignatti
---
drivers/gpu/drm/i915
reference counting
- test_dup chats that dup()ing the fd works
- test_errors checks the error return values for failures
- test_aperture_limit tests multiple buffer creation at the gtt aperture
limit
Signed-off-by: Rob Bradford
Signed-off-by: Tiago Vignatti
---
tests/Makefile.sources | 1
- Remove pattern_check(), which was walking through a useless iterator
- Remove superfluous PROT_WRITE from gem_mmap, in test_correct()
- Add binary file to .gitignore
Signed-off-by: Tiago Vignatti
---
tests/.gitignore | 1 +
tests/prime_mmap.c | 37 -
2
in the GPU process
("priviledged process").
This requires kernel modifications (Daniel Thompson's "drm: prime: Honour
O_RDWR during prime-handle-to-fd").
Signed-off-by: Tiago Vignatti
---
lib/ioctl_wrappers.c | 5 +++-
tests/prime_mmap.c | 65 ++
running it at most 5 times).
Signed-off-by: Tiago Vignatti
---
tests/.gitignore | 1 +
tests/Makefile.sources | 1 +
tests/kms_mmap_write_crc.c | 236 +
3 files changed, 238 insertions(+)
create mode 100644 tests/kms_mmap_write_crc.
It requires i915 changes to add end_cpu_access().
Signed-off-by: Tiago Vignatti
---
tests/kms_mmap_write_crc.c | 63 --
1 file changed, 55 insertions(+), 8 deletions(-)
diff --git a/tests/kms_mmap_write_crc.c b/tests/kms_mmap_write_crc.c
index
ioctls to allow userspace to flush
Tiago Vignatti (2):
drm/i915: Implement end_cpu_access
drm/i915: Use CPU mapping for userspace dma-buf mmap()
Documentation/dma-buf-sharing.txt | 12
drivers/dma-buf/dma-buf.c | 50 ++
drivers/
access.
This is safe because the flags are seldom touched by drm; mostly they
are passed verbatim to dma_buf calls.
v3 (Tiago): removed unused flags variable from drm_prime_handle_to_fd_ioctl.
Signed-off-by: Daniel Thompson
Signed-off-by: Tiago Vignatti
---
drivers/gpu/drm/drm_prime.c | 10
heck for overflows in start/length.
Cc: Sumit Semwal
Signed-off-by: Daniel Vetter
Signed-off-by: Tiago Vignatti
---
Documentation/dma-buf-sharing.txt | 12 ++
drivers/dma-buf/dma-buf.c | 50 +++
include/uapi/linux/dma-buf.h
Signed-off-by: Tiago Vignatti
---
drivers/gpu/drm/i915/i915_gem_dmabuf.c | 10 ++
1 file changed, 10 insertions(+)
diff --git a/drivers/gpu/drm/i915/i915_gem_dmabuf.c
b/drivers/gpu/drm/i915/i915_gem_dmabuf.c
index e9c2bfd..8447ba4 100644
--- a/drivers/gpu/drm/i915/i915_gem_dmabuf.c
the WARN_ON.
Signed-off-by: Tiago Vignatti
---
drivers/gpu/drm/i915/i915_gem_dmabuf.c | 18 +-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/i915_gem_dmabuf.c
b/drivers/gpu/drm/i915/i915_gem_dmabuf.c
index 8447ba4..ecd00d6 100644
--- a/drivers/
reference counting
- test_dup chats that dup()ing the fd works
- test_errors checks the error return values for failures
- test_aperture_limit tests multiple buffer creation at the gtt aperture
limit
Signed-off-by: Rob Bradford
Signed-off-by: Tiago Vignatti
---
tests/Makefile.sources | 1
- Remove pattern_check(), which was walking through a useless iterator
- Remove superfluous PROT_WRITE from gem_mmap, in test_correct()
- Add binary file to .gitignore
Signed-off-by: Tiago Vignatti
---
tests/.gitignore | 1 +
tests/prime_mmap.c | 37 -
2
in the GPU process
("priviledged process").
This requires kernel modifications (Daniel Thompson's "drm: prime: Honour
O_RDWR during prime-handle-to-fd").
Signed-off-by: Tiago Vignatti
---
lib/ioctl_wrappers.c | 5 +++-
tests/prime_mmap.c | 65 ++
This patch moves userptr definitions and helpers implementation that were
locally in gem_userptr_benchmark and gem_userptr_blits to the library, so other
tests can make use of them as well. There's no functional changes.
Signed-off-by: Tiago Vignatti
---
benchmarks/gem_userptr_benchmark.c
A userptr doesn't have the obj->base.filp, but can be exported via dma-buf, so
make sure it fails when mmaping.
Signed-off-by: Tiago Vignatti
---
In machine, export the handle to fd is actually returning error and falling
before the actual test happens. Same issue happens in gem_userptr
running it at most 5 times).
Signed-off-by: Tiago Vignatti
---
tests/.gitignore | 1 +
tests/Makefile.sources | 1 +
tests/kms_mmap_write_crc.c | 236 +
3 files changed, 238 insertions(+)
create mode 100644 tests/kms_mmap_write_crc.
It requires i915 changes to add end_cpu_access().
Signed-off-by: Tiago Vignatti
---
tests/kms_mmap_write_crc.c | 63 --
1 file changed, 55 insertions(+), 8 deletions(-)
diff --git a/tests/kms_mmap_write_crc.c b/tests/kms_mmap_write_crc.c
index
97 matches
Mail list logo