From: Jani Nikula <jani.nikula@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: jani.nikula@intel.com
Subject: [Intel-gfx] [PATCH 3/3] drm/i915/pmu: rearrange hrtimer pointer chasing
Date: Mon, 23 Oct 2023 18:02:56 +0300 [thread overview]
Message-ID: <20231023150256.438331-3-jani.nikula@intel.com> (raw)
In-Reply-To: <20231023150256.438331-1-jani.nikula@intel.com>
Do the logical step of first getting from struct hrtimer to struct
i915_pmu, and then from struct i915_pmu to struct drm_i915_private,
instead of hrtimer->i915->pmu.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
drivers/gpu/drm/i915/i915_pmu.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_pmu.c b/drivers/gpu/drm/i915/i915_pmu.c
index d45b40ec6d47..2a24eacd1b40 100644
--- a/drivers/gpu/drm/i915/i915_pmu.c
+++ b/drivers/gpu/drm/i915/i915_pmu.c
@@ -478,9 +478,8 @@ frequency_sample(struct intel_gt *gt, unsigned int period_ns)
static enum hrtimer_restart i915_sample(struct hrtimer *hrtimer)
{
- struct drm_i915_private *i915 =
- container_of(hrtimer, struct drm_i915_private, pmu.timer);
- struct i915_pmu *pmu = &i915->pmu;
+ struct i915_pmu *pmu = container_of(hrtimer, struct i915_pmu, timer);
+ struct drm_i915_private *i915 = pmu_to_i915(pmu);
unsigned int period_ns;
struct intel_gt *gt;
unsigned int i;
--
2.39.2
next prev parent reply other threads:[~2023-10-23 15:03 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-23 15:02 [Intel-gfx] [PATCH 1/3] drm/i915/pmu: add pmu_to_i915() helper Jani Nikula
2023-10-23 15:02 ` [Intel-gfx] [PATCH 2/3] drm/i915/pmu: add event_to_pmu() helper Jani Nikula
2023-10-24 12:29 ` Andi Shyti
2023-10-24 12:42 ` Jani Nikula
2023-10-25 10:20 ` Tvrtko Ursulin
2023-10-25 10:29 ` Andi Shyti
2023-10-26 10:22 ` Jani Nikula
2023-10-26 10:30 ` Tvrtko Ursulin
2023-10-26 10:36 ` Andi Shyti
2023-10-26 10:51 ` Tvrtko Ursulin
2023-10-26 10:58 ` Andi Shyti
2023-10-31 9:13 ` Jani Nikula
2023-10-24 12:43 ` [Intel-gfx] [PATCH v2] drm/i915/pmu: add perf_event_to_pmu() helper Jani Nikula
2023-10-23 15:02 ` Jani Nikula [this message]
2023-10-24 12:30 ` [Intel-gfx] [PATCH 3/3] drm/i915/pmu: rearrange hrtimer pointer chasing Andi Shyti
2023-10-24 12:25 ` [Intel-gfx] [PATCH 1/3] drm/i915/pmu: add pmu_to_i915() helper Andi Shyti
2023-10-25 0:09 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for series starting with [1/3] drm/i915/pmu: add pmu_to_i915() helper (rev2) Patchwork
2023-10-27 0:16 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for series starting with [1/3] drm/i915/pmu: add pmu_to_i915() helper (rev3) Patchwork
2023-10-27 19:35 ` [Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [1/3] drm/i915/pmu: add pmu_to_i915() helper (rev4) Patchwork
2023-10-30 4:48 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
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=20231023150256.438331-3-jani.nikula@intel.com \
--to=jani.nikula@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox