diff mbox

[v4] drm/i915: Object w/o backing stroage is banned by -ENXIO

Message ID 1510555798-21079-1-git-send-email-tina.zhang@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Zhang, Tina Nov. 13, 2017, 6:49 a.m. UTC
-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> v1
---
 drivers/gpu/drm/i915/i915_gem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Joonas Lahtinen Nov. 13, 2017, 12:27 p.m. UTC | #1
On Mon, 2017-11-13 at 14:49 +0800, Tina Zhang wrote:
> -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> v1

Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>

Regards, Joonas
diff mbox

Patch

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