dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Sunset igpu legacy mmap support based on GRAPHICS_VER_FULL
@ 2022-04-07 16:18 Matt Roper
  2022-04-08  5:18 ` [Intel-gfx] " Lucas De Marchi
  0 siblings, 1 reply; 2+ messages in thread
From: Matt Roper @ 2022-04-07 16:18 UTC (permalink / raw)
  To: intel-gfx; +Cc: Lucas De Marchi, Thomas Hellström, dri-devel

The intent of the version check in the mmap ioctl was to maintain
support for existing platforms (i.e., ADL/RPL and earlier), but drop
support on all future igpu platforms.  As we've seen on the dgpu side,
the hardware teams are using a more fine-grained numbering system for IP
version numbers these days, so it's possible the version number
associated with our next igpu could be some form of "12.xx" rather than
13 or higher.  Comparing against the full ver.release number will ensure
the intent of the check is maintained no matter what numbering the
hardware teams settle on.

Fixes: d3f3baa3562a ("drm/i915: Reinstate the mmap ioctl for some platforms")
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
---
 drivers/gpu/drm/i915/gem/i915_gem_mman.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/gem/i915_gem_mman.c b/drivers/gpu/drm/i915/gem/i915_gem_mman.c
index c3ea243d414d..0c5c43852e24 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_mman.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_mman.c
@@ -70,7 +70,7 @@ i915_gem_mmap_ioctl(struct drm_device *dev, void *data,
 	 * mmap ioctl is disallowed for all discrete platforms,
 	 * and for all platforms with GRAPHICS_VER > 12.
 	 */
-	if (IS_DGFX(i915) || GRAPHICS_VER(i915) > 12)
+	if (IS_DGFX(i915) || GRAPHICS_VER_FULL(i915) > IP_VER(12, 0))
 		return -EOPNOTSUPP;
 
 	if (args->flags & ~(I915_MMAP_WC))
-- 
2.34.1


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

* Re: [Intel-gfx] [PATCH] drm/i915: Sunset igpu legacy mmap support based on GRAPHICS_VER_FULL
  2022-04-07 16:18 [PATCH] drm/i915: Sunset igpu legacy mmap support based on GRAPHICS_VER_FULL Matt Roper
@ 2022-04-08  5:18 ` Lucas De Marchi
  0 siblings, 0 replies; 2+ messages in thread
From: Lucas De Marchi @ 2022-04-08  5:18 UTC (permalink / raw)
  To: Matt Roper; +Cc: Thomas Hellström, intel-gfx, dri-devel

On Thu, Apr 07, 2022 at 09:18:39AM -0700, Matt Roper wrote:
>The intent of the version check in the mmap ioctl was to maintain
>support for existing platforms (i.e., ADL/RPL and earlier), but drop
>support on all future igpu platforms.  As we've seen on the dgpu side,
>the hardware teams are using a more fine-grained numbering system for IP
>version numbers these days, so it's possible the version number
>associated with our next igpu could be some form of "12.xx" rather than
>13 or higher.  Comparing against the full ver.release number will ensure
>the intent of the check is maintained no matter what numbering the
>hardware teams settle on.
>
>Fixes: d3f3baa3562a ("drm/i915: Reinstate the mmap ioctl for some platforms")
>Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
>Cc: Lucas De Marchi <lucas.demarchi@intel.com>
>Signed-off-by: Matt Roper <matthew.d.roper@intel.com>


Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>

thanks
Lucas De Marchi

>---
> drivers/gpu/drm/i915/gem/i915_gem_mman.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/drivers/gpu/drm/i915/gem/i915_gem_mman.c b/drivers/gpu/drm/i915/gem/i915_gem_mman.c
>index c3ea243d414d..0c5c43852e24 100644
>--- a/drivers/gpu/drm/i915/gem/i915_gem_mman.c
>+++ b/drivers/gpu/drm/i915/gem/i915_gem_mman.c
>@@ -70,7 +70,7 @@ i915_gem_mmap_ioctl(struct drm_device *dev, void *data,
> 	 * mmap ioctl is disallowed for all discrete platforms,
> 	 * and for all platforms with GRAPHICS_VER > 12.
> 	 */
>-	if (IS_DGFX(i915) || GRAPHICS_VER(i915) > 12)
>+	if (IS_DGFX(i915) || GRAPHICS_VER_FULL(i915) > IP_VER(12, 0))
> 		return -EOPNOTSUPP;
>
> 	if (args->flags & ~(I915_MMAP_WC))
>-- 
>2.34.1
>

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

end of thread, other threads:[~2022-04-08  5:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-07 16:18 [PATCH] drm/i915: Sunset igpu legacy mmap support based on GRAPHICS_VER_FULL Matt Roper
2022-04-08  5:18 ` [Intel-gfx] " Lucas De Marchi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).