[PATCH 08/26] drm/i915/perf: Replace global wakeref tracking with engine-pm
Timo Aaltonen
tjaalton at ubuntu.com
Tue May 5 08:32:21 UTC 2020
From: Chris Wilson <chris at chris-wilson.co.uk>
BugLink: https://bugs.launchpad.net/bugs/1871957
As we now have a specific engine to use OA on, exchange the top-level
runtime-pm wakeref with the engine-pm. This still results in the same
top-level runtime-pm, but with more nuances to keep the engine and its
gt awake.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191011190325.10979-1-chris@chris-wilson.co.uk
(cherry picked from commit a5efcde69b112d276416f8e6e5e9fd8ede13bfc5)
Signed-off-by: Timo Aaltonen <timo.aaltonen at canonical.com>
---
drivers/gpu/drm/i915/i915_perf.c | 8 ++++----
drivers/gpu/drm/i915/i915_perf_types.h | 6 ------
2 files changed, 4 insertions(+), 10 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_perf.c b/drivers/gpu/drm/i915/i915_perf.c
index 8c8e6c6ab4e0..e75e5e9c8c06 100644
--- a/drivers/gpu/drm/i915/i915_perf.c
+++ b/drivers/gpu/drm/i915/i915_perf.c
@@ -196,7 +196,7 @@
#include <linux/uuid.h>
#include "gem/i915_gem_context.h"
-#include "gem/i915_gem_pm.h"
+#include "gt/intel_engine_pm.h"
#include "gt/intel_engine_user.h"
#include "gt/intel_lrc_reg.h"
@@ -1377,7 +1377,7 @@ static void i915_oa_stream_destroy(struct i915_perf_stream *stream)
free_oa_buffer(stream);
intel_uncore_forcewake_put(stream->uncore, FORCEWAKE_ALL);
- intel_runtime_pm_put(stream->uncore->rpm, stream->wakeref);
+ intel_engine_pm_put(stream->engine);
if (stream->ctx)
oa_put_render_ctx_id(stream);
@@ -2243,7 +2243,7 @@ static int i915_oa_stream_init(struct i915_perf_stream *stream,
* In our case we are expecting that taking pm + FORCEWAKE
* references will effectively disable RC6.
*/
- stream->wakeref = intel_runtime_pm_get(stream->uncore->rpm);
+ intel_engine_pm_get(stream->engine);
intel_uncore_forcewake_get(stream->uncore, FORCEWAKE_ALL);
ret = alloc_oa_buffer(stream);
@@ -2285,7 +2285,7 @@ static int i915_oa_stream_init(struct i915_perf_stream *stream,
put_oa_config(stream->oa_config);
intel_uncore_forcewake_put(stream->uncore, FORCEWAKE_ALL);
- intel_runtime_pm_put(stream->uncore->rpm, stream->wakeref);
+ intel_engine_pm_put(stream->engine);
err_config:
if (stream->ctx)
diff --git a/drivers/gpu/drm/i915/i915_perf_types.h b/drivers/gpu/drm/i915/i915_perf_types.h
index a91ae2d1a543..eb8d1ebd5095 100644
--- a/drivers/gpu/drm/i915/i915_perf_types.h
+++ b/drivers/gpu/drm/i915/i915_perf_types.h
@@ -134,12 +134,6 @@ struct i915_perf_stream {
*/
struct intel_uncore *uncore;
- /**
- * @wakeref: As we keep the device awake while the perf stream is
- * active, we track our runtime pm reference for later release.
- */
- intel_wakeref_t wakeref;
-
/**
* @engine: Engine associated with this performance stream.
*/
--
2.25.1
More information about the kernel-team
mailing list