kip_on in case
support for dma-buf mmap is nonexistent.
Signed-off-by: Tiago Vignatti
---
tests/Makefile.sources | 1 +
tests/prime_mmap_kms.c | 275 +
2 files changed, 276 insertions(+)
create mode 100644 tests/prime_mmap_kms.c
diff --gi
v2: use uint32_t for color type, increment the variable and add
--interactive-debug=paint
v3: use igt_display_commit() to mode set the crtc so the rectangle is shown
painted; also added Testcase description on the beginning of the file.
Signed-off-by: Tiago Vignatti
---
OBS: v2 was sent privately
hooks, are exposed to the user-space through the
DMA_BUF_IOCTL_SYNC ioctl and have to be used before and after the mapped area
is accessed.
Signed-off-by: Tiago Vignatti
---
tests/Makefile.sources | 1 +
tests/prime_mmap_kms.c | 250 +
2 files
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.
Sure it is fine. The code is already ther
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? Semantics for EINT
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
Cc: David Herrmann
Cc: Sumit Semwal
Cc: Daniel
-off-by: Chris Wilson
Cc: Tiago Vignatti
Cc: Stéphane Marchesin
Cc: David Herrmann
Cc: Sumit Semwal
Cc: Daniel Vetter
CC: linux-me...@vger.kernel.org
Cc: dri-de...@lists.freedesktop.org
Cc: linaro-mm-...@lists.linaro.org
Cc: intel-gfx@lists.freedesktop.org
Cc: de...@driverdev.osuosl.org
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
+
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
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 function doing concurrent blit
to stress out the
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/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 function doing concurrent blit
to stress out the
I'm not sure this actually fix the root problem. With or without your
patch applied, I'm seeing the following in lib/tests/test-suite.log:
../../tests/prime_mmap:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
(prime_mmap:24023) ioctl-
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
support
dma-buf mmap functionality -- hint hint could be applied right now in igt main
repo hint hint :)
Tiago
Rob Bradford (1):
prime_mmap: Add new test for calling mmap() on dma-buf fds
Tiago Vignatti (4):
lib: Add gem_userptr and __gem_userptr helpers
prime_mmap: Add basic tests to writ
always possible to catch
the problem by running it at most 5 times).
v2: use prime_handle_to_fd_for_mmap instead.
Signed-off-by: Tiago Vignatti
---
tests/.gitignore | 1 +
tests/Makefile.sources | 1 +
tests/kms_mmap_write_crc.c | 236 ++
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/.gitignore | 1 +
tests/Makefile.sources | 1 +
tests/prime_mmap.c | 417 +
3 files changed, 419 insertions(+)
It requires i915 changes to add end_cpu_access().
v2: Use local definitions so older kernels fail fine.
Signed-off-by: Tiago Vignatti
---
tests/kms_mmap_write_crc.c | 82 --
1 file changed, 72 insertions(+), 10 deletions(-)
diff --git a/tests
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-based flush optimizations, so I
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 the inte
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
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, handle);
+ igt_assert
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 driver
to guarantee cache
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 this up
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
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.
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 ++
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
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
- 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
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/
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
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
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/
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
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/
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 ++
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
- 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
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
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
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
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
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
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
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 need to change yo
on 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 like ./prime_crc --interactive-debug=crc
Signed
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
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/
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 ++
56 matches
Mail list logo