diff mbox

[3/3] drm/i915: Allow contexts to be specified for unsupported rings

Message ID 1372175222-27622-3-git-send-email-mika.kuoppala@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Mika Kuoppala June 25, 2013, 3:47 p.m. UTC
From: Chris Wilson <chris@chris-wilson.co.uk>

As our contexts are more general than the logical contexts supported by
the hardware, for instance they allow per context hangcheck tracking, it
is beneficial to group tasks across rings belonging to the same context.
Context switching is already a no-op for unsupported rings, we just
suffered from a little too overzealous parameter checking on entry - now
we just check that the context is valid.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
---
 drivers/gpu/drm/i915/i915_gem_execbuffer.c |   15 ---------------
 1 file changed, 15 deletions(-)

Comments

Chris Wilson June 25, 2013, 4:10 p.m. UTC | #1
On Tue, Jun 25, 2013 at 06:47:02PM +0300, Mika Kuoppala wrote:
> From: Chris Wilson <chris@chris-wilson.co.uk>
> 
> As our contexts are more general than the logical contexts supported by
> the hardware, for instance they allow per context hangcheck tracking, it
> is beneficial to group tasks across rings belonging to the same context.
> Context switching is already a no-op for unsupported rings, we just
> suffered from a little too overzealous parameter checking on entry - now
> we just check that the context is valid.

We have to drop this temporarily as the validation was being provided by
i915_gem_context_get_hang_stats(), which is now notably absent.
-Chris
Ben Widawsky July 1, 2013, 5:02 a.m. UTC | #2
On Tue, Jun 25, 2013 at 05:10:42PM +0100, Chris Wilson wrote:
> On Tue, Jun 25, 2013 at 06:47:02PM +0300, Mika Kuoppala wrote:
> > From: Chris Wilson <chris@chris-wilson.co.uk>
> > 
> > As our contexts are more general than the logical contexts supported by
> > the hardware, for instance they allow per context hangcheck tracking, it
> > is beneficial to group tasks across rings belonging to the same context.
> > Context switching is already a no-op for unsupported rings, we just
> > suffered from a little too overzealous parameter checking on entry - now
> > we just check that the context is valid.
> 
> We have to drop this temporarily as the validation was being provided by
> i915_gem_context_get_hang_stats(), which is now notably absent.
> -Chris
> 
> -- 
> Chris Wilson, Intel Open Source Technology Centre

I haven't been actively reading the list recently, but I have this same
patch in the PPGTT series. I'll make sure I get it upstream in my series
if you guys are okay with dropping it here.
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
index b6b47d6..5c237f3 100644
--- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c
+++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
@@ -872,27 +872,12 @@  i915_gem_do_execbuffer(struct drm_device *dev, void *data,
 		break;
 	case I915_EXEC_BSD:
 		ring = &dev_priv->ring[VCS];
-		if (ctx_id != DEFAULT_CONTEXT_ID) {
-			DRM_DEBUG("Ring %s doesn't support contexts\n",
-				  ring->name);
-			return -EPERM;
-		}
 		break;
 	case I915_EXEC_BLT:
 		ring = &dev_priv->ring[BCS];
-		if (ctx_id != DEFAULT_CONTEXT_ID) {
-			DRM_DEBUG("Ring %s doesn't support contexts\n",
-				  ring->name);
-			return -EPERM;
-		}
 		break;
 	case I915_EXEC_VEBOX:
 		ring = &dev_priv->ring[VECS];
-		if (ctx_id != DEFAULT_CONTEXT_ID) {
-			DRM_DEBUG("Ring %s doesn't support contexts\n",
-				  ring->name);
-			return -EPERM;
-		}
 		break;
 
 	default: