Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Subject: [Intel-gfx] [PATCH] drm/i915: Let's avoid even early init if SLPC is used.
Date: Tue,  6 Sep 2022 16:33:49 -0400	[thread overview]
Message-ID: <20220906203349.177989-1-rodrigo.vivi@intel.com> (raw)

SLPC has its own waiboost variables and lock mechanism.
No need for these extra stuff, in special no need for the
timer.

v2: At early stages we can't use uc's 'uses' function, but the
    'wants' ones in order to make those decisions.

Cc: Ashutosh Dixit <ashutosh.dixit@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
---
 drivers/gpu/drm/i915/gt/intel_rps.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/gpu/drm/i915/gt/intel_rps.c b/drivers/gpu/drm/i915/gt/intel_rps.c
index 28b399fa1abe..f0c75f088c88 100644
--- a/drivers/gpu/drm/i915/gt/intel_rps.c
+++ b/drivers/gpu/drm/i915/gt/intel_rps.c
@@ -57,6 +57,13 @@ static bool rps_uses_slpc(struct intel_rps *rps)
 	return intel_uc_uses_guc_slpc(&gt->uc);
 }
 
+static bool rps_wants_slpc(struct intel_rps *rps)
+{
+	struct intel_gt *gt = rps_to_gt(rps);
+
+	return intel_uc_wants_guc_slpc(&gt->uc);
+}
+
 static u32 rps_pm_sanitize_mask(struct intel_rps *rps, u32 mask)
 {
 	return mask & ~rps->pm_intrmsk_mbz;
@@ -1955,6 +1962,9 @@ void gen5_rps_irq_handler(struct intel_rps *rps)
 
 void intel_rps_init_early(struct intel_rps *rps)
 {
+	if (rps_wants_slpc(rps))
+		return;
+
 	mutex_init(&rps->lock);
 	mutex_init(&rps->power.mutex);
 
-- 
2.37.2


             reply	other threads:[~2022-09-06 20:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-06 20:33 Rodrigo Vivi [this message]
2022-09-06 22:00 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915: Let's avoid even early init if SLPC is used Patchwork
2022-09-06 23:20 ` [Intel-gfx] [PATCH] " Dixit, Ashutosh

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=20220906203349.177989-1-rodrigo.vivi@intel.com \
    --to=rodrigo.vivi@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