Commit 0a46be95 authored by Matthew Auld's avatar Matthew Auld

drm/i915/gem: hide new uAPI behind CONFIG_BROKEN

Treat it the same as the fake local-memory stuff, where it is disabled
for normal kernels, in case some random UMD is tempted to use this. Once
we have all the other bits and pieces in place, like the TTM conversion,
we can turn this on for real.
Signed-off-by: default avatarMatthew Auld <matthew.auld@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Lionel Landwerlin <lionel.g.landwerlin@linux.intel.com>
Cc: Jon Bloomfield <jon.bloomfield@intel.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Daniel Vetter <daniel.vetter@intel.com>
Cc: Kenneth Graunke <kenneth@whitecape.org>
Cc: Jason Ekstrand <jason@jlekstrand.net>
Cc: Dave Airlie <airlied@gmail.com>
Cc: dri-devel@lists.freedesktop.org
Cc: mesa-dev@lists.freedesktop.org
Reviewed-by: default avatarKenneth Graunke <kenneth@whitecape.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20210429103056.407067-9-matthew.auld@intel.com
parent 0e997a36
...@@ -335,6 +335,9 @@ static int ext_set_placements(struct i915_user_extension __user *base, ...@@ -335,6 +335,9 @@ static int ext_set_placements(struct i915_user_extension __user *base,
{ {
struct drm_i915_gem_create_ext_memory_regions ext; struct drm_i915_gem_create_ext_memory_regions ext;
if (!IS_ENABLED(CONFIG_DRM_I915_UNSTABLE_FAKE_LMEM))
return -ENODEV;
if (copy_from_user(&ext, base, sizeof(ext))) if (copy_from_user(&ext, base, sizeof(ext)))
return -EFAULT; return -EFAULT;
......
...@@ -432,6 +432,9 @@ static int query_memregion_info(struct drm_i915_private *i915, ...@@ -432,6 +432,9 @@ static int query_memregion_info(struct drm_i915_private *i915,
u32 total_length; u32 total_length;
int ret, id, i; int ret, id, i;
if (!IS_ENABLED(CONFIG_DRM_I915_UNSTABLE_FAKE_LMEM))
return -ENODEV;
if (query_item->flags != 0) if (query_item->flags != 0)
return -EINVAL; return -EINVAL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment