All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luca Coelho <luciano.coelho@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: intel-xe@lists.freedesktop.org, uma.shankar@intel.com,
	ville.syrjala@linux.intel.com, jani.nikula@intel.com
Subject: [PATCH v2 2/4] drm/i915/display: don't allow DMC wakelock on older hardware
Date: Thu, 14 Mar 2024 09:37:50 +0200	[thread overview]
Message-ID: <20240314073752.1245879-3-luciano.coelho@intel.com> (raw)
In-Reply-To: <20240314073752.1245879-1-luciano.coelho@intel.com>

Only allow running DMC wakelock code if the display version is 20 or
greater.

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 drivers/gpu/drm/i915/display/intel_dmc_wl.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/drivers/gpu/drm/i915/display/intel_dmc_wl.c b/drivers/gpu/drm/i915/display/intel_dmc_wl.c
index 7e5d325f5d55..6eea81a76fa4 100644
--- a/drivers/gpu/drm/i915/display/intel_dmc_wl.c
+++ b/drivers/gpu/drm/i915/display/intel_dmc_wl.c
@@ -120,6 +120,9 @@ void intel_dmc_wl_enable(struct drm_i915_private *i915)
 	struct intel_dmc_wl *wl = &i915->display.wl;
 	unsigned long flags;
 
+	if (DISPLAY_VER(i915) < 20)
+		return;
+
 	spin_lock_irqsave(&wl->lock, flags);
 
 	if (wl->enabled)
@@ -144,6 +147,9 @@ void intel_dmc_wl_disable(struct drm_i915_private *i915)
 	struct intel_dmc_wl *wl = &i915->display.wl;
 	unsigned long flags;
 
+	if (DISPLAY_VER(i915) < 20)
+		return;
+
 	flush_delayed_work(&wl->work);
 
 	spin_lock_irqsave(&wl->lock, flags);
@@ -173,6 +179,9 @@ void intel_dmc_wl_get(struct drm_i915_private *i915, i915_reg_t reg)
 	struct intel_dmc_wl *wl = &i915->display.wl;
 	unsigned long flags;
 
+	if (DISPLAY_VER(i915) < 20)
+		return;
+
 	if (!intel_dmc_wl_check_range(reg.reg))
 		return;
 
@@ -205,6 +214,9 @@ void intel_dmc_wl_put(struct drm_i915_private *i915, i915_reg_t reg)
 	struct intel_dmc_wl *wl = &i915->display.wl;
 	unsigned long flags;
 
+	if (DISPLAY_VER(i915) < 20)
+		return;
+
 	if (!intel_dmc_wl_check_range(reg.reg))
 		return;
 
-- 
2.39.2


  parent reply	other threads:[~2024-03-14  7:38 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-14  7:37 [PATCH v2 0/4] drm/i915/display: DMC wakelock implementation Luca Coelho
2024-03-14  7:37 ` [PATCH v2 1/4] drm/i915/display: add support for DMC wakelocks Luca Coelho
2024-03-14  7:37 ` Luca Coelho [this message]
2024-03-14  7:37 ` [PATCH v2 3/4] drm/i915/display: add module parameter to enable DMC wakelock Luca Coelho
2024-03-14  7:37 ` [PATCH v2 4/4] drm/i915/display: tie DMC wakelock to DC5/6 state transitions Luca Coelho
2024-03-14  7:43 ` ✓ CI.Patch_applied: success for drm/i915/display: DMC wakelock implementation (rev3) Patchwork
2024-03-14  7:44 ` ✗ CI.checkpatch: warning " Patchwork
2024-03-14  7:44 ` ✓ CI.KUnit: success " Patchwork
2024-03-14  7:55 ` ✓ CI.Build: " Patchwork
2024-03-14  7:58 ` ✓ CI.Hooks: " Patchwork
2024-03-14  7:59 ` ✗ CI.checksparse: warning " Patchwork
2024-03-14  8:27 ` ✗ CI.BAT: failure " Patchwork
2024-03-14  8:38 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915/display: DMC wakelock implementation Patchwork
2024-03-14  8:38 ` ✗ Fi.CI.SPARSE: " Patchwork
2024-03-14  8:57 ` ✓ Fi.CI.BAT: success " Patchwork
2024-03-15  1:32 ` ✗ 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=20240314073752.1245879-3-luciano.coelho@intel.com \
    --to=luciano.coelho@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=jani.nikula@intel.com \
    --cc=uma.shankar@intel.com \
    --cc=ville.syrjala@linux.intel.com \
    /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.