]> Git Repo - linux.git/commitdiff
drm/i915: Reinstate the mmap ioctl for some platforms
authorThomas Hellström <[email protected]>
Thu, 24 Jun 2021 11:29:14 +0000 (13:29 +0200)
committerRodrigo Vivi <[email protected]>
Mon, 28 Jun 2021 11:43:56 +0000 (07:43 -0400)
Reinstate the mmap ioctl for all current integrated platforms.
The intention was really to have it disabled for discrete graphics
where we enforce a single mmap mode.

This was reported to break ADL-P with the media stack, which was not the
intention. Although longer term we do still plan to sunset this ioctl
even for integrated, in favour of using mmap_offset instead.

Fixes: 35cbd91eb541 ("drm/i915: Disable mmap ioctl for gen12+")
Signed-off-by: Thomas Hellström <[email protected]>
Reviewed-by: Matthew Auld <[email protected]>
Acked-by: Daniel Vetter <[email protected]>
Signed-off-by: Matthew Auld <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
(cherry picked from commit d3f3baa3562a5d09f3e87f5fdf84952112807753)
Signed-off-by: Rodrigo Vivi <[email protected]>
drivers/gpu/drm/i915/gem/i915_gem_mman.c

index ee0bf8811388fc72d9b7308e99b058357ebd8726..2153267646066cdb20bd40381fd5de3415179c8e 100644 (file)
@@ -61,10 +61,11 @@ i915_gem_mmap_ioctl(struct drm_device *dev, void *data,
        struct drm_i915_gem_object *obj;
        unsigned long addr;
 
-       /* mmap ioctl is disallowed for all platforms after TGL-LP.  This also
-        * covers all platforms with local memory.
+       /*
+        * mmap ioctl is disallowed for all discrete platforms,
+        * and for all platforms with GRAPHICS_VER > 12.
         */
-       if (GRAPHICS_VER(i915) >= 12 && !IS_TIGERLAKE(i915))
+       if (IS_DGFX(i915) || GRAPHICS_VER(i915) > 12)
                return -EOPNOTSUPP;
 
        if (args->flags & ~(I915_MMAP_WC))
This page took 0.08069 seconds and 4 git commands to generate.