[Intel-gfx] [PATCH] drm/i915/perf: Refactor oa object to better manage resources

Lionel Landwerlin lionel.g.landwerlin at intel.com
Tue May 14 09:34:49 UTC 2019


Hi Umesh,

I just noticed this different between v1 & v2.
My understanding is that if destroy() is called, stream should be the 
same as dev_priv->perf.exclusive_stream.
If it's not it sounds like a bug. So why change this?

-Lionel

On 03/05/2019 00:13, Umesh Nerlige Ramappa wrote:
>   static void i915_oa_stream_destroy(struct i915_perf_stream *stream)
>   {
>   	struct drm_i915_private *dev_priv = stream->dev_priv;
>   
> -	BUG_ON(stream != dev_priv->perf.oa.exclusive_stream);
> +	if (stream != dev_priv->perf.exclusive_stream) {
> +		WARN_ON_ONCE(stream != dev_priv->perf.exclusive_stream);
> +		return;
> +	}
>   
>   	/*




More information about the Intel-gfx mailing list