Skip to content

Commit 0a46be9

Browse files
committed
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: Matthew Auld <[email protected]> Cc: Joonas Lahtinen <[email protected]> Cc: Thomas Hellström <[email protected]> Cc: Daniele Ceraolo Spurio <[email protected]> Cc: Lionel Landwerlin <[email protected]> Cc: Jon Bloomfield <[email protected]> Cc: Jordan Justen <[email protected]> Cc: Daniel Vetter <[email protected]> Cc: Kenneth Graunke <[email protected]> Cc: Jason Ekstrand <[email protected]> Cc: Dave Airlie <[email protected]> Cc: [email protected] Cc: [email protected] Reviewed-by: Kenneth Graunke <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 0e997a3 commit 0a46be9

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

drivers/gpu/drm/i915/gem/i915_gem_create.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,9 @@ static int ext_set_placements(struct i915_user_extension __user *base,
335335
{
336336
struct drm_i915_gem_create_ext_memory_regions ext;
337337

338+
if (!IS_ENABLED(CONFIG_DRM_I915_UNSTABLE_FAKE_LMEM))
339+
return -ENODEV;
340+
338341
if (copy_from_user(&ext, base, sizeof(ext)))
339342
return -EFAULT;
340343

drivers/gpu/drm/i915/i915_query.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -432,6 +432,9 @@ static int query_memregion_info(struct drm_i915_private *i915,
432432
u32 total_length;
433433
int ret, id, i;
434434

435+
if (!IS_ENABLED(CONFIG_DRM_I915_UNSTABLE_FAKE_LMEM))
436+
return -ENODEV;
437+
435438
if (query_item->flags != 0)
436439
return -EINVAL;
437440

0 commit comments

Comments
 (0)