Skip to content

Commit c90c4c6

Browse files
Thomas Hellströmrodrigovivi
authored andcommitted
drm/i915: Reinstate the mmap ioctl for some platforms
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: 35cbd91 ("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 d3f3baa) Signed-off-by: Rodrigo Vivi <[email protected]>
1 parent a193477 commit c90c4c6

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

drivers/gpu/drm/i915/gem/i915_gem_mman.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,11 @@ i915_gem_mmap_ioctl(struct drm_device *dev, void *data,
6161
struct drm_i915_gem_object *obj;
6262
unsigned long addr;
6363

64-
/* mmap ioctl is disallowed for all platforms after TGL-LP. This also
65-
* covers all platforms with local memory.
64+
/*
65+
* mmap ioctl is disallowed for all discrete platforms,
66+
* and for all platforms with GRAPHICS_VER > 12.
6667
*/
67-
if (GRAPHICS_VER(i915) >= 12 && !IS_TIGERLAKE(i915))
68+
if (IS_DGFX(i915) || GRAPHICS_VER(i915) > 12)
6869
return -EOPNOTSUPP;
6970

7071
if (args->flags & ~(I915_MMAP_WC))

0 commit comments

Comments
 (0)