Skip to content

sm8550-6.18: Fix TF card IO performance regression#9546

Open
kasimling wants to merge 1 commit intoarmbian:mainfrom
kasimling:odin2_fix_sdcard_io_perf_2
Open

sm8550-6.18: Fix TF card IO performance regression#9546
kasimling wants to merge 1 commit intoarmbian:mainfrom
kasimling:odin2_fix_sdcard_io_perf_2

Conversation

@kasimling
Copy link

@kasimling kasimling commented Mar 16, 2026

  • Fix the issue that downstream MSM sdhc driver cannot work on 6.18.14 or newer kernel
  • Switch back to downstream MSM sdhc driver for Ayn Odin2 devices to fix the IO performance regression brought by upstream driver.

Before this fix, average sequential read bandwidth on a UHS-I SDR104 card is 16.8MiB/s. After this fix applied, it is 85.1MiB/s.

It fixes commit f785a6d

Summary by CodeRabbit

Release Notes

  • Chores
    • Updated kernel configuration to enable ARM64 memory addressing and enhanced networking features (netfilter, NAT, bridge support).
    • Improved MMC/SDHC storage driver implementation with optimized clock operations.
    • Updated device tree configurations for Odin2 platform to support downstream storage driver with enhanced power and performance management.
    • Removed debug information compilation options.

 - Fix the issue that downstream MSM sdhc driver cannot work on 6.18.14
   or newer kernel
 - Switch back to downstream MSM sdhc driver for Ayn Odin2 devices to
   fix the IO performance regression brought by upstream driver.

Before this fix, average sequential read bandwidth on a UHS-I SDR104
card is 16.8MiB/s. After this fix applied, it is 85.1MiB/s.

It fixes commit f785a6d

Signed-off-by: Alex Ling <ling_kasim@hotmail.com>
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 16, 2026

📝 Walkthrough

Walkthrough

This changeset enables downstream SDCC (SD/MMC) driver support on the SM8550 kernel by updating kernel configuration, removing redundant cleanup calls from the SDHCI driver, reverting clock operation types, and restructuring device tree files to configure the downstream SDHC driver with comprehensive power management and interconnect settings.

Changes

Cohort / File(s) Summary
Kernel Configuration
config/kernel/linux-sm8550-edge.config
Enables ARM64 48-bit VA addressing, adds legacy netfilter xtables support with NAT targets (IPv4/IPv6), bridge ebtables entries, and downstream MSM SDHCI support while removing DWARF5/reduced debug options.
SDHCI Driver Cleanup
patch/kernel/archive/sm8550-6.18/0215-drivers-mmc-...patch
Removes sdhci_pltfm_free() calls from probe and remove paths in the downstream Qualcomm MMC SDHCI driver.
Clock Configuration
patch/kernel/archive/sm8550-6.18/0216-Revert-clk-qcom-...patch
Reverts SDCC clock root configurations (gcc_sdcc2_apps_clk_src, gcc_sdcc4_apps_clk_src) from clk_rcg2_shared_floor_ops back to clk_rcg2_shared_ops.
Device Tree Updates
patch/kernel/archive/sm8550-6.18/0217-arm64-dts-...-Odin2.patch
Restructures sdhc_2 nodes in Odin2 DTS files with downstream-compatible configuration including operating-points, interconnects, QoS, pin control, resets, and power rail settings.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 Hops of joy through kernel lands so wide,
SDCC drivers dance with DTS side by side,
Clock ops hop back, netfilter takes the stage,
SM8550 springs to life on this bright page!
No more cleanup calls to delay the way, 🏃✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly matches the main objective: fixing a TF card (SD card) IO performance regression by switching to the downstream MSM sdhc driver.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added 05 Milestone: Second quarter release size/large PR with 250 lines or more Needs review Seeking for review Hardware Hardware related like kernel, U-Boot, ... Patches Patches related to kernel, U-Boot, ... labels Mar 16, 2026
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
patch/kernel/archive/sm8550-6.18/0217-arm64-dts-Switch-to-downstream-sdhc-driver-for-Odin2.patch (1)

126-206: Consider extracting shared SDHC configuration to reduce duplication.

The sdhc_2 node is nearly identical between qcs8550-ayn-odin2.dts and qcs8550-ayn-odin2portal.dts (~80 lines). If both Odin2 variants will continue to share this configuration, consider extracting it to a common dtsi file (e.g., qcs8550-ayn-odin2-sdhc.dtsi) to improve maintainability.

This is optional and can be deferred if the configurations are expected to diverge in the future.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@patch/kernel/archive/sm8550-6.18/0217-arm64-dts-Switch-to-downstream-sdhc-driver-for-Odin2.patch`
around lines 126 - 206, Extract the duplicated sdhc_2 node (sdhci@8804000) and
its child opp-table (sdhc2_opp_table) into a new common dtsi (e.g.,
qcs8550-ayn-odin2-sdhc.dtsi), then include that dtsi from both
qcs8550-ayn-odin2.dts and qcs8550-ayn-odin2portal.dts and remove the duplicate
node blocks; ensure you preserve labels (sdhc_2, sdhci@8804000,
sdhc2_opp_table), phandles (vdd-supply, vdd-io-supply, &gcc, &apps_smmu, etc.),
pinctrl references (&sdc2_default, &sdc2_sleep, &sdc2_card_det_n) and
interconnect/MSM-bus settings so all references resolve, and if future
divergence is expected keep only truly shared properties in the new dtsi and
leave variant-specific overrides in each DTS.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@patch/kernel/archive/sm8550-6.18/0217-arm64-dts-Switch-to-downstream-sdhc-driver-for-Odin2.patch`:
- Around line 40-46: The comment above qcom,dll-hsr-list incorrectly includes an
extra "0" ("0 but it is calculated"); edit the comment in the patch's block that
mentions DLL_CONFIG_2 so it reads "...DLL_CONFIG_2 value is not passed from the
device tree, but it is calculated in the driver." (reference symbols:
qcom,dll-hsr-list and DLL_CONFIG_2) — remove the stray "0" and keep punctuation
consistent with qcs8550-ayn-odin2portal.dts.

---

Nitpick comments:
In
`@patch/kernel/archive/sm8550-6.18/0217-arm64-dts-Switch-to-downstream-sdhc-driver-for-Odin2.patch`:
- Around line 126-206: Extract the duplicated sdhc_2 node (sdhci@8804000) and
its child opp-table (sdhc2_opp_table) into a new common dtsi (e.g.,
qcs8550-ayn-odin2-sdhc.dtsi), then include that dtsi from both
qcs8550-ayn-odin2.dts and qcs8550-ayn-odin2portal.dts and remove the duplicate
node blocks; ensure you preserve labels (sdhc_2, sdhci@8804000,
sdhc2_opp_table), phandles (vdd-supply, vdd-io-supply, &gcc, &apps_smmu, etc.),
pinctrl references (&sdc2_default, &sdc2_sleep, &sdc2_card_det_n) and
interconnect/MSM-bus settings so all references resolve, and if future
divergence is expected keep only truly shared properties in the new dtsi and
leave variant-specific overrides in each DTS.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 19e910b5-5627-4f3c-9b46-90a851564624

📥 Commits

Reviewing files that changed from the base of the PR and between a3f8d14 and a8b961b.

📒 Files selected for processing (4)
  • config/kernel/linux-sm8550-edge.config
  • patch/kernel/archive/sm8550-6.18/0215-drivers-mmc-Added-qcom-downstream-sdhci-driver.patch
  • patch/kernel/archive/sm8550-6.18/0216-Revert-clk-qcom-gcc-sm8550-Use-floor-ops-for-SDCC-RC.patch
  • patch/kernel/archive/sm8550-6.18/0217-arm64-dts-Switch-to-downstream-sdhc-driver-for-Odin2.patch

Comment on lines +40 to +46
+ /*
+ * DLL HSR settings. Refer go/hsr - <Target> DLL settings.
+ * Note that the DLL_CONFIG_2 value is not passed from the
+ * device tree, 0 but it is calculated in the driver.
+ */
+ qcom,dll-hsr-list = <0x0007442C 0x0 0x10
+ 0x090106C0 0x80040868>;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Minor typo in comment.

Line 43 has an extra "0" in the comment text: "0 but it is calculated" should read "but it is calculated" to match the equivalent comment in qcs8550-ayn-odin2portal.dts (line 146).

📝 Proposed fix
 		/*
 		 * DLL HSR settings. Refer go/hsr - <Target> DLL settings.
 		 * Note that the DLL_CONFIG_2 value is not passed from the
-		 * device tree, 0 but it is calculated in the driver.
+		 * device tree, but it is calculated in the driver.
 		 */
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@patch/kernel/archive/sm8550-6.18/0217-arm64-dts-Switch-to-downstream-sdhc-driver-for-Odin2.patch`
around lines 40 - 46, The comment above qcom,dll-hsr-list incorrectly includes
an extra "0" ("0 but it is calculated"); edit the comment in the patch's block
that mentions DLL_CONFIG_2 so it reads "...DLL_CONFIG_2 value is not passed from
the device tree, but it is calculated in the driver." (reference symbols:
qcom,dll-hsr-list and DLL_CONFIG_2) — remove the stray "0" and keep punctuation
consistent with qcs8550-ayn-odin2portal.dts.

@github-actions github-actions bot added the Ready to merge Reviewed, tested and ready for merge label Mar 16, 2026
@github-actions
Copy link
Contributor

✅ This PR has been reviewed and approved — all set for merge!

@github-actions github-actions bot removed the Needs review Seeking for review label Mar 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

05 Milestone: Second quarter release Hardware Hardware related like kernel, U-Boot, ... Patches Patches related to kernel, U-Boot, ... Ready to merge Reviewed, tested and ready for merge size/large PR with 250 lines or more

Development

Successfully merging this pull request may close these issues.

2 participants