From: Sasha Levin <sashal@kernel.org>
To: stable@vger.kernel.org
Cc: "Animesh Manna" <animesh.manna@intel.com>,
"Jouni Högander" <jouni.hogander@intel.com>,
"Sasha Levin" <sashal@kernel.org>
Subject: [PATCH 6.12.y 5/8] drm/i915/lobf: Disintegrate alpm_disable from psr_disable
Date: Tue, 17 Mar 2026 12:39:21 -0400 [thread overview]
Message-ID: <20260317163924.220634-5-sashal@kernel.org> (raw)
In-Reply-To: <20260317163924.220634-1-sashal@kernel.org>
From: Animesh Manna <animesh.manna@intel.com>
[ Upstream commit 504766382edb2a8babe030aad507965be1d632ee ]
Currently clearing of alpm registers is done through psr_disable()
which is always not correct, without psr also alpm can exist. So
dis-integrate alpm_disable() from psr_disable().
v1: Initial version.
v2:
- Remove h/w register read from alpm_disable(). [Jani]
Signed-off-by: Animesh Manna <animesh.manna@intel.com>
Reviewed-by: Jouni Högander <jouni.hogander@intel.com>
Link: https://lore.kernel.org/r/20250423092334.2294483-5-animesh.manna@intel.com
Stable-dep-of: eb4a7139e973 ("drm/i915/alpm: ALPM disable fixes")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/gpu/drm/i915/display/intel_alpm.c | 18 ++++++++++++++++++
drivers/gpu/drm/i915/display/intel_alpm.h | 1 +
drivers/gpu/drm/i915/display/intel_ddi.c | 2 ++
.../gpu/drm/i915/display/intel_display_types.h | 1 +
drivers/gpu/drm/i915/display/intel_psr.c | 11 -----------
5 files changed, 22 insertions(+), 11 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_alpm.c b/drivers/gpu/drm/i915/display/intel_alpm.c
index d256bb831b136..8f83dfb899308 100644
--- a/drivers/gpu/drm/i915/display/intel_alpm.c
+++ b/drivers/gpu/drm/i915/display/intel_alpm.c
@@ -363,6 +363,7 @@ void intel_alpm_configure(struct intel_dp *intel_dp,
const struct intel_crtc_state *crtc_state)
{
lnl_alpm_configure(intel_dp, crtc_state);
+ intel_dp->alpm_parameters.transcoder = crtc_state->cpu_transcoder;
}
void intel_alpm_post_plane_update(struct intel_atomic_state *state,
@@ -438,3 +439,20 @@ void intel_alpm_lobf_debugfs_add(struct intel_connector *connector)
debugfs_create_file("i915_edp_lobf_info", 0444, root,
connector, &i915_edp_lobf_info_fops);
}
+
+void intel_alpm_disable(struct intel_dp *intel_dp)
+{
+ struct intel_display *display = to_intel_display(intel_dp);
+ enum transcoder cpu_transcoder = intel_dp->alpm_parameters.transcoder;
+
+ if (DISPLAY_VER(display) < 20)
+ return;
+
+ intel_de_rmw(display, ALPM_CTL(display, cpu_transcoder),
+ ALPM_CTL_ALPM_ENABLE | ALPM_CTL_LOBF_ENABLE |
+ ALPM_CTL_ALPM_AUX_LESS_ENABLE, 0);
+
+ intel_de_rmw(display,
+ PORT_ALPM_CTL(cpu_transcoder),
+ PORT_ALPM_CTL_ALPM_AUX_LESS_ENABLE, 0);
+}
diff --git a/drivers/gpu/drm/i915/display/intel_alpm.h b/drivers/gpu/drm/i915/display/intel_alpm.h
index 2f862b0476a8a..91f51fb24f981 100644
--- a/drivers/gpu/drm/i915/display/intel_alpm.h
+++ b/drivers/gpu/drm/i915/display/intel_alpm.h
@@ -28,4 +28,5 @@ void intel_alpm_post_plane_update(struct intel_atomic_state *state,
void intel_alpm_lobf_debugfs_add(struct intel_connector *connector);
bool intel_alpm_aux_wake_supported(struct intel_dp *intel_dp);
bool intel_alpm_aux_less_wake_supported(struct intel_dp *intel_dp);
+void intel_alpm_disable(struct intel_dp *intel_dp);
#endif
diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c
index 5b24460c01341..6514ebbaf0025 100644
--- a/drivers/gpu/drm/i915/display/intel_ddi.c
+++ b/drivers/gpu/drm/i915/display/intel_ddi.c
@@ -34,6 +34,7 @@
#include "i915_drv.h"
#include "i915_reg.h"
#include "icl_dsi.h"
+#include "intel_alpm.h"
#include "intel_audio.h"
#include "intel_audio_regs.h"
#include "intel_backlight.h"
@@ -3423,6 +3424,7 @@ static void intel_disable_ddi_dp(struct intel_atomic_state *state,
intel_dp->link_trained = false;
intel_psr_disable(intel_dp, old_crtc_state);
+ intel_alpm_disable(intel_dp);
intel_edp_backlight_off(old_conn_state);
/* Disable the decompression in DP Sink */
intel_dp_sink_disable_decompression(state,
diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu/drm/i915/display/intel_display_types.h
index 9812191e7ef29..b6a388f5a7c8b 100644
--- a/drivers/gpu/drm/i915/display/intel_display_types.h
+++ b/drivers/gpu/drm/i915/display/intel_display_types.h
@@ -1906,6 +1906,7 @@ struct intel_dp {
struct {
u8 io_wake_lines;
u8 fast_wake_lines;
+ enum transcoder transcoder;
/* LNL and beyond */
u8 check_entry_lines;
diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c
index 855f22f1f8328..3a8da3dcab6d5 100644
--- a/drivers/gpu/drm/i915/display/intel_psr.c
+++ b/drivers/gpu/drm/i915/display/intel_psr.c
@@ -2108,17 +2108,6 @@ static void intel_psr_disable_locked(struct intel_dp *intel_dp)
if (intel_dp_is_edp(intel_dp))
intel_snps_phy_update_psr_power_state(&dp_to_dig_port(intel_dp)->base, false);
- /* Panel Replay on eDP is always using ALPM aux less. */
- if (intel_dp->psr.panel_replay_enabled && intel_dp_is_edp(intel_dp)) {
- intel_de_rmw(display, ALPM_CTL(display, cpu_transcoder),
- ALPM_CTL_ALPM_ENABLE |
- ALPM_CTL_ALPM_AUX_LESS_ENABLE, 0);
-
- intel_de_rmw(display,
- PORT_ALPM_CTL(cpu_transcoder),
- PORT_ALPM_CTL_ALPM_AUX_LESS_ENABLE, 0);
- }
-
/* Disable PSR on Sink */
if (!intel_dp->psr.panel_replay_enabled) {
drm_dp_dpcd_writeb(&intel_dp->aux, DP_PSR_EN_CFG, 0);
--
2.51.0
next prev parent reply other threads:[~2026-03-17 16:39 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-17 11:33 FAILED: patch "[PATCH] drm/i915/alpm: ALPM disable fixes" failed to apply to 6.12-stable tree gregkh
2026-03-17 16:39 ` [PATCH 6.12.y 1/8] drm/i915:Remove unused parameter in marco Sasha Levin
2026-03-17 16:39 ` [PATCH 6.12.y 2/8] drm/i915/display: Disable PSR before disabling VRR Sasha Levin
2026-03-17 16:39 ` [PATCH 6.12.y 3/8] drm/i915/display: Move intel_psr_post_plane_update() at the later Sasha Levin
2026-03-17 16:39 ` [PATCH 6.12.y 4/8] drm/i915/lobf: Add lobf enablement in post plane update Sasha Levin
2026-03-18 9:52 ` Hogander, Jouni
2026-03-17 16:39 ` Sasha Levin [this message]
2026-03-17 16:39 ` [PATCH 6.12.y 6/8] drm/i915/lobf: Update lobf if any change in dependent parameters Sasha Levin
2026-03-17 16:39 ` [PATCH 6.12.y 7/8] drm/i915/lobf: Add mutex for alpm update Sasha Levin
2026-03-17 16:39 ` [PATCH 6.12.y 8/8] drm/i915/alpm: ALPM disable fixes Sasha Levin
2026-03-18 11:50 ` [PATCH 6.12.y] " Jouni Högander
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=20260317163924.220634-5-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=animesh.manna@intel.com \
--cc=jouni.hogander@intel.com \
--cc=stable@vger.kernel.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.