FAILED: patch "[PATCH] drm/panel: ebbg-ft8719: Set prepare_prev_first" failed to apply to 6.6-stable tree
Subsystems (5)
Sasha Levin
maintainerThe patch below does not apply to the 6.6-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 <[email protected]>.
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.6.y
git checkout FETCH_HEAD
git cherry-pick -x 4eeeac9d7c3600a6cae75b2a7bc9c5b67530923c
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '[email protected]' --subject-prefix 'PATCH 6.6.y' 'HEAD^..'
Thanks,
Sasha
------------------ original commit in Linus's tree ------------------
From 4eeeac9d7c3600a6cae75b2a7bc9c5b67530923c Mon Sep 17 00:00:00 2001
From: Casey Connolly <[email protected]>
Date: Tue, 8 Sep 2026 14:45:02 +0200
Subject: [PATCH] drm/panel: ebbg-ft8719: Set prepare_prev_first
This corrects the host initialisation sequence so that we can send DSI/DCS commands in prepare().
--- drivers/gpu/drm/panel/panel-ebbg-ft8719.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/panel/panel-ebbg-ft8719.c +2 -0
@@ -198,6 +198,8 @@ static int ebbg_ft8719_probe(struct mipi_dsi_device *dsi) dsi->mode_flags =MIPI_DSI_MODE_VIDEO |MIPI_DSI_MODE_VIDEO_BURST |MIPI_DSI_CLOCK_NON_CONTINUOUS ; + ctx->panel.prepare_prev_first = true; + ret =drm_panel_of_backlight (&ctx->panel);if (ret)return dev_err_probe (dev, ret,"Failed to get backlight\n" );
Signature · 1 line
2.53.0
Sasha Levin
maintainerPATCH 1/3 drm/panel: Add new helpers for refcounted panel allocatons
From: Anusha Srivatsa <[email protected]>
[ Upstream commit ed9c594d495deb676825489032cee0a03ce29bf9 ]
Introduce reference counted allocations for panels to avoid use-after-free. The patch adds the macro devm_drm_bridge_alloc() to allocate a new refcounted panel. Followed the documentation for drmm_encoder_alloc() and devm_drm_dev_alloc and other similar implementations for this purpose.
Stable-dep-of: 4eeeac9d7c36 ("drm/panel: ebbg-ft8719: Set prepare_prev_first")
--- drivers/gpu/drm/drm_panel.c | 25 +++++++++++++++++++++++++ include/drm/drm_panel.h | 22 ++++++++++++++++++++++ 2 files changed, 47 insertions(+)
drivers/gpu/drm/drm_panel.c +25 -0
@@ -336,6 +336,31 @@ struct drm_panel *of_drm_find_panel(const struct device_node *np) }EXPORT_SYMBOL (of_drm_find_panel); +void *__devm_drm_panel_alloc (struct device *dev,size_t size,size_t offset, +const struct drm_panel_funcs *funcs, +int connector_type) +{ +void *container; +struct drm_panel *panel; + +if (!funcs) { +dev_warn (dev,"Missing funcs pointer\n" ); +return ERR_PTR (-EINVAL ); + } + + container =devm_kzalloc (dev, size,GFP_KERNEL ); +if (!container) +return ERR_PTR (-ENOMEM ); + + panel = container + offset; + panel->funcs = funcs; + +drm_panel_init (panel, dev, funcs, connector_type); + +return container; +} +EXPORT_SYMBOL (__devm_drm_panel_alloc); +/** * of_drm_get_panel_orientation - look up the orientation of the panel through * the "rotation" binding from a device tree node
include/drm/drm_panel.h +22 -0
@@ -269,6 +269,28 @@ struct drm_panel {bool enabled; }; +void *__devm_drm_panel_alloc (struct device *dev,size_t size,size_t offset, +const struct drm_panel_funcs *funcs, +int connector_type); + +/** +* devm_drm_panel_alloc - Allocate and initialize a refcounted panel. +* +* @dev: struct device of the panel device +* @type: the type of the struct which contains struct &drm_panel +* @member: the name of the &drm_panel within @type +* @funcs: callbacks for this panel +* @connector_type: the connector type (DRM_MODE_CONNECTOR_*) corresponding to +* the panel interface +* +* Returns: +* Pointer to container structure embedding the panel, ERR_PTR on failure. +*/ +#define devm_drm_panel_alloc (dev, type, member, funcs, connector_type) \ + ((type *)__devm_drm_panel_alloc(dev, sizeof(type), \ + offsetof(type, member), funcs, \ + connector_type)) +void drm_panel_init (struct drm_panel *panel,struct device *dev,const struct drm_panel_funcs *funcs,int connector_type);
Signature · 1 line
2.53.0
Sasha Levin
maintainerPATCH 2/3 panel/ebbg-ft8719: Use refcounted allocation in place of devm_kzalloc()
From: Anusha Srivatsa <[email protected]>
[ Upstream commit b30a15a4e7e54b676d6c395e71daf5f286997731 ]
Move to using the new API devm_drm_panel_alloc() to allocate the panel.
Stable-dep-of: 4eeeac9d7c36 ("drm/panel: ebbg-ft8719: Set prepare_prev_first")
--- drivers/gpu/drm/panel/panel-ebbg-ft8719.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-)
drivers/gpu/drm/panel/panel-ebbg-ft8719.c +5 -6
@@ -198,9 +198,11 @@ static int ebbg_ft8719_probe(struct mipi_dsi_device *dsi)struct ebbg_ft8719 *ctx;int i, ret; - ctx =devm_kzalloc (dev,sizeof (*ctx),GFP_KERNEL ); -if (!ctx) -return -ENOMEM ; + ctx = devm_drm_panel_alloc(dev, struct ebbg_ft8719, panel, + &ebbg_ft8719_panel_funcs, +DRM_MODE_CONNECTOR_DSI ); +if (IS_ERR (ctx)) +return PTR_ERR (ctx);for (i =0 ; i <ARRAY_SIZE (ctx->supplies); i++) ctx->supplies[i].supply = regulator_names[i];
@@ -231,9 +233,6 @@ static int ebbg_ft8719_probe(struct mipi_dsi_device *dsi) dsi->mode_flags =MIPI_DSI_MODE_VIDEO |MIPI_DSI_MODE_VIDEO_BURST |MIPI_DSI_CLOCK_NON_CONTINUOUS ; -drm_panel_init (&ctx->panel, dev, &ebbg_ft8719_panel_funcs, -DRM_MODE_CONNECTOR_DSI ); - ret =drm_panel_of_backlight (&ctx->panel);if (ret)return dev_err_probe (dev, ret,"Failed to get backlight\n" );
Signature · 1 line
2.53.0
Sasha Levin
maintainerPATCH 3/3 drm/panel: ebbg-ft8719: Set prepare_prev_first
In reply to Sasha LevinFrom: Casey Connolly <[email protected]>
[ Upstream commit 4eeeac9d7c3600a6cae75b2a7bc9c5b67530923c ]
This corrects the host initialisation sequence so that we can send DSI/DCS commands in prepare().
--- drivers/gpu/drm/panel/panel-ebbg-ft8719.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/panel/panel-ebbg-ft8719.c +2 -0
@@ -233,6 +233,8 @@ static int ebbg_ft8719_probe(struct mipi_dsi_device *dsi) dsi->mode_flags =MIPI_DSI_MODE_VIDEO |MIPI_DSI_MODE_VIDEO_BURST |MIPI_DSI_CLOCK_NON_CONTINUOUS ; + ctx->panel.prepare_prev_first = true; + ret =drm_panel_of_backlight (&ctx->panel);if (ret)return dev_err_probe (dev, ret,"Failed to get backlight\n" );
Signature · 1 line
2.53.0