Thank you for your contribution! Sashiko AI review found 2 potential issue(s) 
to consider:
- [High] drm/msm: headless topologies incorrectly default to bound DRM device
- [Medium] drm/msm: repeated unknown GPU revision warnings during boot
--

commit 5b897e6c5890fde498e8d0fce3fbe51de1f1b4fc
Author: Mahadevan P <[email protected]>

drm/msm: default separate_gpu_kms to auto selection

On platforms with multiple display subsystems, such as SA8775P, the GPU
binds to the first display subsystem that probes. This implicit binding
prevents subsequent display subsystems from probing successfully,
breaking multi-display support.

Link: 
https://lore.kernel.org/r/[email protected]

> diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c
> index f3d2eaa04f142..2ac7fcd468d3b 100644
> --- a/drivers/gpu/drm/msm/msm_drv.c
> +++ b/drivers/gpu/drm/msm/msm_drv.c
[ ... ]
> +static int msm_count_gpus(void)
>  {
> -     return separate_gpu_kms;
> +     struct device_node *np;
> +     int count = 0;
> +
> +     for_each_matching_node(np, msm_gpu_match) {
> +             if (msm_gpu_node_present(np))
> +                     count++;
[Severity: Medium]
Does this code cause repeated warnings on boot for unsupported hardware?

msm_gpu_node_present() calls adreno_has_gpu(), which prints a warning for
unknown GPU revisions. Because msm_separate_gpu_kms_components() calls
msm_count_gpus() multiple times during component probing (e.g., in
adreno_probe(), msm_drv_probe(), msm_drm_bind()), the side-effecting
adreno_has_gpu() will be evaluated several times per boot.

> +     }
> +
> +     return count;
> +}
> +
> +static bool msm_separate_gpu_kms_auto(void)
> +{
> +     int gpus = msm_count_gpus();
> +     int display_subsystems = msm_count_mdss() + msm_count_mdp4();
> +
> +     if (gpus <= 0 || display_subsystems <= 0)
> +             return false;
[Severity: High]
Does this force headless platforms (with 0 display subsystems) to use
component binding?

If display_subsystems <= 0, the function returns false. This causes
msm_separate_gpu_kms_components() to return false, directing adreno_probe()
to call component_add() instead of msm_gpu_probe(). Without a display master
to complete the component binding, won't the GPU remain indefinitely unbound
on compute-only platforms when using the default auto configuration?

> +
> +     /* Single card if there is exactly one GPU and one display subsystem */
> +     return gpus > 1 || display_subsystems > 1;
> +}

-- 
Sashiko AI review ยท 
https://sashiko.dev/#/patchset/[email protected]?part=1

Reply via email to