From: sashiko-bot@kernel.org
To: "Robert Ijtsma" <robertijtsma@gmail.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/msm/dpu: sc8180x: restore dp_phy_intf_sel on runtime resume
Date: Tue, 24 Nov 2026 22:51:32 +0000 [thread overview]
Message-ID: <sashiko-outbox-232162@kernel.org> (raw)
In-Reply-To: <20261124-drm-msm-dpu-sc8180x-resume-v1-1-a6201f43136d@gmail.com>
Thank you for your contribution! Sashiko AI review found no new issues
in this patch, but noticed 1 related pre-existing issue it does not
introduce:
- [Critical] drm/msm/dpu: double-free in drm_atomic_private_obj_fini()
[1]
--
commit 6e0b86c0584c21b562d2cf301710555950956e94
Author: Robert Ijtsma <robertijtsma@gmail.com>
drm/msm/dpu: sc8180x: restore dp_phy_intf_sel on runtime resume
This commit factors out dpu_kms_setup_dp_phy_intf_sel() and invokes it
from both dpu_kms_hw_init() and dpu_runtime_resume() so that
MDP_DP_PHY_INTF_SEL is restored across runtime PM and s2idle resume.
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
> index 1b6286dccfc00..31166e7e65985 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
[ ... ]
> @@ -1246,8 +1256,7 @@ static int dpu_kms_hw_init(struct msm_kms *kms)
> * the INTF <->DP relationship isn't static anymore, this needs to be
> * configured through the DT.
> */
> - if (of_device_is_compatible(dpu_kms->pdev->dev.of_node, "qcom,sc8180x-dpu"))
> - dpu_kms->hw_mdp->ops.dp_phy_intf_sel(dpu_kms->hw_mdp, (unsigned int[]){ 1, 2, });
> + dpu_kms_setup_dp_phy_intf_sel(dpu_kms);
>
> dpu_kms->hw_intr = dpu_hw_intr_init(dev, dpu_kms->mmio, dpu_kms->catalog);
> if (IS_ERR(dpu_kms->hw_intr)) {
[Severity: Critical]
This problem wasn't introduced by this patch, but can a failure in
dpu_kms_hw_init() cause a double free in drm_atomic_private_obj_fini()
[1]?
When dpu_kms_hw_init() fails (for example in _dpu_kms_mmu_init()), its
error path calls _dpu_kms_hw_destroy(), which invokes
drm_atomic_private_obj_fini(&dpu_kms->global_state):
drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c:dpu_kms_hw_init() {
...
err_pm_put:
pm_runtime_put_sync(&dpu_kms->pdev->dev);
error:
_dpu_kms_hw_destroy(dpu_kms);
return rc;
}
The error returns to msm_drm_init(), whose err_msm_uninit path calls
msm_drm_uninit() -> msm_drm_kms_uninit() -> dpu_kms_destroy() ->
_dpu_kms_hw_destroy(dpu_kms) a second time, calling
drm_atomic_private_obj_fini() again on the already-finalized
dpu_kms->global_state.
[1] https://sashiko.dev/#/bug/linux-6c17bd8a-d5d5-4727-8390-902b349b7fd0
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261124-drm-msm-dpu-sc8180x-resume-v1-1-a6201f43136d@gmail.com?part=1
next prev parent reply other threads:[~2026-11-24 22:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-24 22:46 [PATCH] drm/msm/dpu: sc8180x: restore dp_phy_intf_sel on runtime resume Robert Ijtsma via B4 Relay
2026-11-24 22:51 ` sashiko-bot [this message]
2026-11-25 10:54 ` Konrad Dybcio
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=sashiko-outbox-232162@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=robertijtsma@gmail.com \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox