[igt-dev] [RFC 2/5] lib/ioctl_wrappers: add mmap_offset support
Chris Wilson
chris at chris-wilson.co.uk
Thu Feb 21 21:19:31 UTC 2019
Quoting Antonio Argenziano (2019-02-21 21:13:47)
>
>
> On 21/02/19 11:47, Chris Wilson wrote:
> > Quoting Antonio Argenziano (2019-02-21 19:27:42)
> >> From: "Kalamarz, Lukasz" <lukasz.kalamarz at intel.com>
> >>
> >> With recently proposed changes, IGT need to start supporting new
> >> way of mmaping object, which will be used from now by default.
> >> This patch modify gem_mmap_wc and gem_mmap functions to be
> >> in sync with those changes.
> >>
> >> Signed-off-by: Lukasz Kalamarz <lukasz.kalamarz at intel.com>
> >> Cc: Janulgue Abdiel <abdiel.janulgue at intel.com>
> >> Cc: Matthew Auld <matthew.auld at intel.com>
> >> Cc: Michal Winiarski <michal.winiarski at intel.com>
> >> Cc: Antonio Argenziano <antonio.argenziano at intel.com>
> >> Cc: Daniele Spurio Ceraolo <daniele.ceraolospurio at intel.com>
> >> Cc: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
> >> ---
> >> lib/ioctl_wrappers.c | 150 +++++++++++++++++++++++++++++++++++++------
> >> 1 file changed, 129 insertions(+), 21 deletions(-)
> >>
> >> diff --git a/lib/ioctl_wrappers.c b/lib/ioctl_wrappers.c
> >> index 404c2fbf..d9b46088 100644
> >> --- a/lib/ioctl_wrappers.c
> >> +++ b/lib/ioctl_wrappers.c
> >> @@ -641,6 +641,24 @@ void gem_execbuf_wr(int fd, struct drm_i915_gem_execbuffer2 *execbuf)
> >> igt_assert_eq(__gem_execbuf_wr(fd, execbuf), 0);
> >> }
> >>
> >> +static bool has_mmap_offset(int fd)
> >> +{
> >> + static int has_mmap_offset = -1;
> >
> > a) nothing new in ioctl_wrappers, please
>
> i915/gem_mmap.c?
Seems a good starting point. Maybe even gem_mman.c (after sys/mman.h) if
we put a little more than mmap() in there.
I wouldn't worry too much, history says we will just dump everything
semi-related into the same file until the pain becomes too much again.
-Chris
More information about the igt-dev
mailing list