Blob Blame History Raw
From 274b2462a0493ba73957346fe5fca168e3190b53 Mon Sep 17 00:00:00 2001
From: Tina Zhang <tina.zhang@intel.com>
Date: Tue, 14 Nov 2017 10:25:12 +0000
Subject: [PATCH] drm/i915: Object w/o backing storage is banned by -ENXIO
Git-commit: 274b2462a0493ba73957346fe5fca168e3190b53
Patch-mainline: v4.16-rc1
References: FATE#322643 bsc#1055900

-ENXIO should be returned when operations are banned from changing
backing storage of objects without backing storage.

V4: 
- update "Reviewed-by". (Joonas)

V3: 
- separate this patch from "Introduce GEM proxy" patch-set. (Joonas)

V2: 
- update the patch description and subject to just mention objects w/o
  backing storage, instead of "GEM proxy". (Joonas)

Signed-off-by: Tina Zhang <tina.zhang@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/1510555798-21079-1-git-send-email-tina.zhang@intel.com
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20171114102513.22269-1-chris@chris-wilson.co.uk
Acked-by: Takashi Iwai <tiwai@suse.de>

---
 drivers/gpu/drm/i915/i915_gem.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -1718,7 +1718,7 @@ i915_gem_mmap_ioctl(struct drm_device *d
 	 */
 	if (!obj->base.filp) {
 		i915_gem_object_put(obj);
-		return -EINVAL;
+		return -ENXIO;
 	}
 
 	addr = vm_mmap(obj->base.filp, 0, args->size,