Skip to content

Commit 96fd2c6

Browse files
committed
drm/i915: Drop new chunks of context creation ABI (for now)
The intent was to expose these as part of the means to perform full context recovery (though not the SINGLE_TIMELINE, that is for later and just sucked as collateral damage). As that requires a couple more patches to complete the series, roll back the earlier chunks of ABI for an intervening PR. We keep all the internals intact and under selftests. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190327105814.14694-1-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
1 parent a2deb87 commit 96fd2c6

3 files changed

Lines changed: 10 additions & 19 deletions

File tree

‎drivers/gpu/drm/i915/i915_drv.c‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3122,8 +3122,6 @@ static const struct drm_ioctl_desc i915_ioctls[] = {
31223122
DRM_IOCTL_DEF_DRV(I915_PERF_ADD_CONFIG, i915_perf_add_config_ioctl, DRM_UNLOCKED|DRM_RENDER_ALLOW),
31233123
DRM_IOCTL_DEF_DRV(I915_PERF_REMOVE_CONFIG, i915_perf_remove_config_ioctl, DRM_UNLOCKED|DRM_RENDER_ALLOW),
31243124
DRM_IOCTL_DEF_DRV(I915_QUERY, i915_query_ioctl, DRM_UNLOCKED|DRM_RENDER_ALLOW),
3125-
DRM_IOCTL_DEF_DRV(I915_GEM_VM_CREATE, i915_gem_vm_create_ioctl, DRM_RENDER_ALLOW),
3126-
DRM_IOCTL_DEF_DRV(I915_GEM_VM_DESTROY, i915_gem_vm_destroy_ioctl, DRM_RENDER_ALLOW),
31273125
};
31283126

31293127
static struct drm_driver driver = {

‎drivers/gpu/drm/i915/i915_gem_context.c‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,9 @@
9494
#include "intel_lrc_reg.h"
9595
#include "intel_workarounds.h"
9696

97+
#define I915_CONTEXT_CREATE_FLAGS_SINGLE_TIMELINE (1 << 1)
98+
#define I915_CONTEXT_PARAM_VM 0x9
99+
97100
#define ALL_L3_SLICES(dev) (1 << NUM_L3_SLICES(dev)) - 1
98101

99102
static struct i915_global_gem_context {
@@ -412,6 +415,8 @@ i915_gem_create_context(struct drm_i915_private *dev_priv, unsigned int flags)
412415

413416
lockdep_assert_held(&dev_priv->drm.struct_mutex);
414417

418+
BUILD_BUG_ON(I915_CONTEXT_CREATE_FLAGS_SINGLE_TIMELINE &
419+
~I915_CONTEXT_CREATE_FLAGS_UNKNOWN);
415420
if (flags & I915_CONTEXT_CREATE_FLAGS_SINGLE_TIMELINE &&
416421
!HAS_EXECLISTS(dev_priv))
417422
return ERR_PTR(-EINVAL);
@@ -971,6 +976,8 @@ static int get_ppgtt(struct i915_gem_context *ctx,
971976
struct i915_hw_ppgtt *ppgtt;
972977
int ret;
973978

979+
return -EINVAL; /* nothing to see here; please move along */
980+
974981
if (!ctx->ppgtt)
975982
return -ENODEV;
976983

@@ -1071,6 +1078,8 @@ static int set_ppgtt(struct i915_gem_context *ctx,
10711078
struct i915_hw_ppgtt *ppgtt, *old;
10721079
int err;
10731080

1081+
return -EINVAL; /* nothing to see here; please move along */
1082+
10741083
if (args->size)
10751084
return -EINVAL;
10761085

‎include/uapi/drm/i915_drm.h‎

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -343,8 +343,6 @@ typedef struct _drm_i915_sarea {
343343
#define DRM_I915_PERF_ADD_CONFIG 0x37
344344
#define DRM_I915_PERF_REMOVE_CONFIG 0x38
345345
#define DRM_I915_QUERY 0x39
346-
#define DRM_I915_GEM_VM_CREATE 0x3a
347-
#define DRM_I915_GEM_VM_DESTROY 0x3b
348346
/* Must be kept compact -- no holes */
349347

350348
#define DRM_IOCTL_I915_INIT DRM_IOW( DRM_COMMAND_BASE + DRM_I915_INIT, drm_i915_init_t)
@@ -405,8 +403,6 @@ typedef struct _drm_i915_sarea {
405403
#define DRM_IOCTL_I915_PERF_ADD_CONFIG DRM_IOW(DRM_COMMAND_BASE + DRM_I915_PERF_ADD_CONFIG, struct drm_i915_perf_oa_config)
406404
#define DRM_IOCTL_I915_PERF_REMOVE_CONFIG DRM_IOW(DRM_COMMAND_BASE + DRM_I915_PERF_REMOVE_CONFIG, __u64)
407405
#define DRM_IOCTL_I915_QUERY DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_QUERY, struct drm_i915_query)
408-
#define DRM_IOCTL_I915_GEM_VM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_VM_CREATE, struct drm_i915_gem_vm_control)
409-
#define DRM_IOCTL_I915_GEM_VM_DESTROY DRM_IOW (DRM_COMMAND_BASE + DRM_I915_GEM_VM_DESTROY, struct drm_i915_gem_vm_control)
410406

411407
/* Allow drivers to submit batchbuffers directly to hardware, relying
412408
* on the security mechanisms provided by hardware.
@@ -1456,9 +1452,8 @@ struct drm_i915_gem_context_create_ext {
14561452
__u32 ctx_id; /* output: id of new context*/
14571453
__u32 flags;
14581454
#define I915_CONTEXT_CREATE_FLAGS_USE_EXTENSIONS (1u << 0)
1459-
#define I915_CONTEXT_CREATE_FLAGS_SINGLE_TIMELINE (1u << 1)
14601455
#define I915_CONTEXT_CREATE_FLAGS_UNKNOWN \
1461-
(-(I915_CONTEXT_CREATE_FLAGS_SINGLE_TIMELINE << 1))
1456+
(-(I915_CONTEXT_CREATE_FLAGS_USE_EXTENSIONS << 1))
14621457
__u64 extensions;
14631458
};
14641459

@@ -1500,17 +1495,6 @@ struct drm_i915_gem_context_param {
15001495
* On creation, all new contexts are marked as recoverable.
15011496
*/
15021497
#define I915_CONTEXT_PARAM_RECOVERABLE 0x8
1503-
1504-
/*
1505-
* The id of the associated virtual memory address space (ppGTT) of
1506-
* this context. Can be retrieved and passed to another context
1507-
* (on the same fd) for both to use the same ppGTT and so share
1508-
* address layouts, and avoid reloading the page tables on context
1509-
* switches between themselves.
1510-
*
1511-
* See DRM_I915_GEM_VM_CREATE and DRM_I915_GEM_VM_DESTROY.
1512-
*/
1513-
#define I915_CONTEXT_PARAM_VM 0x9
15141498
/* Must be kept compact -- no holes and well documented */
15151499

15161500
__u64 value;

0 commit comments

Comments
 (0)