From: Tiago Vignatti <tiago.vignatti@intel.com>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: daniel.thompson@linaro.org, daniel.vetter@ffwll.ch,
intel-gfx@lists.freedesktop.org,
Rob Bradford <rob@linux.intel.com>,
dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 1/7] prime_mmap: Add new test for calling mmap() on dma-buf fds
Date: Fri, 14 Aug 2015 19:17:05 -0300 [thread overview]
Message-ID: <55CE68E1.9060004@intel.com> (raw)
In-Reply-To: <20150813070411.GV17734@phenom.ffwll.local>
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(errno == 0);
>> + ptr = mmap(NULL, BO_SIZE * 2, PROT_READ, MAP_SHARED, dma_buf_fd, 0);
>> + igt_assert(ptr == MAP_FAILED && errno == EINVAL);
>> + errno = 0;
>> + close(dma_buf_fd);
>> + gem_close(fd, handle);
>
> That only checks for one of the conditions, trying to map something
> offset/overlapping the end of the buffer, but small enough needs to be
> tested separately.
you mean test for smaller length with a non-zero offset? I don't think I
get what you wanted to say here maybe.
> Also I think a testcase for invalid buffer2fd flags would be good, just
> for completeness - we seem to be missing that one.
you mean test for different flags than the ones supported by
DRM_IOCTL_PRIME_HANDLE_TO_FD?
Tiago
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2015-08-14 22:17 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-12 23:29 [PATCH v4] mmap on the dma-buf directly Tiago Vignatti
2015-08-12 23:29 ` [PATCH 1/4] drm: prime: Honour O_RDWR during prime-handle-to-fd Tiago Vignatti
2015-08-12 23:29 ` [PATCH 2/4] dma-buf: Add ioctls to allow userspace to flush Tiago Vignatti
2015-08-12 23:29 ` [PATCH 3/4] drm/i915: Implement end_cpu_access Tiago Vignatti
2015-08-23 12:14 ` Chris Wilson
2015-08-12 23:29 ` [PATCH 4/4] drm/i915: Use CPU mapping for userspace dma-buf mmap() Tiago Vignatti
2015-08-23 12:21 ` Chris Wilson
2015-08-12 23:29 ` [PATCH 1/7] prime_mmap: Add new test for calling mmap() on dma-buf fds Tiago Vignatti
2015-08-13 7:04 ` Daniel Vetter
2015-08-14 22:17 ` Tiago Vignatti [this message]
2015-08-25 7:46 ` Daniel Vetter
2015-08-12 23:29 ` [PATCH 2/7] prime_mmap: Fix a few misc stuff Tiago Vignatti
2015-08-12 23:29 ` [PATCH 3/7] prime_mmap: Add basic tests to write in a bo using CPU Tiago Vignatti
2015-08-13 7:01 ` Daniel Vetter
2015-08-13 14:26 ` Tiago Vignatti
2015-08-13 14:48 ` Daniel Vetter
2015-08-12 23:29 ` [PATCH 4/7] lib: Add gem_userptr helpers Tiago Vignatti
2015-08-23 12:10 ` Chris Wilson
2015-08-25 7:47 ` Daniel Vetter
2015-08-12 23:29 ` [PATCH 5/7] prime_mmap: Test for userptr mmap Tiago Vignatti
2015-08-23 12:17 ` Chris Wilson
2015-08-12 23:29 ` [PATCH 6/7] tests: Add kms_mmap_write_crc for cache coherency tests Tiago Vignatti
2015-08-12 23:29 ` [PATCH 7/7] tests/kms_mmap_write_crc: Demonstrate the need for end_cpu_access Tiago Vignatti
2015-08-13 11:09 ` [PATCH v4] mmap on the dma-buf directly Thomas Hellstrom
2015-08-13 14:09 ` Tiago Vignatti
2015-08-13 14:51 ` Daniel Vetter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55CE68E1.9060004@intel.com \
--to=tiago.vignatti@intel.com \
--cc=daniel.thompson@linaro.org \
--cc=daniel.vetter@ffwll.ch \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=rob@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox