From: Animesh Manna <animesh.manna@intel.com>
To: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org,
dri-devel@lists.freedesktop.org
Cc: "Animesh Manna" <animesh.manna@intel.com>,
"Jouni Högander" <jouni.hogander@intel.com>
Subject: [PATCH 3/8] drm/i915/alpm: Replace is_edp() with alpm_is_possible()
Date: Thu, 23 Oct 2025 14:11:42 +0530 [thread overview]
Message-ID: <20251023084147.572535-4-animesh.manna@intel.com> (raw)
In-Reply-To: <20251023084147.572535-1-animesh.manna@intel.com>
Add a separate alpm_is_possible() which will check for both edp and dp.
Cc: Jouni Högander <jouni.hogander@intel.com>
Signed-off-by: Animesh Manna <animesh.manna@intel.com>
---
drivers/gpu/drm/i915/display/intel_alpm.c | 16 +++++++++++++---
drivers/gpu/drm/i915/display/intel_alpm.h | 1 +
2 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_alpm.c b/drivers/gpu/drm/i915/display/intel_alpm.c
index 6372f533f65b..973791f8956c 100644
--- a/drivers/gpu/drm/i915/display/intel_alpm.c
+++ b/drivers/gpu/drm/i915/display/intel_alpm.c
@@ -41,6 +41,16 @@ bool intel_alpm_is_alpm_aux_less(struct intel_dp *intel_dp,
(crtc_state->has_lobf && intel_alpm_aux_less_wake_supported(intel_dp));
}
+bool intel_alpm_is_possible(struct intel_dp *intel_dp)
+{
+ struct intel_display *display = to_intel_display(intel_dp);
+
+ return (DISPLAY_VER(display) >= 12 && intel_dp->alpm_dpcd) ||
+ (DISPLAY_VER(display) >= 35 &&
+ intel_dp->lttpr_common_caps[DP_LTTPR_ALPM_CAPABILITIES -
+ DP_LT_TUNABLE_PHY_REPEATER_FIELD_DATA_STRUCTURE_REV]);
+}
+
void intel_alpm_init(struct intel_dp *intel_dp)
{
u8 dpcd;
@@ -265,7 +275,7 @@ void intel_alpm_lobf_compute_config(struct intel_dp *intel_dp,
if (intel_dp->alpm.sink_alpm_error)
return;
- if (!intel_dp_is_edp(intel_dp))
+ if (!intel_alpm_is_possible(intel_dp))
return;
if (DISPLAY_VER(display) < 20)
@@ -416,7 +426,7 @@ void intel_alpm_pre_plane_update(struct intel_atomic_state *state,
intel_dp = enc_to_intel_dp(encoder);
- if (!intel_dp_is_edp(intel_dp))
+ if (!intel_alpm_is_possible(intel_dp))
continue;
if (old_crtc_state->has_lobf) {
@@ -468,7 +478,7 @@ void intel_alpm_post_plane_update(struct intel_atomic_state *state,
intel_dp = enc_to_intel_dp(encoder);
- if (intel_dp_is_edp(intel_dp)) {
+ if (intel_alpm_is_possible(intel_dp)) {
intel_alpm_enable_sink(intel_dp, crtc_state);
intel_alpm_configure(intel_dp, crtc_state);
}
diff --git a/drivers/gpu/drm/i915/display/intel_alpm.h b/drivers/gpu/drm/i915/display/intel_alpm.h
index 53599b464dea..0c9972faa2e0 100644
--- a/drivers/gpu/drm/i915/display/intel_alpm.h
+++ b/drivers/gpu/drm/i915/display/intel_alpm.h
@@ -15,6 +15,7 @@ struct intel_connector;
struct intel_atomic_state;
struct intel_crtc;
+bool intel_alpm_is_possible(struct intel_dp *intel_dp);
void intel_alpm_init(struct intel_dp *intel_dp);
bool intel_alpm_compute_params(struct intel_dp *intel_dp,
struct intel_crtc_state *crtc_state);
--
2.29.0
next prev parent reply other threads:[~2025-10-23 9:09 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-23 8:41 [PATCH 0/8] Enable DP2.1 alpm Animesh Manna
2025-10-23 8:41 ` [PATCH 1/8] drm/i915/alpm: Add dpcd definition for DP2.1 alpm capability Animesh Manna
2025-10-23 8:41 ` [PATCH 2/8] drm/i915/alpm: alpm_init() for DP2.1 Animesh Manna
2025-10-23 9:14 ` Jani Nikula
2025-10-23 8:41 ` Animesh Manna [this message]
2025-10-23 9:22 ` [PATCH 3/8] drm/i915/alpm: Replace is_edp() with alpm_is_possible() Jani Nikula
2025-10-23 8:41 ` [PATCH 4/8] drm/i915/alpm: Enable debugfs for DP2.1 Animesh Manna
2025-10-23 8:41 ` [PATCH 5/8] drm/i915/alpm: Auxless wake time calculation for Xe3p Animesh Manna
2025-10-23 9:29 ` Jani Nikula
2025-10-23 8:41 ` [PATCH 6/8] drm/i915/alpm: Half LFPS cycle calculation Animesh Manna
2025-10-23 9:31 ` Jani Nikula
2025-10-23 8:41 ` [PATCH 7/8] drm/i915/alpm: Introduce has_alpm to decouple from pr/psr2/lobf Animesh Manna
2025-10-23 8:41 ` [PATCH 8/8] drm/i915/alpm: Program lttpr count for DP 2.1 alpm Animesh Manna
2025-10-23 14:50 ` ✓ CI.KUnit: success for Enable DP2.1 alpm Patchwork
2025-10-23 15:06 ` ✗ CI.checksparse: warning " Patchwork
2025-10-23 15:43 ` ✓ Xe.CI.BAT: success " Patchwork
2025-10-24 0:30 ` ✗ Xe.CI.Full: 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=20251023084147.572535-4-animesh.manna@intel.com \
--to=animesh.manna@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=jouni.hogander@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox