Thank you for your contribution! Sashiko AI review found 2 potential issues to consider: - [High] drm/msm: misordered msm_dcp_register() and msm_dcp_unregister() calls - [High] drm/msm: missing separate_gpu_kms handling for DCP backend --
commit d33ea5c6d1ac47f420d984821e7b424994f35faf Author: Jayant Shekhar <[email protected]> drm/msm: Register the DCP backend This commit registers and unregisters the DCP display backend in the MSM DRM module init and exit paths. > diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c > index bb383bb0fe8eb..af95237ac8728 100644 > --- a/drivers/gpu/drm/msm/msm_drv.c > +++ b/drivers/gpu/drm/msm/msm_drv.c > @@ -1209,6 +1209,7 @@ static int __init msm_drm_register(void) > DBG("init"); > msm_mdp_register(); > msm_dpu_register(); > + msm_dcp_register(); > msm_dsi_register(); > msm_hdmi_register(); > msm_dp_register(); [Severity: High] Can the DCP component master ever bind when msm_separate_gpu_kms_components() returns true on a system with an Adreno GPU in Device Tree? In msm_dcp_register() -> dcp_virtio_register() -> dcp_virtio_probe() -> dcp_component_register(), msm_add_gpu_components() is called unconditionally: drivers/gpu/drm/msm/dcp/dcp_drv.c:dcp_component_register() { ... ret = msm_add_gpu_components(dev, &match); if (ret) dev_err(dev, "failed to add GPU components: %d\n", ret); ret = component_master_add_with_match(dev, &msm_drm_ops, match); ... } Unlike msm_drv_probe(), this does not check !msm_separate_gpu_kms_components(). When msm_separate_gpu_kms_components() is true, adreno_probe() calls msm_gpu_probe() instead of component_add(), so dcp_component_register() waits indefinitely for a GPU component that is never registered. In addition, msm_separate_gpu_kms_auto() only counts MDSS and MDP4 via msm_count_mdss() + msm_count_mdp4(), omitting DCP display subsystems when deciding whether to split GPU and KMS devices automatically. > @@ -1230,6 +1231,7 @@ static void __exit msm_drm_unregister(void) > msm_dsi_unregister(); > msm_mdp_unregister(); > msm_dpu_unregister(); > + msm_dcp_unregister(); > } > > module_init(msm_drm_register); [Severity: High] Does placing msm_dcp_unregister() at the end of msm_drm_unregister() tear down bound DSI and Adreno GPU components before the DCP component master is removed? MDP5 and DPU are children of msm_mdss, so msm_mdss_unregister() at the start of msm_drm_unregister() depopulates them and runs component_master_del() before msm_dsi_unregister() and adreno_unregister() run. DCP is not a child of msm_mdss; its component master (dcp_subsystem_dev) is registered and removed directly via msm_dcp_register() and msm_dcp_unregister(). To match top-level display subsystem drivers like msm_mdss and msm_mdp4, msm_dcp_register() should run at the end of msm_drm_register() after component drivers are registered, and msm_dcp_unregister() should run at the start of msm_drm_unregister() before those components are unregistered. -- Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=20
