intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Return -EPERM when i915_gem_mmap_ioctl handling prime objects
@ 2017-08-15  8:42 Tina Zhang
  2017-08-15 10:18 ` ✓ Fi.CI.BAT: success for " Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Tina Zhang @ 2017-08-15  8:42 UTC (permalink / raw)
  Cc: intel-gfx, intel-gvt-dev

Prime objects have no backing filp to GEM mmap pages from. So, for Prime
objects, such operation is not permitted.

v1:
- Separate this patch from dma-buf patch set. (Joonas)

Signed-off-by: Tina Zhang <tina.zhang@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 0628fb1..bb9d5ed 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -1704,7 +1704,7 @@ i915_gem_mmap_ioctl(struct drm_device *dev, void *data,
 	 */
 	if (!obj->base.filp) {
 		i915_gem_object_put(obj);
-		return -EINVAL;
+		return -EPERM;
 	}
 
 	addr = vm_mmap(obj->base.filp, 0, args->size,
-- 
2.7.4

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

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

end of thread, other threads:[~2017-08-18  8:40 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-15  8:42 [PATCH] drm/i915: Return -EPERM when i915_gem_mmap_ioctl handling prime objects Tina Zhang
2017-08-15 10:18 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-08-15 10:49 ` [PATCH] " Daniel Vetter
2017-08-15 13:18   ` Chris Wilson
2017-08-15 14:25     ` Daniel Vetter
2017-08-15 14:32       ` Chris Wilson
2017-08-15 14:35         ` Chris Wilson
2017-08-15 14:48           ` Daniel Vetter
2017-08-15 15:01             ` Chris Wilson
2017-08-16  3:26               ` Zhang, Tina
2017-08-18  8:03                 ` Daniel Vetter
2017-08-18  8:40                   ` Joonas Lahtinen
2017-08-15 13:37 ` Joonas Lahtinen

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).