All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Reinstate the mmap ioctl for some platforms
@ 2021-06-24 10:53 ` Thomas Hellström
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Hellström @ 2021-06-24 10:53 UTC (permalink / raw)
  To: intel-gfx, dri-devel; +Cc: Thomas Hellström, matthew.auld

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+")
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
---
 drivers/gpu/drm/i915/gem/i915_gem_mman.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/gem/i915_gem_mman.c b/drivers/gpu/drm/i915/gem/i915_gem_mman.c
index 2fd155742bd2..09b5ed018aaf 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_mman.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_mman.c
@@ -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))
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Intel-gfx] [PATCH] drm/i915: Reinstate the mmap ioctl for some platforms
@ 2021-06-24 10:53 ` Thomas Hellström
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Hellström @ 2021-06-24 10:53 UTC (permalink / raw)
  To: intel-gfx, dri-devel; +Cc: Thomas Hellström, matthew.auld

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+")
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
---
 drivers/gpu/drm/i915/gem/i915_gem_mman.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/gem/i915_gem_mman.c b/drivers/gpu/drm/i915/gem/i915_gem_mman.c
index 2fd155742bd2..09b5ed018aaf 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_mman.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_mman.c
@@ -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))
-- 
2.31.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] drm/i915: Reinstate the mmap ioctl for some platforms
  2021-06-24 10:53 ` [Intel-gfx] " Thomas Hellström
@ 2021-06-24 11:11   ` Matthew Auld
  -1 siblings, 0 replies; 4+ messages in thread
From: Matthew Auld @ 2021-06-24 11:11 UTC (permalink / raw)
  To: Thomas Hellström
  Cc: Intel Graphics Development, Matthew Auld, ML dri-devel

On Thu, 24 Jun 2021 at 11:53, Thomas Hellström
<thomas.hellstrom@linux.intel.com> wrote:
>
> 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+")
> Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Intel-gfx] [PATCH] drm/i915: Reinstate the mmap ioctl for some platforms
@ 2021-06-24 11:11   ` Matthew Auld
  0 siblings, 0 replies; 4+ messages in thread
From: Matthew Auld @ 2021-06-24 11:11 UTC (permalink / raw)
  To: Thomas Hellström
  Cc: Intel Graphics Development, Matthew Auld, ML dri-devel

On Thu, 24 Jun 2021 at 11:53, Thomas Hellström
<thomas.hellstrom@linux.intel.com> wrote:
>
> 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+")
> Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-06-24 11:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-24 10:53 [PATCH] drm/i915: Reinstate the mmap ioctl for some platforms Thomas Hellström
2021-06-24 10:53 ` [Intel-gfx] " Thomas Hellström
2021-06-24 11:11 ` Matthew Auld
2021-06-24 11:11   ` [Intel-gfx] " Matthew Auld

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.