linux-postmarketos-stericsson: upgrade to 6.18.2
Tested and works on samsung-skomer. Signed-off-by: Stefan Hansson <newbyte@postmarketos.org> Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7660>
This commit is contained in:
parent
85a3bbfd5d
commit
5136e99a67
4 changed files with 976 additions and 274 deletions
|
|
@ -4,8 +4,8 @@
|
|||
_flavor="postmarketos-stericsson"
|
||||
_config="config-$_flavor.armv7"
|
||||
pkgname=linux-$_flavor
|
||||
pkgver=6.10.8
|
||||
pkgrel=2
|
||||
pkgver=6.18.2
|
||||
pkgrel=0
|
||||
pkgdesc="Mainline kernel for ST-Ericsson NovaThor devices"
|
||||
arch="armv7"
|
||||
_carch="arm"
|
||||
|
|
@ -38,7 +38,7 @@ source="
|
|||
https://cdn.kernel.org/pub/linux/kernel/v${_kernver%%.*}.x/linux-$_kernver.tar.xz
|
||||
config-$_flavor.armv7
|
||||
|
||||
make-new-commands-optional.patch
|
||||
drm-regressions.patch
|
||||
"
|
||||
builddir="$srcdir/linux-${_kernver//_/-}"
|
||||
|
||||
|
|
@ -67,7 +67,7 @@ package() {
|
|||
}
|
||||
|
||||
sha512sums="
|
||||
0829f6963a91cd230e33fa82605ff0b5b1b7c6f21192634f94a60185926c9b2eb12f3124693753c7da33cb6b15abe9146ec343c9bf7307156dd63c2fbc585f13 linux-6.10.8.tar.xz
|
||||
aaba9361986b8a798d8797b000b4175c46dbd5348f4df8f9deaa07af911482c89374db44683eb78571f649c34e19f80864a3c313c7ec6ff02cc4317db11c8517 config-postmarketos-stericsson.armv7
|
||||
9e474877e43f26b389c63436fdad2009fb80afd753fffe88104d8cfab67d97c65d8af08420d1739301461db3b03af3bb9fb5c40a691a675e9ab551fdd35724aa make-new-commands-optional.patch
|
||||
15989d1a26c6a5200b8eab4ba348b308466398aa75dda3844b37e7eb320206236d47c94cbc0e0b1d7ead10385ca84d34d0f2aa02ba5c1bd65ca6a5aa71c57117 linux-6.18.2.tar.xz
|
||||
7c9a0bafece9390e7af9b86835a216227ee2237bf8595f757c918a0fbf7a1836e3b41b35342eee19aa3205d6add972d7ab6361a45777a0632a342e47a88a7fc6 config-postmarketos-stericsson.armv7
|
||||
2ba9304f4f2d8578906017699255aadb10d1f0dc62704400632859b9bdad06a10c5837ce1a524813b1d205b33e8b5f7990038a700942e2ee728b79b7ecc45282 drm-regressions.patch
|
||||
"
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,493 @@
|
|||
From git@z Thu Jan 1 00:00:00 1970
|
||||
Subject: [PATCH v5 1/3] drm/atomic-helper: Export and namespace some
|
||||
functions
|
||||
From: Linus Walleij <linusw@kernel.org>
|
||||
Date: Sun, 30 Nov 2025 13:11:17 +0100
|
||||
Message-Id: <20251130-mcde-drm-regression-thirdfix-v5-1-aed71a32981d@kernel.org>
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
Content-Transfer-Encoding: 7bit
|
||||
|
||||
Export and namespace those not prefixed with drm_* so
|
||||
it becomes possible to write custom commit tail functions
|
||||
in individual drivers using the helper infrastructure.
|
||||
|
||||
Tested-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
|
||||
Signed-off-by: Linus Walleij <linusw@kernel.org>
|
||||
Reviewed-by: Maxime Ripard <mripard@kernel.org>
|
||||
Reviewed-by: Aradhya Bhatia <aradhya.bhatia@linux.dev>
|
||||
---
|
||||
drivers/gpu/drm/drm_atomic_helper.c | 122 +++++++++++++++++++++++++++++-------
|
||||
include/drm/drm_atomic_helper.h | 22 +++++++
|
||||
2 files changed, 121 insertions(+), 23 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
|
||||
index d5ebe6ea0acb..bfbe3a0ee178 100644
|
||||
--- a/drivers/gpu/drm/drm_atomic_helper.c
|
||||
+++ b/drivers/gpu/drm/drm_atomic_helper.c
|
||||
@@ -1162,8 +1162,18 @@ crtc_needs_disable(struct drm_crtc_state *old_state,
|
||||
new_state->self_refresh_active;
|
||||
}
|
||||
|
||||
-static void
|
||||
-encoder_bridge_disable(struct drm_device *dev, struct drm_atomic_state *state)
|
||||
+/**
|
||||
+ * drm_atomic_helper_commit_encoder_bridge_disable - disable bridges and encoder
|
||||
+ * @dev: DRM device
|
||||
+ * @state: the driver state object
|
||||
+ *
|
||||
+ * Loops over all connectors in the current state and if the CRTC needs
|
||||
+ * it, disables the bridge chain all the way, then disables the encoder
|
||||
+ * afterwards.
|
||||
+ */
|
||||
+void
|
||||
+drm_atomic_helper_commit_encoder_bridge_disable(struct drm_device *dev,
|
||||
+ struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_connector *connector;
|
||||
struct drm_connector_state *old_conn_state, *new_conn_state;
|
||||
@@ -1229,9 +1239,18 @@ encoder_bridge_disable(struct drm_device *dev, struct drm_atomic_state *state)
|
||||
}
|
||||
}
|
||||
}
|
||||
+EXPORT_SYMBOL(drm_atomic_helper_commit_encoder_bridge_disable);
|
||||
|
||||
-static void
|
||||
-crtc_disable(struct drm_device *dev, struct drm_atomic_state *state)
|
||||
+/**
|
||||
+ * drm_atomic_helper_commit_crtc_disable - disable CRTSs
|
||||
+ * @dev: DRM device
|
||||
+ * @state: the driver state object
|
||||
+ *
|
||||
+ * Loops over all CRTCs in the current state and if the CRTC needs
|
||||
+ * it, disables it.
|
||||
+ */
|
||||
+void
|
||||
+drm_atomic_helper_commit_crtc_disable(struct drm_device *dev, struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_crtc *crtc;
|
||||
struct drm_crtc_state *old_crtc_state, *new_crtc_state;
|
||||
@@ -1282,9 +1301,18 @@ crtc_disable(struct drm_device *dev, struct drm_atomic_state *state)
|
||||
drm_crtc_vblank_put(crtc);
|
||||
}
|
||||
}
|
||||
+EXPORT_SYMBOL(drm_atomic_helper_commit_crtc_disable);
|
||||
|
||||
-static void
|
||||
-encoder_bridge_post_disable(struct drm_device *dev, struct drm_atomic_state *state)
|
||||
+/**
|
||||
+ * drm_atomic_helper_commit_encoder_bridge_post_disable - post-disable encoder bridges
|
||||
+ * @dev: DRM device
|
||||
+ * @state: the driver state object
|
||||
+ *
|
||||
+ * Loops over all connectors in the current state and if the CRTC needs
|
||||
+ * it, post-disables all encoder bridges.
|
||||
+ */
|
||||
+void
|
||||
+drm_atomic_helper_commit_encoder_bridge_post_disable(struct drm_device *dev, struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_connector *connector;
|
||||
struct drm_connector_state *old_conn_state, *new_conn_state;
|
||||
@@ -1335,15 +1363,16 @@ encoder_bridge_post_disable(struct drm_device *dev, struct drm_atomic_state *sta
|
||||
drm_bridge_put(bridge);
|
||||
}
|
||||
}
|
||||
+EXPORT_SYMBOL(drm_atomic_helper_commit_encoder_bridge_post_disable);
|
||||
|
||||
static void
|
||||
disable_outputs(struct drm_device *dev, struct drm_atomic_state *state)
|
||||
{
|
||||
- encoder_bridge_disable(dev, state);
|
||||
+ drm_atomic_helper_commit_encoder_bridge_disable(dev, state);
|
||||
|
||||
- crtc_disable(dev, state);
|
||||
+ drm_atomic_helper_commit_crtc_disable(dev, state);
|
||||
|
||||
- encoder_bridge_post_disable(dev, state);
|
||||
+ drm_atomic_helper_commit_encoder_bridge_post_disable(dev, state);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1446,8 +1475,17 @@ void drm_atomic_helper_calc_timestamping_constants(struct drm_atomic_state *stat
|
||||
}
|
||||
EXPORT_SYMBOL(drm_atomic_helper_calc_timestamping_constants);
|
||||
|
||||
-static void
|
||||
-crtc_set_mode(struct drm_device *dev, struct drm_atomic_state *state)
|
||||
+/**
|
||||
+ * drm_atomic_helper_commit_crtc_set_mode - set the new mode
|
||||
+ * @dev: DRM device
|
||||
+ * @state: the driver state object
|
||||
+ *
|
||||
+ * Loops over all connectors in the current state and if the mode has
|
||||
+ * changed, change the mode of the CRTC, then call down the bridge
|
||||
+ * chain and change the mode in all bridges as well.
|
||||
+ */
|
||||
+void
|
||||
+drm_atomic_helper_commit_crtc_set_mode(struct drm_device *dev, struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_crtc *crtc;
|
||||
struct drm_crtc_state *new_crtc_state;
|
||||
@@ -1508,6 +1546,7 @@ crtc_set_mode(struct drm_device *dev, struct drm_atomic_state *state)
|
||||
drm_bridge_put(bridge);
|
||||
}
|
||||
}
|
||||
+EXPORT_SYMBOL(drm_atomic_helper_commit_crtc_set_mode);
|
||||
|
||||
/**
|
||||
* drm_atomic_helper_commit_modeset_disables - modeset commit to disable outputs
|
||||
@@ -1531,12 +1570,21 @@ void drm_atomic_helper_commit_modeset_disables(struct drm_device *dev,
|
||||
drm_atomic_helper_update_legacy_modeset_state(dev, state);
|
||||
drm_atomic_helper_calc_timestamping_constants(state);
|
||||
|
||||
- crtc_set_mode(dev, state);
|
||||
+ drm_atomic_helper_commit_crtc_set_mode(dev, state);
|
||||
}
|
||||
EXPORT_SYMBOL(drm_atomic_helper_commit_modeset_disables);
|
||||
|
||||
-static void drm_atomic_helper_commit_writebacks(struct drm_device *dev,
|
||||
- struct drm_atomic_state *state)
|
||||
+/**
|
||||
+ * drm_atomic_helper_commit_writebacks - issue writebacks
|
||||
+ * @dev: DRM device
|
||||
+ * @state: atomic state object being committed
|
||||
+ *
|
||||
+ * This loops over the connectors, checks if the new state requires
|
||||
+ * a writeback job to be issued and in that case issues an atomic
|
||||
+ * commit on each connector.
|
||||
+ */
|
||||
+void drm_atomic_helper_commit_writebacks(struct drm_device *dev,
|
||||
+ struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_connector *connector;
|
||||
struct drm_connector_state *new_conn_state;
|
||||
@@ -1555,9 +1603,18 @@ static void drm_atomic_helper_commit_writebacks(struct drm_device *dev,
|
||||
}
|
||||
}
|
||||
}
|
||||
+EXPORT_SYMBOL(drm_atomic_helper_commit_writebacks);
|
||||
|
||||
-static void
|
||||
-encoder_bridge_pre_enable(struct drm_device *dev, struct drm_atomic_state *state)
|
||||
+/**
|
||||
+ * drm_atomic_helper_commit_encoder_bridge_pre_enable - pre-enable bridges
|
||||
+ * @dev: DRM device
|
||||
+ * @state: atomic state object being committed
|
||||
+ *
|
||||
+ * This loops over the connectors and if the CRTC needs it, pre-enables
|
||||
+ * the entire bridge chain.
|
||||
+ */
|
||||
+void
|
||||
+drm_atomic_helper_commit_encoder_bridge_pre_enable(struct drm_device *dev, struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_connector *connector;
|
||||
struct drm_connector_state *new_conn_state;
|
||||
@@ -1588,9 +1645,18 @@ encoder_bridge_pre_enable(struct drm_device *dev, struct drm_atomic_state *state
|
||||
drm_bridge_put(bridge);
|
||||
}
|
||||
}
|
||||
+EXPORT_SYMBOL(drm_atomic_helper_commit_encoder_bridge_pre_enable);
|
||||
|
||||
-static void
|
||||
-crtc_enable(struct drm_device *dev, struct drm_atomic_state *state)
|
||||
+/**
|
||||
+ * drm_atomic_helper_commit_crtc_enable - enables the CRTCs
|
||||
+ * @dev: DRM device
|
||||
+ * @state: atomic state object being committed
|
||||
+ *
|
||||
+ * This loops over CRTCs in the new state, and of the CRTC needs
|
||||
+ * it, enables it.
|
||||
+ */
|
||||
+void
|
||||
+drm_atomic_helper_commit_crtc_enable(struct drm_device *dev, struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_crtc *crtc;
|
||||
struct drm_crtc_state *old_crtc_state;
|
||||
@@ -1619,9 +1685,18 @@ crtc_enable(struct drm_device *dev, struct drm_atomic_state *state)
|
||||
}
|
||||
}
|
||||
}
|
||||
+EXPORT_SYMBOL(drm_atomic_helper_commit_crtc_enable);
|
||||
|
||||
-static void
|
||||
-encoder_bridge_enable(struct drm_device *dev, struct drm_atomic_state *state)
|
||||
+/**
|
||||
+ * drm_atomic_helper_commit_encoder_bridge_enable - enables the bridges
|
||||
+ * @dev: DRM device
|
||||
+ * @state: atomic state object being committed
|
||||
+ *
|
||||
+ * This loops over all connectors in the new state, and of the CRTC needs
|
||||
+ * it, enables the entire bridge chain.
|
||||
+ */
|
||||
+void
|
||||
+drm_atomic_helper_commit_encoder_bridge_enable(struct drm_device *dev, struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_connector *connector;
|
||||
struct drm_connector_state *new_conn_state;
|
||||
@@ -1664,6 +1739,7 @@ encoder_bridge_enable(struct drm_device *dev, struct drm_atomic_state *state)
|
||||
drm_bridge_put(bridge);
|
||||
}
|
||||
}
|
||||
+EXPORT_SYMBOL(drm_atomic_helper_commit_encoder_bridge_enable);
|
||||
|
||||
/**
|
||||
* drm_atomic_helper_commit_modeset_enables - modeset commit to enable outputs
|
||||
@@ -1682,11 +1758,11 @@ encoder_bridge_enable(struct drm_device *dev, struct drm_atomic_state *state)
|
||||
void drm_atomic_helper_commit_modeset_enables(struct drm_device *dev,
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
- encoder_bridge_pre_enable(dev, state);
|
||||
+ drm_atomic_helper_commit_encoder_bridge_pre_enable(dev, state);
|
||||
|
||||
- crtc_enable(dev, state);
|
||||
+ drm_atomic_helper_commit_crtc_enable(dev, state);
|
||||
|
||||
- encoder_bridge_enable(dev, state);
|
||||
+ drm_atomic_helper_commit_encoder_bridge_enable(dev, state);
|
||||
|
||||
drm_atomic_helper_commit_writebacks(dev, state);
|
||||
}
|
||||
diff --git a/include/drm/drm_atomic_helper.h b/include/drm/drm_atomic_helper.h
|
||||
index 53382fe93537..9afc2e1e24c7 100644
|
||||
--- a/include/drm/drm_atomic_helper.h
|
||||
+++ b/include/drm/drm_atomic_helper.h
|
||||
@@ -60,6 +60,12 @@ int drm_atomic_helper_check_plane_state(struct drm_plane_state *plane_state,
|
||||
int drm_atomic_helper_check_planes(struct drm_device *dev,
|
||||
struct drm_atomic_state *state);
|
||||
int drm_atomic_helper_check_crtc_primary_plane(struct drm_crtc_state *crtc_state);
|
||||
+void drm_atomic_helper_commit_encoder_bridge_disable(struct drm_device *dev,
|
||||
+ struct drm_atomic_state *state);
|
||||
+void drm_atomic_helper_commit_crtc_disable(struct drm_device *dev,
|
||||
+ struct drm_atomic_state *state);
|
||||
+void drm_atomic_helper_commit_encoder_bridge_post_disable(struct drm_device *dev,
|
||||
+ struct drm_atomic_state *state);
|
||||
int drm_atomic_helper_check(struct drm_device *dev,
|
||||
struct drm_atomic_state *state);
|
||||
void drm_atomic_helper_commit_tail(struct drm_atomic_state *state);
|
||||
@@ -89,8 +95,24 @@ drm_atomic_helper_update_legacy_modeset_state(struct drm_device *dev,
|
||||
void
|
||||
drm_atomic_helper_calc_timestamping_constants(struct drm_atomic_state *state);
|
||||
|
||||
+void drm_atomic_helper_commit_crtc_set_mode(struct drm_device *dev,
|
||||
+ struct drm_atomic_state *state);
|
||||
+
|
||||
void drm_atomic_helper_commit_modeset_disables(struct drm_device *dev,
|
||||
struct drm_atomic_state *state);
|
||||
+
|
||||
+void drm_atomic_helper_commit_writebacks(struct drm_device *dev,
|
||||
+ struct drm_atomic_state *state);
|
||||
+
|
||||
+void drm_atomic_helper_commit_encoder_bridge_pre_enable(struct drm_device *dev,
|
||||
+ struct drm_atomic_state *state);
|
||||
+
|
||||
+void drm_atomic_helper_commit_crtc_enable(struct drm_device *dev,
|
||||
+ struct drm_atomic_state *state);
|
||||
+
|
||||
+void drm_atomic_helper_commit_encoder_bridge_enable(struct drm_device *dev,
|
||||
+ struct drm_atomic_state *state);
|
||||
+
|
||||
void drm_atomic_helper_commit_modeset_enables(struct drm_device *dev,
|
||||
struct drm_atomic_state *old_state);
|
||||
|
||||
|
||||
--
|
||||
2.51.1
|
||||
|
||||
From git@z Thu Jan 1 00:00:00 1970
|
||||
Subject: [PATCH v5 2/3] drm/mcde: Create custom commit tail
|
||||
From: Linus Walleij <linusw@kernel.org>
|
||||
Date: Sun, 30 Nov 2025 13:11:18 +0100
|
||||
Message-Id: <20251130-mcde-drm-regression-thirdfix-v5-2-aed71a32981d@kernel.org>
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
Content-Transfer-Encoding: 7bit
|
||||
|
||||
commit c9b1150a68d9362a0827609fc0dc1664c0d8bfe1
|
||||
"drm/atomic-helper: Re-order bridge chain pre-enable and post-disable"
|
||||
caused a series of regressions in all panels that send
|
||||
DSI commands in their .prepare() and .unprepare()
|
||||
callbacks when used with MCDE.
|
||||
|
||||
As the CRTC is no longer online at bridge_pre_enable()
|
||||
and gone at brige_post_disable() which maps to the panel
|
||||
bridge .prepare()/.unprepare() callbacks, any CRTC that
|
||||
enable/disable the DSI transmitter in it's enable/disable
|
||||
callbacks will be unable to send any DSI commands in the
|
||||
.prepare() and .unprepare() callbacks.
|
||||
|
||||
However the MCDE driver definitely need the CRTC to be
|
||||
enabled during .prepare()/.unprepare().
|
||||
|
||||
Solve this by implementing a custom commit tail function
|
||||
in the MCDE driver that always enables the CRTC first
|
||||
and disables it last, using the newly exported helpers.
|
||||
|
||||
Link: https://lore.kernel.org/dri-devel/20251026-fix-mcde-drm-regression-v2-0-8d799e488cf9@linaro.org/
|
||||
Link: https://lore.kernel.org/all/20251107230517.471894-1-marek.vasut%2Brenesas%40mailbox.org/
|
||||
Fixes: c9b1150a68d9 ("drm/atomic-helper: Re-order bridge chain pre-enable and post-disable")
|
||||
Tested-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
|
||||
Signed-off-by: Linus Walleij <linusw@kernel.org>
|
||||
Reviewed-by: Maxime Ripard <mripard@kernel.org>
|
||||
Acked-by: Aradhya Bhatia <aradhya.bhatia@linux.dev>
|
||||
---
|
||||
drivers/gpu/drm/mcde/mcde_drv.c | 45 ++++++++++++++++++++++++++++++++++++++++-
|
||||
1 file changed, 44 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/mcde/mcde_drv.c b/drivers/gpu/drm/mcde/mcde_drv.c
|
||||
index 5f2c462bad7e..eb3a8bb8766b 100644
|
||||
--- a/drivers/gpu/drm/mcde/mcde_drv.c
|
||||
+++ b/drivers/gpu/drm/mcde/mcde_drv.c
|
||||
@@ -100,13 +100,56 @@ static const struct drm_mode_config_funcs mcde_mode_config_funcs = {
|
||||
.atomic_commit = drm_atomic_helper_commit,
|
||||
};
|
||||
|
||||
+/*
|
||||
+ * This commit tail explicitly copies and changes the behaviour of
|
||||
+ * the related core DRM atomic helper instead of trying to make
|
||||
+ * the core helpers overly generic.
|
||||
+ */
|
||||
+static void mcde_atomic_commit_tail(struct drm_atomic_state *state)
|
||||
+{
|
||||
+ struct drm_device *dev = state->dev;
|
||||
+
|
||||
+ /*
|
||||
+ * Variant of drm_atomic_helper_commit_modeset_disables()
|
||||
+ * that will disable and post-disable all bridges BEFORE
|
||||
+ * disabling the CRTC.
|
||||
+ */
|
||||
+ drm_atomic_helper_commit_encoder_bridge_disable(dev, state);
|
||||
+ drm_atomic_helper_commit_encoder_bridge_post_disable(dev, state);
|
||||
+ drm_atomic_helper_commit_crtc_disable(dev, state);
|
||||
+ drm_atomic_helper_update_legacy_modeset_state(dev, state);
|
||||
+ drm_atomic_helper_calc_timestamping_constants(state);
|
||||
+ drm_atomic_helper_commit_crtc_set_mode(dev, state);
|
||||
+
|
||||
+ /*
|
||||
+ * Variant of drm_atomic_helper_commit_modeset_enables()
|
||||
+ * that will enable the CRTC BEFORE pre-enabling and
|
||||
+ * enabling the bridges.
|
||||
+ */
|
||||
+ drm_atomic_helper_commit_crtc_enable(dev, state);
|
||||
+ drm_atomic_helper_commit_encoder_bridge_pre_enable(dev, state);
|
||||
+ drm_atomic_helper_commit_encoder_bridge_enable(dev, state);
|
||||
+ drm_atomic_helper_commit_writebacks(dev, state);
|
||||
+
|
||||
+ drm_atomic_helper_commit_planes(dev, state,
|
||||
+ DRM_PLANE_COMMIT_ACTIVE_ONLY);
|
||||
+
|
||||
+ drm_atomic_helper_fake_vblank(state);
|
||||
+
|
||||
+ drm_atomic_helper_commit_hw_done(state);
|
||||
+
|
||||
+ drm_atomic_helper_wait_for_vblanks(dev, state);
|
||||
+
|
||||
+ drm_atomic_helper_cleanup_planes(dev, state);
|
||||
+}
|
||||
+
|
||||
static const struct drm_mode_config_helper_funcs mcde_mode_config_helpers = {
|
||||
/*
|
||||
* Using this function is necessary to commit atomic updates
|
||||
* that need the CRTC to be enabled before a commit, as is
|
||||
* the case with e.g. DSI displays.
|
||||
*/
|
||||
- .atomic_commit_tail = drm_atomic_helper_commit_tail_rpm,
|
||||
+ .atomic_commit_tail = mcde_atomic_commit_tail,
|
||||
};
|
||||
|
||||
static irqreturn_t mcde_irq(int irq, void *data)
|
||||
|
||||
--
|
||||
2.51.1
|
||||
|
||||
From git@z Thu Jan 1 00:00:00 1970
|
||||
Subject: [PATCH v5 3/3] drm/rcar-du: Modify custom commit tail
|
||||
From: Linus Walleij <linusw@kernel.org>
|
||||
Date: Sun, 30 Nov 2025 13:11:19 +0100
|
||||
Message-Id: <20251130-mcde-drm-regression-thirdfix-v5-3-aed71a32981d@kernel.org>
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
Content-Transfer-Encoding: 7bit
|
||||
|
||||
commit c9b1150a68d9362a0827609fc0dc1664c0d8bfe1
|
||||
"drm/atomic-helper: Re-order bridge chain pre-enable and post-disable"
|
||||
caused regressions in all bridges that e.g. send DSI commands in
|
||||
their .prepare() and .unprepare() callbacks when used with R-Car DU.
|
||||
|
||||
This is needed on R-Car DU, where the CRTC provides clock to LVDS
|
||||
and DSI, and has to be started before a bridge may call .prepare,
|
||||
which may trigger e.g. a DSI transfer.
|
||||
|
||||
This specifically fixes the case where ILI9881C is connected to R-Car
|
||||
DU DSI. The ILI9881C panel driver does DSI command transfer in its
|
||||
struct drm_panel_funcs .prepare function, which is currently called
|
||||
before R-Car DU rcar_du_crtc_atomic_enable() rcar_mipi_dsi_pclk_enable()
|
||||
and the DSI command transfer times out.
|
||||
|
||||
Fixes: c9b1150a68d9 ("drm/atomic-helper: Re-order bridge chain pre-enable and post-disable")
|
||||
Link: https://lore.kernel.org/all/20251107230517.471894-1-marek.vasut%2Brenesas%40mailbox.org/
|
||||
Tested-by: Geert Uytterhoeven <geert@linux-m68k.org>
|
||||
Co-developed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
|
||||
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
|
||||
Tested-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
|
||||
Signed-off-by: Linus Walleij <linusw@kernel.org>
|
||||
Reviewed-by: Maxime Ripard <mripard@kernel.org>
|
||||
Acked-by: Aradhya Bhatia <aradhya.bhatia@linux.dev>
|
||||
---
|
||||
This is a modified version of Marek's patch using the approach
|
||||
from MCDE. I'm pretty sure this driver also needs the original
|
||||
semantic ording during disablement, and it surely doesn't hurt
|
||||
to restore it too.
|
||||
---
|
||||
drivers/gpu/drm/renesas/rcar-du/rcar_du_kms.c | 33 ++++++++++++++++++++++++---
|
||||
1 file changed, 30 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/renesas/rcar-du/rcar_du_kms.c b/drivers/gpu/drm/renesas/rcar-du/rcar_du_kms.c
|
||||
index 216219accfd9..299d14ec486f 100644
|
||||
--- a/drivers/gpu/drm/renesas/rcar-du/rcar_du_kms.c
|
||||
+++ b/drivers/gpu/drm/renesas/rcar-du/rcar_du_kms.c
|
||||
@@ -540,11 +540,38 @@ static void rcar_du_atomic_commit_tail(struct drm_atomic_state *old_state)
|
||||
rcdu->dpad1_source = rcrtc->index;
|
||||
}
|
||||
|
||||
- /* Apply the atomic update. */
|
||||
- drm_atomic_helper_commit_modeset_disables(dev, old_state);
|
||||
+ /*
|
||||
+ * Apply the atomic update.
|
||||
+ *
|
||||
+ * We need special ordering to make sure the CRTC disabled last
|
||||
+ * and enabled first. We do this with modified versions of the
|
||||
+ * common modeset_disables/enables functions.
|
||||
+ */
|
||||
+
|
||||
+ /*
|
||||
+ * Variant of drm_atomic_helper_commit_modeset_disables()
|
||||
+ * that will disable and post-disable all bridges BEFORE
|
||||
+ * disabling the CRTC.
|
||||
+ */
|
||||
+ drm_atomic_helper_commit_encoder_bridge_disable(dev, old_state);
|
||||
+ drm_atomic_helper_commit_encoder_bridge_post_disable(dev, old_state);
|
||||
+ drm_atomic_helper_commit_crtc_disable(dev, old_state);
|
||||
+ drm_atomic_helper_update_legacy_modeset_state(dev, old_state);
|
||||
+ drm_atomic_helper_calc_timestamping_constants(old_state);
|
||||
+ drm_atomic_helper_commit_crtc_set_mode(dev, old_state);
|
||||
+
|
||||
drm_atomic_helper_commit_planes(dev, old_state,
|
||||
DRM_PLANE_COMMIT_ACTIVE_ONLY);
|
||||
- drm_atomic_helper_commit_modeset_enables(dev, old_state);
|
||||
+
|
||||
+ /*
|
||||
+ * Variant of drm_atomic_helper_commit_modeset_enables()
|
||||
+ * that will enable the CRTC BEFORE pre-enabling and
|
||||
+ * enabling the bridges.
|
||||
+ */
|
||||
+ drm_atomic_helper_commit_crtc_enable(dev, old_state);
|
||||
+ drm_atomic_helper_commit_encoder_bridge_pre_enable(dev, old_state);
|
||||
+ drm_atomic_helper_commit_encoder_bridge_enable(dev, old_state);
|
||||
+ drm_atomic_helper_commit_writebacks(dev, old_state);
|
||||
|
||||
drm_atomic_helper_commit_hw_done(old_state);
|
||||
drm_atomic_helper_wait_for_flip_done(dev, old_state);
|
||||
|
||||
--
|
||||
2.51.1
|
||||
|
||||
|
|
@ -1,94 +0,0 @@
|
|||
From: Linus Walleij <linus.walleij@linaro.org>
|
||||
Date: Sun, 08 Sep 2024 23:50:30 +0200
|
||||
Subject: [PATCH v2] drm/panel: nt35510: Make new commands optional
|
||||
|
||||
The commit introducing the Frida display started to write the
|
||||
SETVCMOFF registers unconditionally, and some (not all!) Hydis
|
||||
display seem to be affected by ghosting after the commit.
|
||||
|
||||
Make SETVCMOFF optional and only send these commands on the
|
||||
Frida display for now.
|
||||
|
||||
Reported-by: Stefan Hansson <newbyte@postmarketos.org>
|
||||
Fixes: 219a1f49094f ("drm/panel: nt35510: support FRIDA FRD400B25025-A-CTK")
|
||||
Acked-by: Jessica Zhang <quic_jesszhan@quicinc.com>
|
||||
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
|
||||
---
|
||||
Changes in v2:
|
||||
- After Stefan's testing conclude that we only need to make
|
||||
SETVCMOFF optional.
|
||||
- Link to v1: https://lore.kernel.org/r/20240906-fix-nt35510-v1-1-1971f3af7dda@linaro.org
|
||||
---
|
||||
drivers/gpu/drm/panel/panel-novatek-nt35510.c | 18 ++++++++++++------
|
||||
1 file changed, 12 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/panel/panel-novatek-nt35510.c b/drivers/gpu/drm/panel/panel-novatek-nt35510.c
|
||||
index d3bfdfc9cff6..a3460ed38cc4 100644
|
||||
--- a/drivers/gpu/drm/panel/panel-novatek-nt35510.c
|
||||
+++ b/drivers/gpu/drm/panel/panel-novatek-nt35510.c
|
||||
@@ -38,6 +38,7 @@
|
||||
|
||||
#define NT35510_CMD_CORRECT_GAMMA BIT(0)
|
||||
#define NT35510_CMD_CONTROL_DISPLAY BIT(1)
|
||||
+#define NT35510_CMD_SETVCMOFF BIT(2)
|
||||
|
||||
#define MCS_CMD_MAUCCTR 0xF0 /* Manufacturer command enable */
|
||||
#define MCS_CMD_READ_ID1 0xDA
|
||||
@@ -675,16 +676,19 @@ static int nt35510_setup_power(struct nt35510 *nt)
|
||||
nt->conf->bt2ctr);
|
||||
if (ret)
|
||||
return ret;
|
||||
+
|
||||
ret = nt35510_send_long(nt, dsi, NT35510_P1_SETVCL,
|
||||
NT35510_P1_VCL_LEN,
|
||||
nt->conf->vcl);
|
||||
if (ret)
|
||||
return ret;
|
||||
+
|
||||
ret = nt35510_send_long(nt, dsi, NT35510_P1_BT3CTR,
|
||||
NT35510_P1_BT3CTR_LEN,
|
||||
nt->conf->bt3ctr);
|
||||
if (ret)
|
||||
return ret;
|
||||
+
|
||||
ret = nt35510_send_long(nt, dsi, NT35510_P1_SETVGH,
|
||||
NT35510_P1_VGH_LEN,
|
||||
nt->conf->vgh);
|
||||
@@ -721,11 +725,13 @@ static int nt35510_setup_power(struct nt35510 *nt)
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
- ret = nt35510_send_long(nt, dsi, NT35510_P1_SETVCMOFF,
|
||||
- NT35510_P1_VCMOFF_LEN,
|
||||
- nt->conf->vcmoff);
|
||||
- if (ret)
|
||||
- return ret;
|
||||
+ if (nt->conf->cmds & NT35510_CMD_SETVCMOFF) {
|
||||
+ ret = nt35510_send_long(nt, dsi, NT35510_P1_SETVCMOFF,
|
||||
+ NT35510_P1_VCMOFF_LEN,
|
||||
+ nt->conf->vcmoff);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+ }
|
||||
|
||||
/* Typically 10 ms */
|
||||
usleep_range(10000, 20000);
|
||||
@@ -1319,7 +1325,7 @@ static const struct nt35510_config nt35510_frida_frd400b25025 = {
|
||||
},
|
||||
.mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST |
|
||||
MIPI_DSI_MODE_LPM,
|
||||
- .cmds = NT35510_CMD_CONTROL_DISPLAY,
|
||||
+ .cmds = NT35510_CMD_CONTROL_DISPLAY | NT35510_CMD_SETVCMOFF,
|
||||
/* 0x03: AVDD = 6.2V */
|
||||
.avdd = { 0x03, 0x03, 0x03 },
|
||||
/* 0x46: PCK = 2 x Hsync, BTP = 2.5 x VDDB */
|
||||
|
||||
---
|
||||
base-commit: 8400291e289ee6b2bf9779ff1c83a291501f017b
|
||||
change-id: 20240906-fix-nt35510-a8ec6e47e036
|
||||
|
||||
Best regards,
|
||||
--
|
||||
Linus Walleij <linus.walleij@linaro.org>
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue