All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [CI 04/13] drm/i915/perf: store the associated engine of a stream
Date: Mon,  9 Sep 2019 11:22:36 +0300	[thread overview]
Message-ID: <20190909082245.27245-4-lionel.g.landwerlin@intel.com> (raw)
In-Reply-To: <20190909082245.27245-1-lionel.g.landwerlin@intel.com>

We'll use this information later to verify that a client trying to
reconfigure the stream does so on the right engine.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
---
 drivers/gpu/drm/i915/i915_drv.h  | 5 +++++
 drivers/gpu/drm/i915/i915_perf.c | 7 +++++++
 2 files changed, 12 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 75607450ba00..274a1193d4f0 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -1088,6 +1088,11 @@ struct i915_perf_stream {
 	 */
 	intel_wakeref_t wakeref;
 
+	/**
+	 * @engine: Engine associated with this performance stream.
+	 */
+	struct intel_engine_cs *engine;
+
 	/**
 	 * @sample_flags: Flags representing the `DRM_I915_PERF_PROP_SAMPLE_*`
 	 * properties given when opening a stream, representing the contents
diff --git a/drivers/gpu/drm/i915/i915_perf.c b/drivers/gpu/drm/i915/i915_perf.c
index d18cd332afb7..9d5a3522aa35 100644
--- a/drivers/gpu/drm/i915/i915_perf.c
+++ b/drivers/gpu/drm/i915/i915_perf.c
@@ -363,6 +363,8 @@ struct perf_open_properties {
 	int oa_format;
 	bool oa_periodic;
 	int oa_period_exponent;
+
+	struct intel_engine_cs *engine;
 };
 
 static enum hrtimer_restart oa_poll_check_timer_cb(struct hrtimer *hrtimer);
@@ -2201,6 +2203,8 @@ static int i915_oa_stream_init(struct i915_perf_stream *stream,
 
 	format_size = dev_priv->perf.oa_formats[props->oa_format].size;
 
+	stream->engine = props->engine;
+
 	stream->sample_flags |= SAMPLE_OA_REPORT;
 	stream->sample_size += format_size;
 
@@ -2843,6 +2847,9 @@ static int read_properties_unlocked(struct drm_i915_private *dev_priv,
 		return -EINVAL;
 	}
 
+	/* At the moment we only support using i915-perf on the RCS. */
+	props->engine = dev_priv->engine[RCS0];
+
 	/* Considering that ID = 0 is reserved and assuming that we don't
 	 * (currently) expect any configurations to ever specify duplicate
 	 * values for a particular property ID then the last _PROP_MAX value is
-- 
2.23.0

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

  parent reply	other threads:[~2019-09-09  8:22 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-09  8:22 [CI 01/13] drm/i915: introduce a mechanism to extend execbuf2 Lionel Landwerlin
2019-09-09  8:22 ` [CI 02/13] drm/i915: add syncobj timeline support Lionel Landwerlin
2019-09-09  8:22 ` [CI 03/13] drm/i915/perf: drop list of streams Lionel Landwerlin
2019-09-09  8:22 ` Lionel Landwerlin [this message]
2019-09-09  8:22 ` [CI 05/13] drm/i915/perf: introduce a versioning of the i915-perf uapi Lionel Landwerlin
2019-09-09  8:22 ` [CI 06/13] drm/i915/perf: move perf types to their own header Lionel Landwerlin
2019-09-09  8:22 ` [CI 07/13] drm/i915/perf: allow for CS OA configs to be created lazily Lionel Landwerlin
2019-09-09  8:22 ` [CI 08/13] drm/i915/perf: implement active wait for noa configurations Lionel Landwerlin
2019-09-09  8:22 ` [CI 09/13] drm/i915: add wait flags to i915_active_request_retire Lionel Landwerlin
2019-09-09  8:22 ` [CI 10/13] drm/i915/perf: execute OA configuration from command stream Lionel Landwerlin
2019-09-09  8:22 ` [CI 11/13] drm/i915: add a new perf configuration execbuf parameter Lionel Landwerlin
2019-09-09  8:22 ` [CI 12/13] drm/i915/perf: allow holding preemption on filtered ctx Lionel Landwerlin
2019-09-09  8:22 ` [CI 13/13] drm/i915: add support for perf configuration queries Lionel Landwerlin
2019-09-09  8:40 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [CI,01/13] drm/i915: introduce a mechanism to extend execbuf2 Patchwork
2019-09-09  8:48 ` ✗ Fi.CI.SPARSE: " Patchwork
2019-09-09  9:03 ` ✓ Fi.CI.BAT: success " Patchwork
2019-09-09 12:10 ` ✗ Fi.CI.IGT: failure " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2019-09-09  7:17 [CI 01/13] " Lionel Landwerlin
2019-09-09  7:18 ` [CI 04/13] drm/i915/perf: store the associated engine of a stream Lionel Landwerlin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190909082245.27245-4-lionel.g.landwerlin@intel.com \
    --to=lionel.g.landwerlin@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.