* FAILED: patch "[PATCH] drm/i915/psr: Clear CFF state on flip flush" failed to apply to 6.18-stable tree
@ 2026-12-02 10:27 gregkh
2026-12-04 0:27 ` [PATCH 6.18.y] drm/i915/psr: Clear CFF state on flip flush Sasha Levin
0 siblings, 1 reply; 2+ messages in thread
From: gregkh @ 2026-12-02 10:27 UTC (permalink / raw)
To: jouni.hogander, joonas.lahtinen, mika.kahola, stable; +Cc: stable
The patch below does not apply to the 6.18-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable@vger.kernel.org>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.18.y
git checkout FETCH_HEAD
git cherry-pick -x 9bf9ced37e60a6c947a481385cd9ed919f14cf36
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable@vger.kernel.org>' --in-reply-to '2026120246-vastness-cider-e4e5@gregkh' --subject-prefix 'PATCH 6.18.y' 'HEAD^..'
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 9bf9ced37e60a6c947a481385cd9ed919f14cf36 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jouni=20H=C3=B6gander?= <jouni.hogander@intel.com>
Date: Mon, 2 Nov 2026 12:00:50 +0200
Subject: [PATCH] drm/i915/psr: Clear CFF state on flip flush
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
An ORIGIN_FLIP flush can clear the last busy frontbuffer bits without
running _psr_flush_handle(), leaving the CFF state flag set.
Clear CFF state when no frontbuffer bits remain busy, and queue PSR
work only when inactive and not paused.
Fixes: 805f04d42a6b ("drm/i915/display/psr: Use continuos full frame to handle frontbuffer invalidations")
Cc: <stable@vger.kernel.org> # v5.19+
Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
Link: https://patch.msgid.link/20261102100051.272137-4-jouni.hogander@intel.com
(cherry picked from commit 233e3453eb705c0434f6f8467f211f0250c5832b)
Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c
index 5bb9432e8deb..0ae347fe6cd1 100644
--- a/drivers/gpu/drm/i915/display/intel_psr.c
+++ b/drivers/gpu/drm/i915/display/intel_psr.c
@@ -3645,12 +3645,6 @@ static void _psr_flush_handle(struct intel_dp *intel_dp)
intel_psr_exit(intel_dp);
} else if (intel_dp->psr.psr2_sel_fetch_enabled) {
/* Selective fetch prior LNL */
- if (intel_dp->psr.psr2_sel_fetch_cff_enabled) {
- /* can we turn CFF off? */
- if (intel_dp->psr.busy_frontbuffer_bits == 0)
- intel_dp->psr.psr2_sel_fetch_cff_enabled = false;
- }
-
/*
* Still keep cff bit enabled as we don't have proper SU
* configuration in case update is sent for any reason after
@@ -3707,13 +3701,8 @@ void intel_psr_flush(struct intel_display *display,
intel_dp->psr.busy_frontbuffer_bits &= ~pipe_frontbuffer_bits;
- /*
- * If the PSR is paused by an explicit intel_psr_paused() call,
- * we have to ensure that the PSR is not activated until
- * intel_psr_resume() is called.
- */
if (intel_dp->psr.pause_counter)
- goto unlock;
+ goto rearm;
if (origin == ORIGIN_FLIP || origin == ORIGIN_CURSOR_UPDATE)
psr2_dc3co_flush_locked(intel_dp, frontbuffer_bits);
@@ -3725,8 +3714,20 @@ void intel_psr_flush(struct intel_display *display,
_psr_flush_handle(intel_dp);
rearm:
- if (!intel_dp->psr.active && !intel_dp->psr.busy_frontbuffer_bits)
- queue_work(display->wq.unordered, &intel_dp->psr.work);
+ if (!intel_dp->psr.busy_frontbuffer_bits) {
+ if (intel_dp->psr.psr2_sel_fetch_cff_enabled)
+ intel_dp->psr.psr2_sel_fetch_cff_enabled = false;
+
+ /*
+ * If the PSR is paused by an explicit
+ * intel_psr_paused() call, we have to ensure that the
+ * PSR is not activated until intel_psr_resume() is
+ * called.
+ */
+ if (!intel_dp->psr.active && !intel_dp->psr.pause_counter)
+ queue_work(display->wq.unordered, &intel_dp->psr.work);
+ }
+
unlock:
mutex_unlock(&intel_dp->psr.lock);
}
^ permalink raw reply related [flat|nested] 2+ messages in thread* [PATCH 6.18.y] drm/i915/psr: Clear CFF state on flip flush
2026-12-02 10:27 FAILED: patch "[PATCH] drm/i915/psr: Clear CFF state on flip flush" failed to apply to 6.18-stable tree gregkh
@ 2026-12-04 0:27 ` Sasha Levin
0 siblings, 0 replies; 2+ messages in thread
From: Sasha Levin @ 2026-12-04 0:27 UTC (permalink / raw)
To: stable; +Cc: Jouni Högander, Mika Kahola, Joonas Lahtinen, Sasha Levin
From: Jouni Högander <jouni.hogander@intel.com>
[ Upstream commit 9bf9ced37e60a6c947a481385cd9ed919f14cf36 ]
An ORIGIN_FLIP flush can clear the last busy frontbuffer bits without
running _psr_flush_handle(), leaving the CFF state flag set.
Clear CFF state when no frontbuffer bits remain busy, and queue PSR
work only when inactive and not paused.
Fixes: 805f04d42a6b ("drm/i915/display/psr: Use continuos full frame to handle frontbuffer invalidations")
Cc: <stable@vger.kernel.org> # v5.19+
Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
Link: https://patch.msgid.link/20261102100051.272137-4-jouni.hogander@intel.com
(cherry picked from commit 233e3453eb705c0434f6f8467f211f0250c5832b)
Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
[ sashal: Adapted the flush path to this tree's older layout by adding a rearm: label and moving the queue_work there, with flip and cursor branches jumping to it only when the flush touches this encoder's pipe. ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/gpu/drm/i915/display/intel_psr.c | 34 +++++++++++++-----------
1 file changed, 19 insertions(+), 15 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c
index ebade0f4e70ba..d3a5ab547b463 100644
--- a/drivers/gpu/drm/i915/display/intel_psr.c
+++ b/drivers/gpu/drm/i915/display/intel_psr.c
@@ -3502,12 +3502,6 @@ static void _psr_flush_handle(struct intel_dp *intel_dp)
if (DISPLAY_VER(display) < 20 && intel_dp->psr.psr2_sel_fetch_enabled) {
/* Selective fetch prior LNL */
- if (intel_dp->psr.psr2_sel_fetch_cff_enabled) {
- /* can we turn CFF off? */
- if (intel_dp->psr.busy_frontbuffer_bits == 0)
- intel_dp->psr.psr2_sel_fetch_cff_enabled = false;
- }
-
/*
* Still keep cff bit enabled as we don't have proper SU
* configuration in case update is sent for any reason after
@@ -3531,9 +3525,6 @@ static void _psr_flush_handle(struct intel_dp *intel_dp)
/* Selective update LNL onwards */
intel_psr_exit(intel_dp);
}
-
- if (!intel_dp->psr.active && !intel_dp->psr.busy_frontbuffer_bits)
- queue_work(display->wq.unordered, &intel_dp->psr.work);
}
/**
@@ -3568,18 +3559,15 @@ void intel_psr_flush(struct intel_display *display,
INTEL_FRONTBUFFER_ALL_MASK(intel_dp->psr.pipe);
intel_dp->psr.busy_frontbuffer_bits &= ~pipe_frontbuffer_bits;
- /*
- * If the PSR is paused by an explicit intel_psr_paused() call,
- * we have to ensure that the PSR is not activated until
- * intel_psr_resume() is called.
- */
if (intel_dp->psr.pause_counter)
- goto unlock;
+ goto rearm;
if (origin == ORIGIN_FLIP ||
(origin == ORIGIN_CURSOR_UPDATE &&
!intel_dp->psr.psr2_sel_fetch_enabled)) {
tgl_dc3co_flush_locked(intel_dp, frontbuffer_bits, origin);
+ if (pipe_frontbuffer_bits)
+ goto rearm;
goto unlock;
}
@@ -3588,6 +3576,22 @@ void intel_psr_flush(struct intel_display *display,
/* By definition flush = invalidate + flush */
_psr_flush_handle(intel_dp);
+
+rearm:
+ if (!intel_dp->psr.busy_frontbuffer_bits) {
+ if (intel_dp->psr.psr2_sel_fetch_cff_enabled)
+ intel_dp->psr.psr2_sel_fetch_cff_enabled = false;
+
+ /*
+ * If the PSR is paused by an explicit
+ * intel_psr_paused() call, we have to ensure that the
+ * PSR is not activated until intel_psr_resume() is
+ * called.
+ */
+ if (!intel_dp->psr.active && !intel_dp->psr.pause_counter)
+ queue_work(display->wq.unordered, &intel_dp->psr.work);
+ }
+
unlock:
mutex_unlock(&intel_dp->psr.lock);
}
--
2.53.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-12-04 0:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-02 10:27 FAILED: patch "[PATCH] drm/i915/psr: Clear CFF state on flip flush" failed to apply to 6.18-stable tree gregkh
2026-12-04 0:27 ` [PATCH 6.18.y] drm/i915/psr: Clear CFF state on flip flush Sasha Levin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox