Message ID | 1444128791-6327-2-git-send-email-chris@chris-wilson.co.uk (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
> -----Original Message----- > From: Intel-gfx [mailto:intel-gfx-bounces@lists.freedesktop.org] On Behalf Of > Chris Wilson > Sent: Tuesday, October 6, 2015 11:53 AM > To: intel-gfx@lists.freedesktop.org > Subject: [Intel-gfx] [PATCH 2/3] 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: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Thomas Daniel <thomas.daniel@intel.com>
Hi, On 06/10/15 14:57, Daniel, Thomas wrote: >> -----Original Message----- >> From: Intel-gfx [mailto:intel-gfx-bounces@lists.freedesktop.org] On Behalf Of >> Chris Wilson >> Sent: Tuesday, October 6, 2015 11:53 AM >> To: intel-gfx@lists.freedesktop.org >> Subject: [Intel-gfx] [PATCH 2/3] 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: Chris Wilson <chris@chris-wilson.co.uk> > > Reviewed-by: Thomas Daniel <thomas.daniel@intel.com> There is no IGT coverage for this and it is quite a big change so I think we really need some. Regards, Tvrtko
diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c index a01c1ebe47ca..19dd6b05ee1d 100644 --- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c +++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c @@ -1033,18 +1033,13 @@ static struct intel_context * i915_gem_validate_context(struct drm_device *dev, struct drm_file *file, struct intel_engine_cs *ring, const u32 ctx_id) { - struct intel_context *ctx = NULL; - struct i915_ctx_hang_stats *hs; - - if (ring->id != RCS && ctx_id != DEFAULT_CONTEXT_HANDLE) - return ERR_PTR(-EINVAL); + struct intel_context *ctx; ctx = i915_gem_context_get(file->driver_priv, ctx_id); if (IS_ERR(ctx)) return ctx; - hs = &ctx->hang_stats; - if (hs->banned) { + if (ctx->hang_stats.banned) { DRM_DEBUG("Context %u tried to submit while banned\n", ctx_id); return ERR_PTR(-EIO); }
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: Chris Wilson <chris@chris-wilson.co.uk> --- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-)