From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: drm/msm/adreno: use version ranges in A8xx UBWC code Date: Mon, 25 May 2026 21:42:00 +1000 Message-ID: In-Reply-To: <20260520-ubwc-rework-v5-18-72f2749bc807@oss.qualcomm.com> References: <20260520-ubwc-rework-v5-0-72f2749bc807@oss.qualcomm.com> <20260520-ubwc-rework-v5-18-72f2749bc807@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 Converts the a8xx switch statement to version-range if/else chains: ```c - switch (ubwc_version) { - case UBWC_6_0: + if (ubwc_version > UBWC_6_0) + dev_err(...) + if (ubwc_version == UBWC_6_0) yuvnotcomptofc = true; + if (ubwc_version < UBWC_5_0 && + ubwc_version >= UBWC_4_0) rgba8888_lossless = true; + if (ubwc_version < UBWC_4_3) fp16compoptdis = true; + if (cfg->ubwc_enc_version >= UBWC_4_0) rgb565_predicator = true; ``` **Minor nit:** The code mixes `ubwc_version` (a local variable) with `cfg->ubwc_enc_version` for the `rgb565_predicator` check. This is semantically equivalent since `ubwc_version = cfg->ubwc_enc_version`, but inconsistent style within the same function. Not a bug, but worth noting. The range-based approach is better for forward compatibility -- new minor versions won't fall through to the `default` error case. --- Generated by Claude Code Patch Reviewer