From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: soc: qcom: ubwc: use fixed values for UBWC swizzle for UBWC < 4.0 Date: Mon, 09 Mar 2026 08:32:19 +1000 Message-ID: In-Reply-To: <20260306-ubwc-rework-v1-22-9cfdff12f2bb@oss.qualcomm.com> References: <20260306-ubwc-rework-v1-0-9cfdff12f2bb@oss.qualcomm.com> <20260306-ubwc-rework-v1-22-9cfdff12f2bb@oss.qualcomm.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Patch Review Moves the UBWC_SWIZZLE defines out of the struct and into the helper, and adds version-based logic: ```c + if (cfg->ubwc_enc_version == UBWC_1_0) + return UBWC_SWIZZLE_ENABLE_LVL1 | + UBWC_SWIZZLE_ENABLE_LVL2 | + UBWC_SWIZZLE_ENABLE_LVL3; + + if (cfg->ubwc_enc_version < UBWC_4_0) + return UBWC_SWIZZLE_ENABLE_LVL2 | + UBWC_SWIZZLE_ENABLE_LVL3; + + return cfg->ubwc_swizzle; ``` This correctly encodes that UBWC 1.0 uses all 3 levels, UBWC 2.0/3.x use levels 2+3, and only UBWC 4.0+ has platform-specific swizzle. Also simplifies `qcom_ubwc_get_ubwc_mode()` by removing the swizzle sanity check. --- Generated by Claude Code Patch Reviewer