Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f7978a0c authored by Chris Wilson's avatar Chris Wilson
Browse files

drm/i915: Allow the user to pass a context to any ring



With full-ppgtt, we want the user to have full control over their memory
layout, with a separate instance per context. Forcing them to use a
shared memory layout for !RCS not only duplicates the amount of work we
have to do, but also defeats the memory segregation on offer.

Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Link: http://patchwork.freedesktop.org/patch/msgid/20160822080350.4964-4-chris@chris-wilson.co.uk


Reviewed-by: default avatarJohn Harrison <john.c.harrison@intel.com>
Reviewed-by: default avatarThomas Daniel <thomas.daniel@intel.com>
Acked-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 7850d1c3
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -1253,12 +1253,9 @@ static struct i915_gem_context *
i915_gem_validate_context(struct drm_device *dev, struct drm_file *file,
			  struct intel_engine_cs *engine, const u32 ctx_id)
{
	struct i915_gem_context *ctx = NULL;
	struct i915_gem_context *ctx;
	struct i915_ctx_hang_stats *hs;

	if (engine->id != RCS && ctx_id != DEFAULT_CONTEXT_HANDLE)
		return ERR_PTR(-EINVAL);

	ctx = i915_gem_context_lookup(file->driver_priv, ctx_id);
	if (IS_ERR(ctx))
		return ctx;