* [PATCH] drm/i915/perf: destroy stream on sample_flags mismatch
@ 2017-03-27 20:34 Matthew Auld
2017-03-27 21:59 ` ✓ Fi.CI.BAT: success for " Patchwork
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Matthew Auld @ 2017-03-27 20:34 UTC (permalink / raw)
To: intel-gfx
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>
---
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* ✓ Fi.CI.BAT: success for drm/i915/perf: destroy stream on sample_flags mismatch
2017-03-27 20:34 [PATCH] drm/i915/perf: destroy stream on sample_flags mismatch Matthew Auld
@ 2017-03-27 21:59 ` Patchwork
2017-03-28 6:22 ` [PATCH] " Mika Kuoppala
2017-03-28 7:35 ` Mika Kuoppala
2 siblings, 0 replies; 4+ messages in thread
From: Patchwork @ 2017-03-27 21:59 UTC (permalink / raw)
To: Matthew Auld; +Cc: intel-gfx
== Series Details ==
Series: drm/i915/perf: destroy stream on sample_flags mismatch
URL : https://patchwork.freedesktop.org/series/21954/
State : success
== Summary ==
Series 21954v1 drm/i915/perf: destroy stream on sample_flags mismatch
https://patchwork.freedesktop.org/api/1.0/series/21954/revisions/1/mbox/
fi-bdw-5557u total:278 pass:267 dwarn:0 dfail:0 fail:0 skip:11 time: 454s
fi-bdw-gvtdvm total:278 pass:256 dwarn:8 dfail:0 fail:0 skip:14 time: 459s
fi-bsw-n3050 total:278 pass:239 dwarn:0 dfail:0 fail:0 skip:39 time: 584s
fi-bxt-j4205 total:278 pass:259 dwarn:0 dfail:0 fail:0 skip:19 time: 546s
fi-bxt-t5700 total:278 pass:258 dwarn:0 dfail:0 fail:0 skip:20 time: 593s
fi-byt-j1900 total:278 pass:251 dwarn:0 dfail:0 fail:0 skip:27 time: 508s
fi-byt-n2820 total:278 pass:247 dwarn:0 dfail:0 fail:0 skip:31 time: 503s
fi-hsw-4770 total:278 pass:262 dwarn:0 dfail:0 fail:0 skip:16 time: 437s
fi-hsw-4770r total:278 pass:262 dwarn:0 dfail:0 fail:0 skip:16 time: 435s
fi-ilk-650 total:278 pass:228 dwarn:0 dfail:0 fail:0 skip:50 time: 440s
fi-ivb-3520m total:278 pass:260 dwarn:0 dfail:0 fail:0 skip:18 time: 521s
fi-ivb-3770 total:278 pass:260 dwarn:0 dfail:0 fail:0 skip:18 time: 495s
fi-kbl-7500u total:278 pass:260 dwarn:0 dfail:0 fail:0 skip:18 time: 485s
fi-kbl-7560u total:278 pass:268 dwarn:0 dfail:0 fail:0 skip:10 time: 596s
fi-skl-6260u total:278 pass:268 dwarn:0 dfail:0 fail:0 skip:10 time: 484s
fi-skl-6700hq total:278 pass:261 dwarn:0 dfail:0 fail:0 skip:17 time: 598s
fi-skl-6700k total:278 pass:256 dwarn:4 dfail:0 fail:0 skip:18 time: 491s
fi-skl-6770hq total:278 pass:268 dwarn:0 dfail:0 fail:0 skip:10 time: 524s
fi-skl-gvtdvm total:278 pass:265 dwarn:0 dfail:0 fail:0 skip:13 time: 459s
fi-snb-2520m total:278 pass:250 dwarn:0 dfail:0 fail:0 skip:28 time: 546s
fi-snb-2600 total:278 pass:249 dwarn:0 dfail:0 fail:0 skip:29 time: 427s
c3ca5620be419c7e20c39d07f6cf7d1cb7c3bfc8 drm-tip: 2017y-03m-27d-20h-31m-03s UTC integration manifest
7d544d3 drm/i915/perf: destroy stream on sample_flags mismatch
== Logs ==
For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_4318/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/i915/perf: destroy stream on sample_flags mismatch
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
2017-03-28 7:35 ` Mika Kuoppala
2 siblings, 0 replies; 4+ messages in thread
From: Mika Kuoppala @ 2017-03-28 6:22 UTC (permalink / raw)
To: Matthew Auld, intel-gfx
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/i915/perf: destroy stream on sample_flags mismatch
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 ` [PATCH] " Mika Kuoppala
@ 2017-03-28 7:35 ` Mika Kuoppala
2 siblings, 0 replies; 4+ messages in thread
From: Mika Kuoppala @ 2017-03-28 7:35 UTC (permalink / raw)
To: Matthew Auld, intel-gfx
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>
Pushed, thanks for patch.
-Mika
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-03-28 7:36 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH] " Mika Kuoppala
2017-03-28 7:35 ` Mika Kuoppala
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox