Re: [PATCH] drm/i915/perf: Refactor oa object to better manage resources

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, May 14, 2019 at 10:34:49AM +0100, Lionel Landwerlin wrote:
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?

v2 fixes only checkpatch warnings. it warned on use of BUG_ON. BUG_ON is intended to crash the system in severe cases where the driver/kernel is unusable. In this case, the mismatch between user passed information and exclusive_stream may not require a crash.
-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;
+	}
 	/*


_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux