drm/msm/adreno: use new helper to set amsbc

Use freshly defined helper instead of checking the UBWC version
directly.

Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Reviewed-by: Akhil P Oommen <akhilpo@oss.qualcomm.com>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Patchwork: https://patchwork.freedesktop.org/patch/726523/
Link: https://lore.kernel.org/r/20260520-ubwc-rework-v5-17-72f2749bc807@oss.qualcomm.com
This commit is contained in:
Dmitry Baryshkov 2026-05-20 17:51:24 +03:00
parent ca65f7f754
commit 82595de3ef
2 changed files with 3 additions and 6 deletions

View File

@ -747,7 +747,7 @@ static void a6xx_set_ubwc_config(struct msm_gpu *gpu)
bool rgb565_predicator = cfg->ubwc_enc_version >= UBWC_4_0;
u32 level2_swizzling_dis = !(qcom_ubwc_swizzle(cfg) & UBWC_SWIZZLE_ENABLE_LVL2);
bool ubwc_mode = qcom_ubwc_get_ubwc_mode(cfg);
bool amsbc = cfg->ubwc_enc_version >= UBWC_3_0;
bool amsbc = qcom_ubwc_enable_amsbc(cfg);
bool min_acc_len_64b;
u8 uavflagprd_inv = 0;
u32 hbb_hi = hbb >> 2;

View File

@ -279,7 +279,8 @@ static void a8xx_set_ubwc_config(struct msm_gpu *gpu)
u32 level3_swizzling_dis = !(qcom_ubwc_swizzle(cfg) & UBWC_SWIZZLE_ENABLE_LVL3);
bool rgba8888_lossless = false, fp16compoptdis = false;
bool yuvnotcomptofc = false, min_acc_len_64b = false;
bool rgb565_predicator = false, amsbc = false;
bool rgb565_predicator = false;
bool amsbc = qcom_ubwc_enable_amsbc(cfg);
bool ubwc_mode = qcom_ubwc_get_ubwc_mode(cfg);
u32 ubwc_version = cfg->ubwc_enc_version;
u32 hbb, hbb_hi, hbb_lo, mode;
@ -288,21 +289,17 @@ static void a8xx_set_ubwc_config(struct msm_gpu *gpu)
switch (ubwc_version) {
case UBWC_6_0:
yuvnotcomptofc = true;
amsbc = true;
rgb565_predicator = true;
break;
case UBWC_5_0:
amsbc = true;
rgb565_predicator = true;
break;
case UBWC_4_0:
amsbc = true;
rgb565_predicator = true;
fp16compoptdis = true;
rgba8888_lossless = true;
break;
case UBWC_3_0:
amsbc = true;
fp16compoptdis = true;
break;
default: