mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 09:36:22 +02:00
drm/msm/adreno: use version ranges in A8xx UBWC code
In order to simplify handling of UBWC minor revisions (like 3.1 or 4.3) use version ranges instead of a case switch. 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/726506/ Link: https://lore.kernel.org/r/20260520-ubwc-rework-v5-18-72f2749bc807@oss.qualcomm.com
This commit is contained in:
parent
82595de3ef
commit
579f661140
|
|
@ -286,26 +286,24 @@ static void a8xx_set_ubwc_config(struct msm_gpu *gpu)
|
|||
u32 hbb, hbb_hi, hbb_lo, mode;
|
||||
u8 uavflagprd_inv = 2;
|
||||
|
||||
switch (ubwc_version) {
|
||||
case UBWC_6_0:
|
||||
yuvnotcomptofc = true;
|
||||
rgb565_predicator = true;
|
||||
break;
|
||||
case UBWC_5_0:
|
||||
rgb565_predicator = true;
|
||||
break;
|
||||
case UBWC_4_0:
|
||||
rgb565_predicator = true;
|
||||
fp16compoptdis = true;
|
||||
rgba8888_lossless = true;
|
||||
break;
|
||||
case UBWC_3_0:
|
||||
fp16compoptdis = true;
|
||||
break;
|
||||
default:
|
||||
if (ubwc_version > UBWC_6_0)
|
||||
dev_err(&gpu->pdev->dev, "Unknown UBWC version: 0x%x\n", ubwc_version);
|
||||
break;
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
if (ubwc_version < UBWC_3_0)
|
||||
dev_err(&gpu->pdev->dev, "Unsupported UBWC version: 0x%x\n", ubwc_version);
|
||||
|
||||
mode = qcom_ubwc_version_tag(cfg);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user