All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/gem: Early rejection of no-aperture map_ggtt
@ 2019-11-05 14:53 ` Chris Wilson
  0 siblings, 0 replies; 10+ messages in thread
From: Chris Wilson @ 2019-11-05 14:53 UTC (permalink / raw)
  To: intel-gfx; +Cc: Matthew Auld

If the device does not have an aperture through which we can indirectly
access and detile the buffers, simply reject the ioctl. Later we can
extend the ioctl to support different modes, but as an extension the
user must opt in and explicitly control the mmap type (viz
MMAP_OFFSET_IOCTL).

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
Cc: Matthew Auld <matthew.auld@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
---
 drivers/gpu/drm/i915/gem/i915_gem_mman.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/i915/gem/i915_gem_mman.c b/drivers/gpu/drm/i915/gem/i915_gem_mman.c
index e3002849844b..d60973603cc1 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_mman.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_mman.c
@@ -450,6 +450,9 @@ i915_gem_mmap_gtt(struct drm_file *file,
 	struct drm_i915_gem_object *obj;
 	int ret;
 
+	if (!i915_ggtt_has_aperture(&to_i915(dev)->ggtt))
+		return -ENODEV;
+
 	obj = i915_gem_object_lookup(file, handle);
 	if (!obj)
 		return -ENOENT;
-- 
2.24.0

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

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

end of thread, other threads:[~2019-11-06 11:57 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-05 14:53 [PATCH] drm/i915/gem: Early rejection of no-aperture map_ggtt Chris Wilson
2019-11-05 14:53 ` [Intel-gfx] " Chris Wilson
2019-11-05 15:20 ` Abdiel Janulgue
2019-11-05 15:20   ` [Intel-gfx] " Abdiel Janulgue
2019-11-05 17:36 ` ✓ Fi.CI.BAT: success for " Patchwork
2019-11-05 17:36   ` [Intel-gfx] " Patchwork
2019-11-06 10:47 ` ✓ Fi.CI.IGT: " Patchwork
2019-11-06 10:47   ` [Intel-gfx] " Patchwork
2019-11-06 11:57 ` [PATCH] " Joonas Lahtinen
2019-11-06 11:57   ` [Intel-gfx] " Joonas Lahtinen

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.