Skip to contentSkip to conversation

drm/i915: Reinstate the mmap ioctl for some platforms

PATCH Superseded Thomas Hellström 2 participants 2 messages Jun 24, 2021

Subsystems (2)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

Fixes 35cbd91eb541 ("drm/i915: Disable mmap ioctl for gen12+")
---
 drivers/gpu/drm/i915/gem/i915_gem_mman.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/gem/i915_gem_mman.c +4 -3
index 2fd155742bd2..09b5ed018aaf 100644
@@ -62,10 +62,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
+	 * 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))
Signature · 1 line
2.31.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Thomas Hellström

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.

Fixes 35cbd91eb541 ("drm/i915: Disable mmap ioctl for gen12+")

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