dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Mahadevan P" <mahadevan.p@oss.qualcomm.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v4] drm/msm: default separate_gpu_kms to auto selection
Date: Mon, 28 Sep 2026 07:13:45 +0000	[thread overview]
Message-ID: <20260928071346.827801F00893@smtp.kernel.org> (raw)
In-Reply-To: <20260928-separate_gpu_kms-v4-1-3f33175de133@oss.qualcomm.com>

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 <mahadevan.p@oss.qualcomm.com>

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/20260330-separate_gpu_kms-v3-1-a3e54b9c9417@oss.qualcomm.com

> 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/20260928-separate_gpu_kms-v4-1-3f33175de133@oss.qualcomm.com?part=1

  reply	other threads:[~2026-09-28  7:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-28  6:58 [PATCH v4] drm/msm: default separate_gpu_kms to auto selection Mahadevan P
2026-09-28  7:13 ` sashiko-bot [this message]
2026-10-06  6:55 ` Dmitry Baryshkov

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=20260928071346.827801F00893@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=mahadevan.p@oss.qualcomm.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