public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Mika Kuoppala <mika.kuoppala@linux.intel.com>
To: Matthew Auld <matthew.auld@intel.com>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915/perf: destroy stream on sample_flags	mismatch
Date: Tue, 28 Mar 2017 09:22:40 +0300	[thread overview]
Message-ID: <87lgrpx6mn.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <20170327203459.18398-1-matthew.auld@intel.com>

Matthew Auld <matthew.auld@intel.com> writes:

> If we were to ever encounter a sample_flags mismatch we need to ensure
> we destroy the stream when we bail.
>
> Fixes: d79651522e89 ("drm/i915: Enable i915 perf stream for Haswell OA unit")
> Signed-off-by: Matthew Auld <matthew.auld@intel.com>
> Cc: Robert Bragg <robert@sixbynine.org>

Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>

> ---
>  drivers/gpu/drm/i915/i915_perf.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_perf.c b/drivers/gpu/drm/i915/i915_perf.c
> index e52bc6a581e6..060b171480d5 100644
> --- a/drivers/gpu/drm/i915/i915_perf.c
> +++ b/drivers/gpu/drm/i915/i915_perf.c
> @@ -1705,7 +1705,7 @@ i915_perf_open_ioctl_locked(struct drm_i915_private *dev_priv,
>  	 */
>  	if (WARN_ON(stream->sample_flags != props->sample_flags)) {
>  		ret = -ENODEV;
> -		goto err_alloc;
> +		goto err_flags;
>  	}
>  
>  	list_add(&stream->link, &dev_priv->perf.streams);
> @@ -1728,6 +1728,7 @@ i915_perf_open_ioctl_locked(struct drm_i915_private *dev_priv,
>  
>  err_open:
>  	list_del(&stream->link);
> +err_flags:
>  	if (stream->ops->destroy)
>  		stream->ops->destroy(stream);
>  err_alloc:
> -- 
> 2.9.3
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2017-03-28  6:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-27 20:34 [PATCH] drm/i915/perf: destroy stream on sample_flags mismatch Matthew Auld
2017-03-27 21:59 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-03-28  6:22 ` Mika Kuoppala [this message]
2017-03-28  7:35 ` [PATCH] " Mika Kuoppala

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=87lgrpx6mn.fsf@gaia.fi.intel.com \
    --to=mika.kuoppala@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=matthew.auld@intel.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox