From: sashiko-bot@kernel.org
To: "Konrad Dybcio" <konradybcio@kernel.org>
Cc: conor+dt@kernel.org, robh@kernel.org, devicetree@vger.kernel.org,
dri-devel@lists.freedesktop.org, linux-scsi@vger.kernel.org
Subject: Re: [PATCH v5 3/3] soc: qcom: ubwc: Get HBB from SMEM
Date: Mon, 27 Jul 2026 10:32:58 +0000 [thread overview]
Message-ID: <20260727103259.8EBC61F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260727-topic-smem_dramc-v5-3-66188b3e338d@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [High] The Kconfig option `QCOM_UBWC_CONFIG` lacks a dependency on `QCOM_SMEM`, leading to linker errors when `QCOM_SMEM` is disabled or built as a module.
- [High] Unconditional probe deferral if SMEM is absent or fails to probe, breaking device initialization (such as display and GPU).
--
--- Patch [3]: [PATCH v5 3/3] soc: qcom: ubwc: Get HBB from SMEM ---
commit 20edaba770542f67d21a0b4400573bdcc45e195f
Author: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
soc: qcom: ubwc: Get HBB from SMEM
This patch attempts to retrieve Highest Bank Bit (HBB) data from SMEM to
ensure correct DRAM configuration settings are applied. It updates the
UBWC configuration retrieval logic to first check for SMEM availability
and dynamically populate the HBB value if present.
> diff --git a/drivers/soc/qcom/ubwc_config.c b/drivers/soc/qcom/ubwc_config.c
> index 0209a02c390f0..23901a4c51f73 100644
> --- a/drivers/soc/qcom/ubwc_config.c
> +++ b/drivers/soc/qcom/ubwc_config.c
[ ... ]
> @@ -168,9 +169,25 @@ static const struct of_device_id qcom_ubwc_configs[] __maybe_unused = {
> { }
> };
>
> +static struct qcom_ubwc_cfg_data *cfg;
> +static DEFINE_MUTEX(cfg_mutex);
> +/**
> + * qcom_ubwc_config_get_data() - Retrieve UBWC data for the platform.
> + *
> + * Return: Pointer to valid struct qcom_ubwc_cfg_data on success, negative
> + * errno on failure. Note that this may return EPROBE_DEFER.
> + */
> const struct qcom_ubwc_cfg_data *qcom_ubwc_config_get_data(void)
> {
> const struct qcom_ubwc_cfg_data *data;
> + int hbb;
> +
> + guard(mutex)(&cfg_mutex);
> + if (cfg)
> + return cfg;
> +
> + if (!qcom_smem_is_available())
> + return ERR_PTR(-EPROBE_DEFER);
[Severity: High]
If SMEM is absent on a platform or fails to probe (for example, if the
bootloader didn't initialize it and sets __smem to ERR_PTR(-ENODEV)),
qcom_smem_is_available() will always return false.
Will this cause dependent drivers to endlessly defer probe, completely
bypassing the valid static fallback data in qcom_ubwc_configs?
[Severity: High]
Since this patch introduces calls to qcom_smem_is_available() and
qcom_smem_dram_get_hbb(), which lack static inline stubs for the
!CONFIG_QCOM_SMEM case, could this cause a build failure?
For example, if a kernel is built with CONFIG_DRM_MSM=y (which selects
QCOM_UBWC_CONFIG) and CONFIG_QCOM_SMEM=m (or =n), will this result in
undefined reference errors during the vmlinux linking phase because
QCOM_UBWC_CONFIG lacks a dependency on QCOM_SMEM in drivers/soc/qcom/Kconfig?
>
> data = of_machine_get_match_data(qcom_ubwc_configs);
> if (!data) {
> @@ -178,9 +195,30 @@ const struct qcom_ubwc_cfg_data *qcom_ubwc_config_get_data(void)
> return ERR_PTR(-EINVAL);
> }
>
> - return data;
> + hbb = qcom_smem_dram_get_hbb();
> + if (hbb == -ENODATA) {
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260727-topic-smem_dramc-v5-0-66188b3e338d@oss.qualcomm.com?part=3
prev parent reply other threads:[~2026-07-27 10:33 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-27 9:59 [PATCH v5 0/3] Retrieve information about DDR from SMEM Konrad Dybcio
2026-07-27 9:59 ` Konrad Dybcio
2026-07-27 9:59 ` [PATCH v5 1/3] soc: qcom: smem: Use 'unsigned int' instead of 'unsigned' Konrad Dybcio
2026-07-27 9:59 ` Konrad Dybcio
2026-07-27 10:09 ` sashiko-bot
2026-07-27 12:35 ` Mukesh Ojha
2026-07-27 12:35 ` Mukesh Ojha
2026-07-27 9:59 ` [PATCH v5 2/3] soc: qcom: smem: Expose DDR data from SMEM Konrad Dybcio
2026-07-27 9:59 ` Konrad Dybcio
2026-07-27 10:20 ` sashiko-bot
2026-07-27 9:59 ` [PATCH v5 3/3] soc: qcom: ubwc: Get HBB " Konrad Dybcio
2026-07-27 9:59 ` Konrad Dybcio
2026-07-27 10:32 ` sashiko-bot [this message]
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=20260727103259.8EBC61F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=konradybcio@kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=robh@kernel.org \
--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.