diff mbox

[26/50] drm/i915/bdw: Allow non-default, non-render, user-created LRCs

Message ID 1399637360-4277-27-git-send-email-oscar.mateo@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

oscar.mateo@intel.com May 9, 2014, 12:08 p.m. UTC
From: Oscar Mateo <oscar.mateo@intel.com>

This commit changes the ABI, so it is provided separately so that it can be
dropped by the maintainer is so he wishes.

Signed-off-by: Oscar Mateo <oscar.mateo@intel.com>
---
 drivers/gpu/drm/i915/intel_lrc.c | 6 ------
 1 file changed, 6 deletions(-)

Comments

Daniel Vetter May 13, 2014, 1:35 p.m. UTC | #1
On Fri, May 09, 2014 at 01:08:56PM +0100, oscar.mateo@intel.com wrote:
> From: Oscar Mateo <oscar.mateo@intel.com>
> 
> This commit changes the ABI, so it is provided separately so that it can be
> dropped by the maintainer is so he wishes.
> 
> Signed-off-by: Oscar Mateo <oscar.mateo@intel.com>

This looks eerily like a patch from full-ppgtt that I've reverted,
originally authored by Ben ;-) Anyway now that we have per-file contexts I
think we can forgo this for now, since every open fd will get its own
per-ring implicit contxt for blt, vcs and vecs anyway.

And if we have a need for more contexts on those engines the usual rules
apply: I need a fully enabled open-source userspace implementation using
this new capability.
-Daniel

> ---
>  drivers/gpu/drm/i915/intel_lrc.c | 6 ------
>  1 file changed, 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
> index a656b48..0a944c2 100644
> --- a/drivers/gpu/drm/i915/intel_lrc.c
> +++ b/drivers/gpu/drm/i915/intel_lrc.c
> @@ -85,12 +85,6 @@ gen8_gem_validate_context(struct drm_device *dev, struct drm_file *file,
>  	struct i915_hw_context *ctx = NULL;
>  	struct i915_ctx_hang_stats *hs;
>  
> -	/* There is no reason why we cannot accept non-default, non-render contexts,
> -	 * other than it changes the ABI (these kind of custom contexts have not been
> -	 * allowed before) */
> -	if (ring->id != RCS && ctx_id != DEFAULT_CONTEXT_ID)
> -		return ERR_PTR(-EINVAL);
> -
>  	ctx = i915_gem_context_get(file->driver_priv, ctx_id);
>  	if (IS_ERR(ctx))
>  		return ctx;
> -- 
> 1.9.0
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
oscar.mateo@intel.com May 14, 2014, 11:38 a.m. UTC | #2
> -----Original Message-----
> From: Daniel Vetter [mailto:daniel.vetter@ffwll.ch] On Behalf Of Daniel Vetter
> Sent: Tuesday, May 13, 2014 2:36 PM
> To: Mateo Lozano, Oscar
> Cc: intel-gfx@lists.freedesktop.org
> Subject: Re: [Intel-gfx] [PATCH 26/50] drm/i915/bdw: Allow non-default, non-
> render, user-created LRCs
> 
> On Fri, May 09, 2014 at 01:08:56PM +0100, oscar.mateo@intel.com wrote:
> > From: Oscar Mateo <oscar.mateo@intel.com>
> >
> > This commit changes the ABI, so it is provided separately so that it
> > can be dropped by the maintainer is so he wishes.
> >
> > Signed-off-by: Oscar Mateo <oscar.mateo@intel.com>
> 
> This looks eerily like a patch from full-ppgtt that I've reverted, originally
> authored by Ben ;-) Anyway now that we have per-file contexts I think we can
> forgo this for now, since every open fd will get its own per-ring implicit contxt
> for blt, vcs and vecs anyway.
> 
> And if we have a need for more contexts on those engines the usual rules
> apply: I need a fully enabled open-source userspace implementation using this
> new capability.
> -Daniel

I know: I saw the patch and your revert, but I had to try anyway :)
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
index a656b48..0a944c2 100644
--- a/drivers/gpu/drm/i915/intel_lrc.c
+++ b/drivers/gpu/drm/i915/intel_lrc.c
@@ -85,12 +85,6 @@  gen8_gem_validate_context(struct drm_device *dev, struct drm_file *file,
 	struct i915_hw_context *ctx = NULL;
 	struct i915_ctx_hang_stats *hs;
 
-	/* There is no reason why we cannot accept non-default, non-render contexts,
-	 * other than it changes the ABI (these kind of custom contexts have not been
-	 * allowed before) */
-	if (ring->id != RCS && ctx_id != DEFAULT_CONTEXT_ID)
-		return ERR_PTR(-EINVAL);
-
 	ctx = i915_gem_context_get(file->driver_priv, ctx_id);
 	if (IS_ERR(ctx))
 		return ctx;