* FAILED: patch "[PATCH] drm/i915/display: Flush the fbdev frontbuffer" failed to apply to 6.12-stable tree
@ 2026-12-02 10:26 gregkh
2026-12-04 0:25 ` [PATCH 6.12.y 1/2] drm/i915/display: fbdev: Move custom restore code to new callback Sasha Levin
0 siblings, 1 reply; 3+ messages in thread
From: gregkh @ 2026-12-02 10:26 UTC (permalink / raw)
To: jouni.hogander, joonas.lahtinen, maarten.lankhorst, mika.kahola,
stable
Cc: stable
The patch below does not apply to the 6.12-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.12.y
git checkout FETCH_HEAD
git cherry-pick -x f1f5942c3fdac3bb553d0019f60d11ca35f9b836
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable@vger.kernel.org>' --in-reply-to '2026120217-encore-strangle-1e1f@gregkh' --subject-prefix 'PATCH 6.12.y' 'HEAD^..'
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From f1f5942c3fdac3bb553d0019f60d11ca35f9b836 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:51 +0200
Subject: [PATCH] drm/i915/display: Flush the fbdev frontbuffer
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
fbdev invalidates on set_par, blank, pan_display and restore, but never
flushes. On i915, unrelated rendering may clear the bits; Xe has no
ORIGIN_CS invalidation, so PSR and FBC can remain disabled indefinitely.
Flush after these operations; they are already complete.
Fixes: 44e694958b95 ("drm/xe/display: Implement display support")
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: <stable@vger.kernel.org> # v6.8+
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-5-jouni.hogander@intel.com
(cherry picked from commit ab965cbc781e4f4f8f81e48d01e0a0d78c94d369)
Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
diff --git a/drivers/gpu/drm/i915/display/intel_fbdev.c b/drivers/gpu/drm/i915/display/intel_fbdev.c
index 219ee17de3f6..c09246a9865c 100644
--- a/drivers/gpu/drm/i915/display/intel_fbdev.c
+++ b/drivers/gpu/drm/i915/display/intel_fbdev.c
@@ -75,9 +75,10 @@ static struct intel_frontbuffer *to_frontbuffer(struct intel_fbdev *ifbdev)
return ifbdev->fb->frontbuffer;
}
-static void intel_fbdev_invalidate(struct intel_fbdev *ifbdev)
+/* The console operation has already completed, hence flush not invalidate. */
+static void intel_fbdev_flush(struct intel_fbdev *ifbdev)
{
- intel_frontbuffer_invalidate(to_frontbuffer(ifbdev), ORIGIN_CPU);
+ intel_frontbuffer_flush(to_frontbuffer(ifbdev), ORIGIN_CPU);
}
FB_GEN_DEFAULT_DEFERRED_IOMEM_OPS(intel_fbdev,
@@ -91,7 +92,7 @@ static int intel_fbdev_set_par(struct fb_info *info)
ret = drm_fb_helper_set_par(info);
if (ret == 0)
- intel_fbdev_invalidate(ifbdev);
+ intel_fbdev_flush(ifbdev);
return ret;
}
@@ -103,7 +104,7 @@ static int intel_fbdev_blank(int blank, struct fb_info *info)
ret = drm_fb_helper_blank(blank, info);
if (ret == 0)
- intel_fbdev_invalidate(ifbdev);
+ intel_fbdev_flush(ifbdev);
return ret;
}
@@ -116,7 +117,7 @@ static int intel_fbdev_pan_display(struct fb_var_screeninfo *var,
ret = drm_fb_helper_pan_display(var, info);
if (ret == 0)
- intel_fbdev_invalidate(ifbdev);
+ intel_fbdev_flush(ifbdev);
return ret;
}
@@ -180,7 +181,7 @@ static void intelfb_restore(struct drm_fb_helper *fb_helper)
{
struct intel_fbdev *ifbdev = to_intel_fbdev(fb_helper);
- intel_fbdev_invalidate(ifbdev);
+ intel_fbdev_flush(ifbdev);
}
static void intelfb_set_suspend(struct drm_fb_helper *fb_helper, bool suspend)
^ permalink raw reply related [flat|nested] 3+ messages in thread* [PATCH 6.12.y 1/2] drm/i915/display: fbdev: Move custom restore code to new callback
2026-12-02 10:26 FAILED: patch "[PATCH] drm/i915/display: Flush the fbdev frontbuffer" failed to apply to 6.12-stable tree gregkh
@ 2026-12-04 0:25 ` Sasha Levin
2026-12-04 0:25 ` [PATCH 6.12.y 2/2] drm/i915/display: Flush the fbdev frontbuffer Sasha Levin
0 siblings, 1 reply; 3+ messages in thread
From: Sasha Levin @ 2026-12-04 0:25 UTC (permalink / raw)
To: stable; +Cc: Thomas Zimmermann, Maarten Lankhorst, Maarten Lankhorst,
Sasha Levin
From: Thomas Zimmermann <tzimmermann@suse.de>
[ Upstream commit 2ef5754c9649151ce438c9b30ec720840762d2a2 ]
i915's fbdev contains code for restoring the client's framebuffer. It
is specific to i195 and cannot be ported to the common fbdev client.
Introduce the callback struct drm_fb_helper.fb_restore and implement
it for i915. The fbdev helpers invoke the callback after restoring the
fbdev client.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241212170913.185939-6-tzimmermann@suse.de
Signed-off-by: Maarten Lankhorst <dev@lankhorst.se>
Stable-dep-of: f1f5942c3fda ("drm/i915/display: Flush the fbdev frontbuffer")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/gpu/drm/drm_fb_helper.c | 3 +++
drivers/gpu/drm/i915/display/intel_fbdev.c | 10 ++++++++--
include/drm/drm_fb_helper.h | 13 +++++++++++++
3 files changed, 24 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index 2790c594744f8..889089a4b5248 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -243,6 +243,9 @@ __drm_fb_helper_restore_fbdev_mode_unlocked(struct drm_fb_helper *fb_helper,
if (do_delayed)
drm_fb_helper_hotplug_event(fb_helper);
+ if (fb_helper->funcs->fb_restore)
+ fb_helper->funcs->fb_restore(fb_helper);
+
return ret;
}
diff --git a/drivers/gpu/drm/i915/display/intel_fbdev.c b/drivers/gpu/drm/i915/display/intel_fbdev.c
index d0074bd597bf6..780d44a8228c0 100644
--- a/drivers/gpu/drm/i915/display/intel_fbdev.c
+++ b/drivers/gpu/drm/i915/display/intel_fbdev.c
@@ -286,9 +286,17 @@ static int intelfb_dirty(struct drm_fb_helper *helper, struct drm_clip_rect *cli
return 0;
}
+static void intelfb_restore(struct drm_fb_helper *fb_helper)
+{
+ struct intel_fbdev *ifbdev = to_intel_fbdev(fb_helper);
+
+ intel_fbdev_invalidate(ifbdev);
+}
+
static const struct drm_fb_helper_funcs intel_fb_helper_funcs = {
.fb_probe = intelfb_create,
.fb_dirty = intelfb_dirty,
+ .fb_restore = intelfb_restore,
};
/*
@@ -570,8 +578,6 @@ static int intel_fbdev_restore_mode(struct drm_i915_private *dev_priv, bool forc
if (ret)
return ret;
- intel_fbdev_invalidate(ifbdev);
-
return 0;
}
diff --git a/include/drm/drm_fb_helper.h b/include/drm/drm_fb_helper.h
index f80abb89bad16..470f6eea91846 100644
--- a/include/drm/drm_fb_helper.h
+++ b/include/drm/drm_fb_helper.h
@@ -99,6 +99,19 @@ struct drm_fb_helper_funcs {
* 0 on success, or an error code otherwise.
*/
int (*fb_dirty)(struct drm_fb_helper *helper, struct drm_clip_rect *clip);
+
+ /**
+ * @fb_restore:
+ *
+ * Driver callback to restore internal fbdev state. If set, fbdev
+ * emulation will invoke this callback after restoring the display
+ * mode.
+ *
+ * Only for i915. Do not use in new code.
+ *
+ * TODO: Fix i915 to not require this callback.
+ */
+ void (*fb_restore)(struct drm_fb_helper *helper);
};
/**
--
2.53.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* [PATCH 6.12.y 2/2] drm/i915/display: Flush the fbdev frontbuffer
2026-12-04 0:25 ` [PATCH 6.12.y 1/2] drm/i915/display: fbdev: Move custom restore code to new callback Sasha Levin
@ 2026-12-04 0:25 ` Sasha Levin
0 siblings, 0 replies; 3+ messages in thread
From: Sasha Levin @ 2026-12-04 0:25 UTC (permalink / raw)
To: stable
Cc: Jouni Högander, Maarten Lankhorst, Mika Kahola,
Joonas Lahtinen, Sasha Levin
From: Jouni Högander <jouni.hogander@intel.com>
[ Upstream commit f1f5942c3fdac3bb553d0019f60d11ca35f9b836 ]
fbdev invalidates on set_par, blank, pan_display and restore, but never
flushes. On i915, unrelated rendering may clear the bits; Xe has no
ORIGIN_CS invalidation, so PSR and FBC can remain disabled indefinitely.
Flush after these operations; they are already complete.
Fixes: 44e694958b95 ("drm/xe/display: Implement display support")
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: <stable@vger.kernel.org> # v6.8+
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-5-jouni.hogander@intel.com
(cherry picked from commit ab965cbc781e4f4f8f81e48d01e0a0d78c94d369)
Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/gpu/drm/i915/display/intel_fbdev.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_fbdev.c b/drivers/gpu/drm/i915/display/intel_fbdev.c
index 780d44a8228c0..1572c64da7e5d 100644
--- a/drivers/gpu/drm/i915/display/intel_fbdev.c
+++ b/drivers/gpu/drm/i915/display/intel_fbdev.c
@@ -80,9 +80,10 @@ static struct intel_frontbuffer *to_frontbuffer(struct intel_fbdev *ifbdev)
return ifbdev->fb->frontbuffer;
}
-static void intel_fbdev_invalidate(struct intel_fbdev *ifbdev)
+/* The console operation has already completed, hence flush not invalidate. */
+static void intel_fbdev_flush(struct intel_fbdev *ifbdev)
{
- intel_frontbuffer_invalidate(to_frontbuffer(ifbdev), ORIGIN_CPU);
+ intel_frontbuffer_flush(to_frontbuffer(ifbdev), ORIGIN_CPU);
}
FB_GEN_DEFAULT_DEFERRED_IOMEM_OPS(intel_fbdev,
@@ -96,7 +97,7 @@ static int intel_fbdev_set_par(struct fb_info *info)
ret = drm_fb_helper_set_par(info);
if (ret == 0)
- intel_fbdev_invalidate(ifbdev);
+ intel_fbdev_flush(ifbdev);
return ret;
}
@@ -108,7 +109,7 @@ static int intel_fbdev_blank(int blank, struct fb_info *info)
ret = drm_fb_helper_blank(blank, info);
if (ret == 0)
- intel_fbdev_invalidate(ifbdev);
+ intel_fbdev_flush(ifbdev);
return ret;
}
@@ -121,7 +122,7 @@ static int intel_fbdev_pan_display(struct fb_var_screeninfo *var,
ret = drm_fb_helper_pan_display(var, info);
if (ret == 0)
- intel_fbdev_invalidate(ifbdev);
+ intel_fbdev_flush(ifbdev);
return ret;
}
@@ -290,7 +291,7 @@ static void intelfb_restore(struct drm_fb_helper *fb_helper)
{
struct intel_fbdev *ifbdev = to_intel_fbdev(fb_helper);
- intel_fbdev_invalidate(ifbdev);
+ intel_fbdev_flush(ifbdev);
}
static const struct drm_fb_helper_funcs intel_fb_helper_funcs = {
--
2.53.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-12-04 0:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-02 10:26 FAILED: patch "[PATCH] drm/i915/display: Flush the fbdev frontbuffer" failed to apply to 6.12-stable tree gregkh
2026-12-04 0:25 ` [PATCH 6.12.y 1/2] drm/i915/display: fbdev: Move custom restore code to new callback Sasha Levin
2026-12-04 0:25 ` [PATCH 6.12.y 2/2] drm/i915/display: Flush the fbdev frontbuffer Sasha Levin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox