[PATCH 23/27] drm/i915: expose missing map_gtt support to users

Matthew Auld matthew.auld at intel.com
Tue Aug 6 14:31:04 UTC 2019


From: Daniele Ceraolo Spurio <daniele.ceraolospurio at intel.com>

Done by returning -ENODEV from the map_gtt version ioctl.

Cc: Antonio Argenziano <antonio.argenziano at intel.com>
Cc: Matthew Auld <matthew.auld at intel.com>
Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio at intel.com>
---
 drivers/gpu/drm/i915/i915_drv.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 52a8a8e70e55..20069013c98a 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -433,6 +433,8 @@ static int i915_getparam_ioctl(struct drm_device *dev, void *data,
 			return value;
 		break;
 	case I915_PARAM_MMAP_GTT_VERSION:
+		if (!HAS_MAPPABLE_APERTURE(dev_priv))
+			return -ENODEV;
 		/* Though we've started our numbering from 1, and so class all
 		 * earlier versions as 0, in effect their value is undefined as
 		 * the ioctl will report EINVAL for the unknown param!
-- 
2.20.1



More information about the Intel-gfx-trybot mailing list