Re: [PATCH v3 16/27] drm/msm/adreno: use new helper to set amsbc

Konrad Dybcio
2026-03-13T10:31:17Z

On 3/12/26 2:29 PM, Dmitry Baryshkov wrote:
> Use freshly defined helper instead of checking the UBWC version
> directly.
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> ---
> drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 2 +-
> drivers/gpu/drm/msm/adreno/a8xx_gpu.c | 6 +++---
> 2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
> index 7be31de3b525..f6bd906f2ac9 100644
> --- a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
> +++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
> @@ -743,7 +743,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;
> diff --git a/drivers/gpu/drm/msm/adreno/a8xx_gpu.c b/drivers/gpu/drm/msm/adreno/a8xx_gpu.c
> index 680f0b1803a1..63934d21c831 100644
> --- a/drivers/gpu/drm/msm/adreno/a8xx_gpu.c
> +++ b/drivers/gpu/drm/msm/adreno/a8xx_gpu.c
> @@ -275,22 +275,22 @@ static void a8xx_set_ubwc_config(struct msm_gpu *gpu)
> u32 hbb, hbb_hi, hbb_lo, mode;
> u8 uavflagprd_inv = 2;
>
> + if (ubwc_version < UBWC_6_0)
> + amsbc = qcom_ubwc_enable_amsbc(cfg);

You may have better sources, but it's possible AMSBC is not a thing (or
not configurable) on UBWC6 at all

Konrad