Merge tag 'drm-misc-next-2021-07-16' of git://anongit.freedesktop.org/drm/drm-misc...
[linux-2.6-microblaze.git] / drivers / gpu / drm / i915 / gem / i915_gem_mman.c
index 2fd1557..4f50a50 100644 (file)
@@ -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 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))