From: Neil Armstrong <neil.armstrong@linaro.org>
To: Konrad Dybcio <konradybcio@kernel.org>,
Bjorn Andersson <andersson@kernel.org>,
Kees Cook <kees@kernel.org>,
"Gustavo A. R. Silva" <gustavoars@kernel.org>,
Rob Clark <robin.clark@oss.qualcomm.com>,
Sean Paul <sean@poorly.run>,
Akhil P Oommen <akhilpo@oss.qualcomm.com>,
Dmitry Baryshkov <lumag@kernel.org>,
Abhinav Kumar <abhinav.kumar@linux.dev>,
Jessica Zhang <jesszhan0024@gmail.com>,
Marijn Suijten <marijn.suijten@somainline.org>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>
Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-hardening@vger.kernel.org, dri-devel@lists.freedesktop.org,
freedreno@lists.freedesktop.org,
Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Subject: Re: [PATCH v3 0/3] Retrieve information about DDR from SMEM
Date: Fri, 9 Jan 2026 09:31:12 +0100 [thread overview]
Message-ID: <34590271-0e34-45cd-ac6f-6f901e833087@linaro.org> (raw)
In-Reply-To: <20260108-topic-smem_dramc-v3-0-6b64df58a017@oss.qualcomm.com>
On 1/8/26 15:21, Konrad Dybcio wrote:
> SMEM allows the OS to retrieve information about the DDR memory.
> Among that information, is a semi-magic value called 'HBB', or Highest
> Bank address Bit, which multimedia drivers (for hardware like Adreno
> and MDSS) must retrieve in order to program the IP blocks correctly.
>
> This series introduces an API to retrieve that value, uses it in the
> aforementioned programming sequences and exposes available DDR
> frequencies in debugfs (to e.g. pass to aoss_qmp debugfs). More
> information can be exposed in the future, as needed.
>
> Patch 3 should really be merged after 1&2
>
> Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
> ---
> Changes in v3:
> - Support v6 and v7 DDRInfo (v7 is used on e.g. Hamoa)
> - Handle rare cases of DDRInfo v5 with additional trailing data
> - Rebase/adjust to SSoT UBWC
> - Expose hbb value in debugfs
> - cosmetic changes
> - Link to v2: https://lore.kernel.org/r/20250410-topic-smem_dramc-v2-0-dead15264714@oss.qualcomm.com
>
> Changes in v2:
> - Avoid checking for < 0 on unsigned types
> - Overwrite Adreno UBWC data to keep the data shared with userspace
> coherent with what's programmed into the hardware
> - Call get_hbb() in msm_mdss_enable() instead of all UBWC setup
> branches separately
> - Pick up Bjorn's rb on patch 1
> - Link to v1: https://lore.kernel.org/r/20250409-topic-smem_dramc-v1-0-94d505cd5593@oss.qualcomm.com
>
> ---
> Konrad Dybcio (3):
> soc: qcom: smem: Expose DDR data from SMEM
> soc: qcom: ubwc: Get HBB from SMEM
> drm/msm/adreno: Trust the SSoT UBWC config
>
> drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 11 +-
> drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 82 +------
> drivers/gpu/drm/msm/adreno/adreno_gpu.h | 5 -
> drivers/soc/qcom/Makefile | 3 +-
> drivers/soc/qcom/smem.c | 14 +-
> drivers/soc/qcom/smem.h | 9 +
> drivers/soc/qcom/smem_dramc.c | 408 ++++++++++++++++++++++++++++++++
> drivers/soc/qcom/ubwc_config.c | 69 ++++--
> include/linux/soc/qcom/smem.h | 4 +
> 9 files changed, 485 insertions(+), 120 deletions(-)
> ---
> base-commit: fc4e91c639c0af93d63c3d5bc0ee45515dd7504a
> change-id: 20250409-topic-smem_dramc-6467187ac865
>
> Best regards,
Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8650-HDK
root@qemuarm64:~# cat /sys/kernel/debug/qcom_smem/
dram_frequencies hbb
root@qemuarm64:~# cat /sys/kernel/debug/qcom_smem/dram_frequencies
200000000
547200000
768000000
1555200000
1708800000
2092800000
2736000000
3187200000
3686400000
4224000000
root@qemuarm64:~# cat /sys/kernel/debug/qcom_smem/hbb
16
Thanks,
Neil
next prev parent reply other threads:[~2026-01-09 8:31 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-08 14:21 Konrad Dybcio
2026-01-08 14:21 ` [PATCH v3 1/3] soc: qcom: smem: Expose DDR data " Konrad Dybcio
2026-01-09 13:36 ` Mukesh Ojha
2026-01-27 14:22 ` Konrad Dybcio
2026-01-09 18:08 ` Bjorn Andersson
2026-01-14 16:36 ` kernel test robot
2026-01-08 14:21 ` [PATCH v3 2/3] soc: qcom: ubwc: Get HBB " Konrad Dybcio
2026-01-08 14:45 ` Dmitry Baryshkov
2026-01-08 17:49 ` Bjorn Andersson
2026-01-09 3:21 ` Dmitry Baryshkov
2026-01-09 17:50 ` Bjorn Andersson
2026-01-10 10:45 ` Dmitry Baryshkov
2026-01-13 15:31 ` Konrad Dybcio
2026-01-13 16:29 ` Dmitry Baryshkov
2026-02-17 12:59 ` Konrad Dybcio
2026-02-17 22:53 ` Dmitry Baryshkov
2026-02-17 23:08 ` Rob Clark
2026-01-13 15:36 ` Konrad Dybcio
2026-01-08 14:21 ` [PATCH v3 3/3] drm/msm/adreno: Trust the SSoT UBWC config Konrad Dybcio
2026-01-08 14:46 ` Dmitry Baryshkov
2026-01-16 18:32 ` Rob Clark
2026-02-28 22:16 ` Val Packett
2026-01-09 8:20 ` [PATCH v3 0/3] Retrieve information about DDR from SMEM Neil Armstrong
2026-01-09 10:15 ` Konrad Dybcio
2026-01-09 8:31 ` Neil Armstrong [this message]
2026-01-09 19:11 ` Connor Abbott
2026-01-09 20:41 ` Rob Clark
2026-01-09 21:03 ` Connor Abbott
2026-01-10 4:17 ` Rob Clark
2026-02-17 11:23 ` Konrad Dybcio
2026-02-18 15:58 ` Connor Abbott
2026-01-10 10:49 ` Dmitry Baryshkov
2026-01-13 15:31 ` Konrad Dybcio
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=34590271-0e34-45cd-ac6f-6f901e833087@linaro.org \
--to=neil.armstrong@linaro.org \
--cc=abhinav.kumar@linux.dev \
--cc=airlied@gmail.com \
--cc=akhilpo@oss.qualcomm.com \
--cc=andersson@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=gustavoars@kernel.org \
--cc=jesszhan0024@gmail.com \
--cc=kees@kernel.org \
--cc=konrad.dybcio@oss.qualcomm.com \
--cc=konradybcio@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lumag@kernel.org \
--cc=marijn.suijten@somainline.org \
--cc=robin.clark@oss.qualcomm.com \
--cc=sean@poorly.run \
--cc=simona@ffwll.ch \
/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
all inboxes | Powered by JetHome®