From: sashiko-bot@kernel.org
To: "Mahadevan P" <mahadevan.p@oss.qualcomm.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH RESEND v3] drm/msm: default separate_gpu_kms to auto selection
Date: Wed, 09 Sep 2026 13:54:54 +0000 [thread overview]
Message-ID: <20260909135455.1D19F1F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260909-separate_gpu_kms-v3-1-eae64dfbb635@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Missing `of_node_put()` causes an OF node reference leak in `msm_separate_gpu_kms_components()`.
--
commit 46360e93ded31d3fb12ccb01a8d959a4c7390270
Author: Mahadevan P <mahadevan.p@oss.qualcomm.com>
drm/msm: default separate_gpu_kms to auto selection
This commit updates the separate_gpu_kms module parameter to a tristate,
defaulting to an auto-selection mode. It allows the driver to automatically
split the display and GPU devices depending on the hardware topology,
improving support for multi-display platforms.
Link: https://lore.kernel.org/r/20260317-separate_gpu_kms-v2-1-b027ca97b9fe@oss.qualcomm.com
> diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c
> --- a/drivers/gpu/drm/msm/msm_drv.c
> +++ b/drivers/gpu/drm/msm/msm_drv.c
[ ... ]
> +bool msm_separate_gpu_kms_components(void)
> {
> - return separate_gpu_kms;
> + struct device_node *np;
> +
> + np = of_find_matching_node(NULL, msm_gpu_match);
> + if (!msm_gpu_node_present(np))
> + return true;
> + if (separate_gpu_kms == 1)
> + return true;
> + if (separate_gpu_kms == 0)
> + return false;
> + return msm_separate_gpu_kms_auto();
[Severity: Medium]
Does this code leak the device node reference in
msm_separate_gpu_kms_components() in drivers/gpu/drm/msm/msm_drv.c?
The of_find_matching_node() function returns a node with its reference
count incremented. When np is not NULL, the function returns through
multiple paths without calling of_node_put() to release the reference.
> }
>
> static int msm_drm_uninit(struct device *dev, const struct component_ops *gpu_ops)
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260909-separate_gpu_kms-v3-1-eae64dfbb635@oss.qualcomm.com?part=1
next prev parent reply other threads:[~2026-09-09 13:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-09 13:48 [PATCH RESEND v3] drm/msm: default separate_gpu_kms to auto selection Mahadevan P
2026-09-09 13:54 ` sashiko-bot [this message]
2026-09-12 21:00 ` kernel test robot
2026-09-13 0:05 ` kernel test robot
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=20260909135455.1D19F1F00A3A@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.