Skip to contentSkip to conversation

FAILED: patch "[PATCH] drm/tilcdc: Fix removal actions in case of failed probe" failed to apply to 6.12-stable tree

PATCH [email protected] 2 participants 6 messages Jan 5 – Jan 6

Subsystems (4)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

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 <[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.12.y
git checkout FETCH_HEAD
git cherry-pick -x a585c7ef9cabda58088916baedc6573e9a5cd2a7
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2026010529-certainty-unguided-7d41@gregkh' --subject-prefix 'PATCH 6.12.y' HEAD^..

Possible dependencies:

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From a585c7ef9cabda58088916baedc6573e9a5cd2a7 Mon Sep 17 00:00:00 2001
From: "Kory Maincent (TI.com)" <[email protected]>
Date: Tue, 25 Nov 2025 10:05:44 +0100
Subject: [PATCH] drm/tilcdc: Fix removal actions in case of failed probe

The drm_kms_helper_poll_fini() and drm_atomic_helper_shutdown() helpers should only be called when the device has been successfully registered. Currently, these functions are called unconditionally in tilcdc_fini(), which causes warnings during probe deferral scenarios.

[    7.972317] WARNING: CPU: 0 PID: 23 at drivers/gpu/drm/drm_atomic_state_helper.c:175 drm_atomic_helper_crtc_duplicate_state+0x60/0x68
...
[    8.005820]  drm_atomic_helper_crtc_duplicate_state from drm_atomic_get_crtc_state+0x68/0x108
[    8.005858]  drm_atomic_get_crtc_state from drm_atomic_helper_disable_all+0x90/0x1c8
[    8.005885]  drm_atomic_helper_disable_all from drm_atomic_helper_shutdown+0x90/0x144
[    8.005911]  drm_atomic_helper_shutdown from tilcdc_fini+0x68/0xf8 [tilcdc]
[    8.005957]  tilcdc_fini [tilcdc] from tilcdc_pdev_probe+0xb0/0x6d4 [tilcdc]

Fix this by rewriting the failed probe cleanup path using the standard goto error handling pattern, which ensures that cleanup functions are only called on successfully initialized resources. Additionally, remove the now-unnecessary is_registered flag.

Fixes 3c4babae3c4a ("drm: Call drm_atomic_helper_shutdown() at shutdown/remove time for misc drivers")
drivers/gpu/drm/tilcdc/tilcdc_crtc.c +1 -1
index b5f60b2b2d0e..41802c9bd147 100644
@@ -586,7 +586,7 @@ static void tilcdc_crtc_recover_work(struct work_struct *work)
 	drm_modeset_unlock(&crtc->mutex);
 }
 
-static void tilcdc_crtc_destroy(struct drm_crtc *crtc)
+void tilcdc_crtc_destroy(struct drm_crtc *crtc)
 {
 	struct tilcdc_drm_private *priv = crtc->dev->dev_private;
 
drivers/gpu/drm/tilcdc/tilcdc_drv.c +35 -18

133 lines not on this page · raw message

drivers/gpu/drm/tilcdc/tilcdc_drv.h +1 -1
index b818448c83f6..58b276f82a66 100644
@@ -82,7 +82,6 @@ struct tilcdc_drm_private {
 	struct drm_encoder *external_encoder;
 	struct drm_connector *external_connector;
 
-	bool is_registered;
 	bool is_componentized;
 	bool irq_enabled;
 };
@@ -164,6 +163,7 @@ void tilcdc_crtc_set_panel_info(struct drm_crtc *crtc,
 void tilcdc_crtc_set_simulate_vesa_sync(struct drm_crtc *crtc,
 					bool simulate_vesa_sync);
 void tilcdc_crtc_shutdown(struct drm_crtc *crtc);
+void tilcdc_crtc_destroy(struct drm_crtc *crtc);
 int tilcdc_crtc_update_fb(struct drm_crtc *crtc,
 		struct drm_framebuffer *fb,
 		struct drm_pending_vblank_event *event);
#1 lore raw
Quoted 6 lines · On Mon, 05 Jan 2026 14:26:29 +0100 <[email protected]> wrote:

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 <[email protected]>.

To reproduce the conflict and resubmit, you may use the following commands:

No conflict on my side on current linux-6.12.y.
Have you more informations?

Regards,

Signature · 3 lines
Köry Maincent, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com
author maintainer
#2 lore raw
Quoted 8 lines · Kory Maincent
Quoted 5 lines · On Mon, 05 Jan 2026 14:26:29 +0100 <[email protected]> wrote:

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 <[email protected]>.

Quoted 4 lines
Quoted 1 line

To reproduce the conflict and resubmit, you may use the following commands:

No conflict on my side on current linux-6.12.y.
Have you more informations?

Did you try building it? I don't remember why this failed, sorry.

greg k-h

#3 lore raw
Quoted 9 lines · On Mon, 5 Jan 2026 17:30:39 +0100 Greg KH <[email protected]> wrote:
Quoted 8 lines · Kory Maincent
Quoted 5 lines · On Mon, 05 Jan 2026 14:26:29 +0100 <[email protected]> wrote:

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 <[email protected]>.

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

To reproduce the conflict and resubmit, you may use the following commands:

No conflict on my side on current linux-6.12.y.
Have you more informations?

Did you try building it? I don't remember why this failed, sorry.

Yes, and I didn't face any errors.

Regards,

Signature · 3 lines
Köry Maincent, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com
author maintainer
#4 lore raw
Quoted 15 lines · Kory Maincent
Quoted 12 lines · On Mon, 5 Jan 2026 17:30:39 +0100 Greg KH <[email protected]> wrote:
Quoted 11 lines · Kory Maincent
Quoted 7 lines · On Mon, 05 Jan 2026 14:26:29 +0100 <[email protected]> wrote:

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 <[email protected]>.

To reproduce the conflict and resubmit, you may use the following commands:

Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

No conflict on my side on current linux-6.12.y.
Have you more informations?

Did you try building it? I don't remember why this failed, sorry.

Yes, and I didn't face any errors.

Fails due to other stable patches in the queue in this same area:
Applying drm-tilcdc-fix-removal-actions-in-case-of-failed-probe.patch to linux-6.12.y Applying patch drm-tilcdc-fix-removal-actions-in-case-of-failed-probe.patch patching file drivers/gpu/drm/tilcdc/tilcdc_crtc.c
patching file drivers/gpu/drm/tilcdc/tilcdc_drv.c
Hunk #1 succeeded at 171 (offset -1 lines).
Hunk #2 succeeded at 218 (offset -1 lines).
Hunk #3 succeeded at 311 (offset -1 lines).
Hunk #4 succeeded at 322 (offset -1 lines).
Hunk #5 FAILED at 371.
1 out of 5 hunks FAILED -- rejects in file drivers/gpu/drm/tilcdc/tilcdc_drv.c patching file drivers/gpu/drm/tilcdc/tilcdc_drv.h
Patch drm-tilcdc-fix-removal-actions-in-case-of-failed-probe.patch does not apply (enforce with -f)

Care to rebase on the next release and send it then?

thanks,

greg k-h

#5 lore raw
Quoted 39 lines · On Tue, 6 Jan 2026 15:20:15 +0100 Greg KH <[email protected]> wrote:
Quoted 15 lines · Kory Maincent
Quoted 12 lines · On Mon, 5 Jan 2026 17:30:39 +0100 Greg KH <[email protected]> wrote:
Quoted 11 lines · Kory Maincent
Quoted 7 lines · On Mon, 05 Jan 2026 14:26:29 +0100 <[email protected]> wrote:

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 <[email protected]>.

To reproduce the conflict and resubmit, you may use the following commands:

Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

No conflict on my side on current linux-6.12.y.
Have you more informations?

Did you try building it? I don't remember why this failed, sorry.

Yes, and I didn't face any errors.

Fails due to other stable patches in the queue in this same area:
Applying drm-tilcdc-fix-removal-actions-in-case-of-failed-probe.patch
to linux-6.12.y Applying patch drm-tilcdc-fix-removal-actions-in-case-of-failed-probe.patch patching file drivers/gpu/drm/tilcdc/tilcdc_crtc.c patching file drivers/gpu/drm/tilcdc/tilcdc_drv.c Hunk #1 succeeded at 171 (offset -1 lines). Hunk #2 succeeded at 218 (offset -1 lines).
Hunk #3 succeeded at 311 (offset -1 lines).
Hunk #4 succeeded at 322 (offset -1 lines).
Hunk #5 FAILED at 371.
1 out of 5 hunks FAILED -- rejects in file
drivers/gpu/drm/tilcdc/tilcdc_drv.c patching file drivers/gpu/drm/tilcdc/tilcdc_drv.h Patch drm-tilcdc-fix-removal-actions-in-case-of-failed-probe.patch does not apply (enforce with -f)

Quoted 1 line

Care to rebase on the next release and send it then?

Ok for me.

Regards,

Signature · 3 lines
Köry Maincent, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com