Skip to content

soc/qcom/ubwc: rework UBWC configuration database

Dmitry Baryshkov dri-devel linux-arm-msm lkml 5 versions – Applied

Status from this message: Applied, thanks!

Get series with b4
b4 am [email protected] change-id 20260211-ubwc-rework-e6ce1d8eb520

Versions newest first

  1. v5 Latest28 patches 1 replyApplied
  2. v429 patches 19 repliesApplied
  3. v327 patches 15 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v225 patches3 repliesSuperseded
v124 patches12 repliesSuperseded

Changes in v5 from the cover letter

- Dropped applied patch
- Rebased on next, fixing conflicts
- Changed SC8180X to UBWC 3.1 (as it uses the macrotile mode) (Konrad)
- Link to v4: https://patch.msgid.link/[email protected]

Patches in v5 Applied

#Subject and filesSizeRepliesApplied
1/28soc: qcom: ubwc: define UBWC 3.1include/linux/soc/qcom/ubwc.h+1 -00 replies
2/28soc: qcom: ubwc: define helper for MDSS and Adreno driversinclude/linux/soc/qcom/ubwc.h+16 -00 replies
3/28soc: qcom: ubwc: add helper controlling AMSBC enablementinclude/linux/soc/qcom/ubwc.h+5 -00 replies
4/28drm/msm/adreno: Trust the SSoT UBWC configdrivers/gpu/drm/msm/adreno/a5xx_gpu.c drivers/gpu/drm/msm/adreno/a6xx_gpu.c drivers/gpu/drm/msm/adreno/adreno_gpu.h+6 -920 replies
5/28drm/msm/adreno: use qcom_ubwc_version_tag() helperdrivers/gpu/drm/msm/adreno/a8xx_gpu.c+3 -50 replies
6/28drm/msm/mdss: use qcom_ubwc_version_tag() helperdrivers/gpu/drm/msm/msm_mdss.c+3 -150 replies
7/28drm/msm/adreno: use new helper to set min_acc lengthdrivers/gpu/drm/msm/adreno/a6xx_gpu.c+2 -30 replies
8/28drm/msm/mdss: use new helper to set min_acc lengthdrivers/gpu/drm/msm/msm_mdss.c+3 -60 replies
9/28drm/msm/adreno: use new helper to set macrotile_modedrivers/gpu/drm/msm/adreno/a6xx_gpu.c drivers/gpu/drm/msm/adreno/adreno_gpu.c+2 -20 replies
10/28drm/msm/mdss: use new helper to set macrotile_modedrivers/gpu/drm/msm/msm_mdss.c+2 -20 replies
11/28drm/msm/mdss: use new helper to set UBWC bank spreadingdrivers/gpu/drm/msm/msm_mdss.c+1 -10 replies
12/28drm/msm/adreno: use new helper to set ubwc_swizzledrivers/gpu/drm/msm/adreno/a6xx_gpu.c drivers/gpu/drm/msm/adreno/a8xx_gpu.c drivers/gpu/drm/msm/adreno/adreno_gpu.c+4 -40 replies
13/28drm/msm/dpu: use new helper to set ubwc_swizzledrivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c+4 -30 replies
14/28drm/msm/mdss: use new helper to set ubwc_swizzledrivers/gpu/drm/msm/msm_mdss.c+5 -30 replies
15/28drm/msm/adreno: write reserved UBWC-related bitsdrivers/gpu/drm/msm/adreno/a8xx_gpu.c+2 -00 replies
16/28drm/msm/adreno: set fp16compoptdis for UBWC 3.0 formatsdrivers/gpu/drm/msm/adreno/a8xx_gpu.c+1 -00 replies
17/28drm/msm/adreno: use new helper to set amsbcdrivers/gpu/drm/msm/adreno/a6xx_gpu.c drivers/gpu/drm/msm/adreno/a8xx_gpu.c+3 -60 replies
18/28drm/msm/adreno: use version ranges in A8xx UBWC codedrivers/gpu/drm/msm/adreno/a8xx_gpu.c+15 -170 replies
19/28drm/msm/mdss: use new helper to set amsbcdrivers/gpu/drm/msm/msm_mdss.c+1 -10 replies
20/28drm/msm/dpu: drop ubwc_dec_versiondrivers/gpu/drm/msm/disp/dpu1/dpu_plane.c+1 -20 replies
21/28drm/msm/dpu: invert the order of UBWC checksdrivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c+18 -180 replies
22/28soc: qcom: ubwc: set min_acc length to 64 for all UBWC 1.0 targetsinclude/linux/soc/qcom/ubwc.h+1 -60 replies
23/28soc: qcom: ubwc: drop ubwc_dec_versiondrivers/soc/qcom/ubwc_config.c include/linux/soc/qcom/ubwc.h+0 -250 replies
24/28soc: qcom: ubwc: drop ubwc_bank_spreaddrivers/soc/qcom/ubwc_config.c include/linux/soc/qcom/ubwc.h+1 -160 replies
25/28soc: qcom: ubwc: drop macrotile_mode from the databasedrivers/soc/qcom/ubwc_config.c include/linux/soc/qcom/ubwc.h+11 -250 replies
26/28soc: qcom: ubwc: use fixed values for UBWC swizzle for UBWC < 4.0drivers/soc/qcom/ubwc_config.c include/linux/soc/qcom/ubwc.h+24 -430 replies
27/28soc: qcom: ubwc: sort out the rest of the UBWC swizzle settingsdrivers/soc/qcom/ubwc_config.c include/linux/soc/qcom/ubwc.h+16 -260 replies
28/28soc: qcom: ubwc: deduplicate UBWC configuration datadrivers/soc/qcom/ubwc_config.c+76 -1200 replies

Reviews trailers per patch

All 28 patches have a Reviewed-by or Acked-by.

PatchKonrad DybcioRob ClarkDmitry BaryshkovAkhil P Oommen
1/28R-b
2/28R-b
3/28R-b
4/28R-b R-b R-b
5/28R-b R-b
6/28R-b
7/28R-b
8/28R-b
9/28R-b R-b
10/28R-b
11/28R-b
12/28R-b R-b
13/28R-b
14/28R-b
15/28R-b
16/28R-b
17/28R-b R-b
18/28R-b
19/28R-b
20/28R-b
21/28R-b
22/28R-b
23/28R-b
24/28R-b
25/28R-b
26/28R-b
27/28R-b
28/28R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v5 thread

Cover letter [PATCH v5 00/28] soc/qcom/ubwc: rework UBWC configuration database

Currently we store several settings in the configuration database. Some of them are incorrect or not completely matching the expected configuration settings. Others are directly derivable from the UBWC version. Rework how we handle the values in the database, trimming it down to the UBWC version, HBB and several flags.

The series includes patches for drm/msm as well as for the soc/qcom. My suggestion would be to either create an immutable tag for the first batch of soc/qcom patches, which we can pull into drm/msm or to ack merging the first patches through drm/msm tree directly.

Bjorn, would you please ack merging first soc/qcom/ubwc patches through the drm/msm tree? Or would you please merge them and provide the immutable tag?

---
Changes in v5:
- Dropped applied patch
- Rebased on next, fixing conflicts
- Changed SC8180X to UBWC 3.1 (as it uses the macrotile mode) (Konrad)
- Link to v4: https://patch.msgid.link/[email protected]

Changes in v4:
- Rebased on linux-next, dropping merged dependencies.
- Reworked A8xx, simplifying several corner cases.
- Link to v3: https://lore.kernel.org/r/[email protected]

Changes in v3:
- Corrected UWBC_STATIC programming for MDSS 5.x platforms (Konrad)
- Switched MDSS 6.x+ to qcom_ubwc_min_acc_length_64b() too
- Added qcom_ubwc_enable_amsbc() helper
- Reworked the DPU handling of UBWC config, making it simpler to handle
minor revisions.
- Removed the comment regarding the best guess for min_acc_length
- Link to v2: https://lore.kernel.org/r/[email protected]

Changes in v2:
- Renamed MDSS UBWC programming function to make it more obvious that
they are related to the MDSS revision rather than UBWC version
(Konrad)
- Brought back the patch to use qcom_ubwc_version_tag() in msm_mdss.c,
got lost in rebases (Konrad)
- Link to v1: https://lore.kernel.org/r/[email protected]

---
Dmitry Baryshkov (27):
soc: qcom: ubwc: define UBWC 3.1
soc: qcom: ubwc: define helper for MDSS and Adreno drivers
soc: qcom: ubwc: add helper controlling AMSBC enablement drm/msm/adreno: use qcom_ubwc_version_tag() helper drm/msm/mdss: use qcom_ubwc_version_tag() helper drm/msm/adreno: use new helper to set min_acc length drm/msm/mdss: use new helper to set min_acc length drm/msm/adreno: use new helper to set macrotile_mode drm/msm/mdss: use new helper to set macrotile_mode drm/msm/mdss: use new helper to set UBWC bank spreading drm/msm/adreno: use new helper to set ubwc_swizzle drm/msm/dpu: use new helper to set ubwc_swizzle drm/msm/mdss: use new helper to set ubwc_swizzle drm/msm/adreno: write reserved UBWC-related bits drm/msm/adreno: set fp16compoptdis for UBWC 3.0 formats drm/msm/adreno: use new helper to set amsbc drm/msm/adreno: use version ranges in A8xx UBWC code drm/msm/mdss: use new helper to set amsbc
drm/msm/dpu: drop ubwc_dec_version
drm/msm/dpu: invert the order of UBWC checks
soc: qcom: ubwc: set min_acc length to 64 for all UBWC 1.0 targets
soc: qcom: ubwc: drop ubwc_dec_version
soc: qcom: ubwc: drop ubwc_bank_spread
soc: qcom: ubwc: drop macrotile_mode from the database
soc: qcom: ubwc: use fixed values for UBWC swizzle for UBWC < 4.0
soc: qcom: ubwc: sort out the rest of the UBWC swizzle settings
soc: qcom: ubwc: deduplicate UBWC configuration data

Konrad Dybcio (1):
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       |  93 +--------
 drivers/gpu/drm/msm/adreno/a8xx_gpu.c       |  50 +++--
 drivers/gpu/drm/msm/adreno/adreno_gpu.c     |   4 +-
 drivers/gpu/drm/msm/adreno/adreno_gpu.h     |   5 -
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c |  39 ++--
 drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c   |   3 +-
 drivers/gpu/drm/msm/msm_mdss.c              |  43 ++--
 drivers/soc/qcom/ubwc_config.c              | 295 ++++++++--------------------
 include/linux/soc/qcom/ubwc.h               | 103 ++++++----
 10 files changed, 216 insertions(+), 430 deletions(-)

---
base-commit: 687da68900cd1a46549f7d9430c7d40346cb86a0
change-id: 20260211-ubwc-rework-e6ce1d8eb520
prerequisite-patch-id: 47fdf46e2c4719c7e83bb10e7a987483ca388bbe

Best regards,

Signature · 2 lines
With best wishes
Dmitry