On 28/02/2019 14:24, Chris Wilson wrote:
Quoting Tvrtko Ursulin (2019-02-28 14:18:24)
From: Tvrtko Ursulin <[email protected]>

mmap(2) mandates size is page aligned so check this in our wrappers.

Signed-off-by: Tvrtko Ursulin <[email protected]>
---
  lib/i915/gem_mman.c | 4 ++++
  1 file changed, 4 insertions(+)

diff --git a/lib/i915/gem_mman.c b/lib/i915/gem_mman.c
index 3cf9a6bbdb31..084dbb3b3678 100644
--- a/lib/i915/gem_mman.c
+++ b/lib/i915/gem_mman.c
@@ -57,6 +57,8 @@ void *__gem_mmap__gtt(int fd, uint32_t handle, uint64_t size, 
unsigned prot)
         struct drm_i915_gem_mmap_gtt mmap_arg;
         void *ptr;
+ igt_assert(!(size & 4095));

No, we don't filter what the kernel gets, not in the ioctl wrapper
itself.

I know, but I could flip a coin on these kind of decisions. (Sometimes we open code for such ABI tests.) Move it to non-double underscore flavours?

Regards,

Tvrtko

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to