FAILED: patch "[PATCH] drm/i915: Hold RPM wakelock while initializing OA buffer" failed to apply to 4.13-stable tree
Subsystems (3)
[email protected]
maintainerThe patch below does not apply to the 4.13-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
Quoted 1 line
From
987f8c444aa2c33d98e7030d0c5f0a5325cc84eaMon Sep 17 00:00:00 2001
From: "[email protected]" <[email protected]>
Date: Tue, 27 Jun 2017 23:09:41 +0530
Subject: [PATCH] drm/i915: Hold RPM wakelock while initializing OA buffer
OA buffer initialization involves access to HW registers to set the OA base, head and tail. Ensure device is awake while setting these. With this, all oa.ops are covered under RPM and forcewake wakelock.
drivers/gpu/drm/i915/i915_perf.c +6 -6
@@ -2067,10 +2067,6 @@ static int i915_oa_stream_init(struct i915_perf_stream *stream,return ret; } - ret =alloc_oa_buffer (dev_priv); -if (ret) - goto err_oa_buf_alloc; -/* PRM - observability performance counters: * * OACONTROL, performance counter enable, note:
@@ -2086,6 +2082,10 @@ static int i915_oa_stream_init(struct i915_perf_stream *stream,intel_runtime_pm_get (dev_priv);intel_uncore_forcewake_get (dev_priv,FORCEWAKE_ALL ); + ret =alloc_oa_buffer (dev_priv); +if (ret) + goto err_oa_buf_alloc; + ret = dev_priv->perf.oa.ops.enable_metric_set (dev_priv);if (ret) goto err_enable;
@@ -2097,11 +2097,11 @@ static int i915_oa_stream_init(struct i915_perf_stream *stream,return 0 ; err_enable: -intel_uncore_forcewake_put (dev_priv,FORCEWAKE_ALL ); -intel_runtime_pm_put (dev_priv);free_oa_buffer (dev_priv); err_oa_buf_alloc: +intel_uncore_forcewake_put (dev_priv,FORCEWAKE_ALL ); +intel_runtime_pm_put (dev_priv);if (stream->ctx)oa_put_render_ctx_id (stream);
Hi Greg,
Something must have gone wrong with this patch.
Surprisingly it seem to be in 4.13 :
commit 04941829b0049d2446c7042ab9686dd057d809a6
Author: [email protected] <[email protected]> Date:�� Tue Jun 27 23:09:41 2017 +0530
��� drm/i915: Hold RPM wakelock while initializing OA buffer
Cheers,
-
Lionel
Quoted 70 lines · On 20/09/17 10:16, [email protected] wrote:
The patch below does not apply to the 4.13-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From
987f8c444aa2c33d98e7030d0c5f0a5325cc84eaMon Sep 17 00:00:00 2001
From: "[email protected]" <[email protected]>
Date: Tue, 27 Jun 2017 23:09:41 +0530
Subject: [PATCH] drm/i915: Hold RPM wakelock while initializing OA bufferOA buffer initialization involves access to HW registers to set the OA base, head and tail. Ensure device is awake while setting these. With this, all oa.ops are covered under RPM and forcewake wakelock.
Cc Lionel Landwerlin <[email protected]>Signed-off-by Sagar Arun Kamble <[email protected]>Reviewed-by Lionel Landwerlin <[email protected]>Signed-off-by Maarten Lankhorst <[email protected]>Fixes d79651522e89c ("drm/i915: Enable i915 perf stream for Haswell OA unit")Cc <[email protected]> # v4.11+drivers/gpu/drm/i915/i915_perf.c +6
-6@@ -2067,10 +2067,6 @@ static int i915_oa_stream_init(struct i915_perf_stream *stream,return ret; } - ret =alloc_oa_buffer (dev_priv); -if (ret) - goto err_oa_buf_alloc; -/* PRM - observability performance counters: * * OACONTROL, performance counter enable, note: @@ -2086,6 +2082,10 @@ static int i915_oa_stream_init(struct i915_perf_stream *stream,intel_runtime_pm_get (dev_priv);intel_uncore_forcewake_get (dev_priv,FORCEWAKE_ALL ); + ret =alloc_oa_buffer (dev_priv); +if (ret) + goto err_oa_buf_alloc; + ret = dev_priv->perf.oa.ops.enable_metric_set (dev_priv);if (ret) goto err_enable;@@ -2097,11 +2097,11 @@ static int i915_oa_stream_init(struct i915_perf_stream *stream,return 0 ; err_enable: -intel_uncore_forcewake_put (dev_priv,FORCEWAKE_ALL ); -intel_runtime_pm_put (dev_priv);free_oa_buffer (dev_priv); err_oa_buf_alloc: +intel_uncore_forcewake_put (dev_priv,FORCEWAKE_ALL ); +intel_runtime_pm_put (dev_priv);if (stream->ctx)oa_put_render_ctx_id (stream);