All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: akash.goel@intel.com
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v7] drm/i915: Support to enable TRTT on GEN9
Date: Fri, 18 Mar 2016 09:35:25 +0000	[thread overview]
Message-ID: <20160318093525.GA21717@nuc-i3427.alporthouse.com> (raw)
In-Reply-To: <1458290126-15242-1-git-send-email-akash.goel@intel.com>

On Fri, Mar 18, 2016 at 02:05:26PM +0530, akash.goel@intel.com wrote:
> @@ -974,6 +1108,13 @@ int i915_gem_context_setparam_ioctl(struct drm_device *dev, void *data,
>  		return PTR_ERR(ctx);
>  	}
>  
> +	/*
> +	 * Take a reference also, as in certain cases we have to release &
> +	 * reacquire the struct_mutex and we don't want the context to
> +	 * go away.
> +	 */
> +	i915_gem_context_reference(ctx);
> +
>  	switch (args->param) {
>  	case I915_CONTEXT_PARAM_BAN_PERIOD:
>  		if (args->size)
> @@ -992,10 +1133,14 @@ int i915_gem_context_setparam_ioctl(struct drm_device *dev, void *data,
>  			ctx->flags |= args->value ? CONTEXT_NO_ZEROMAP : 0;
>  		}
>  		break;
> +	case I915_CONTEXT_PARAM_TRTT:
> +		ret = intel_context_set_trtt(ctx, args);
> +		break;
>  	default:
>  		ret = -EINVAL;
>  		break;
>  	}
> +	i915_gem_context_unreference(ctx);
>  	mutex_unlock(&dev->struct_mutex);

Having applied the safety net with the nice comment to setparam, we
should do the same for getparam for consistency. It just makes it easier
for us to keep extending the ioctls in future.

With that,
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2016-03-18  9:35 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-09 11:30 [PATCH] drm/i915: Support to enable TRTT on GEN9 akash.goel
2016-01-10 17:39 ` Chris Wilson
2016-01-11  7:39   ` Goel, Akash
2016-01-11  8:49     ` Chris Wilson
2016-01-11 12:29       ` Goel, Akash
2016-01-22 15:34         ` [PATCH v2] " akash.goel
2016-01-22 15:33           ` kbuild test robot
2016-03-03  4:54           ` [PATCH v3] " akash.goel
2016-03-03  4:54             ` kbuild test robot
2016-03-09 11:30             ` [PATCH v4] " akash.goel
2016-03-09 12:04               ` Chris Wilson
2016-03-09 14:50                 ` Goel, Akash
2016-03-09 15:02                   ` Chris Wilson
2016-03-09 15:56                     ` Goel, Akash
2016-03-09 16:21                       ` Chris Wilson
2016-03-09 16:38                         ` Goel, Akash
2016-03-10  7:06                           ` [PATCH v5] " akash.goel
2016-03-10 16:09                             ` kbuild test robot
2016-03-11 11:50                             ` [PATCH v6] " akash.goel
2016-03-11 15:57                               ` kbuild test robot
2016-03-18  8:35                               ` [PATCH v7] " akash.goel
2016-03-18  9:35                                 ` Chris Wilson [this message]
2016-03-18 10:23                                   ` [PATCH v8] " akash.goel
2016-03-22  8:42                                     ` [PATCH v9] " akash.goel
2016-03-24 16:29                                       ` Gore, Tim
2016-03-24 16:36                                         ` Goel, Akash
2016-03-09 14:18               ` [PATCH v4] " kbuild test robot
2016-01-11 11:19 ` ✓ success: Fi.CI.BAT Patchwork
2016-01-22 15:44 ` ✗ Fi.CI.BAT: warning for drm/i915: Support to enable TRTT on GEN9 (rev2) Patchwork
2016-01-25 12:12 ` Patchwork
2016-01-25 12:14 ` ✓ Fi.CI.BAT: success " Patchwork
2016-03-03  6:42 ` ✗ Fi.CI.BAT: failure for drm/i915: Support to enable TRTT on GEN9 (rev3) Patchwork
2016-03-09 11:10 ` ✗ Fi.CI.BAT: failure for drm/i915: Support to enable TRTT on GEN9 (rev4) Patchwork
2016-03-10  7:10 ` ✗ Fi.CI.BAT: failure for drm/i915: Support to enable TRTT on GEN9 (rev5) Patchwork
2016-03-11 11:41 ` ✗ Fi.CI.BAT: failure for drm/i915: Support to enable TRTT on GEN9 (rev6) Patchwork
2016-03-18 12:45 ` ✗ Fi.CI.BAT: failure for drm/i915: Support to enable TRTT on GEN9 (rev8) Patchwork
2016-03-22 10:45 ` ✗ Fi.CI.BAT: failure for drm/i915: Support to enable TRTT on GEN9 (rev9) Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160318093525.GA21717@nuc-i3427.alporthouse.com \
    --to=chris@chris-wilson.co.uk \
    --cc=akash.goel@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.