Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/msm/dpu: drop VBIF indices

We do not expect to have other VBIFs. Drop VBIF_n indices and always use
VBIF_RT and VBIF_NRT.

Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Patchwork: https://patchwork.freedesktop.org/patch/489571/
Link: https://lore.kernel.org/r/20220615125703.24647-3-dmitry.baryshkov@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Rob Clark <robdclark@chromium.org>

authored by

Dmitry Baryshkov and committed by
Rob Clark
606f015b bc778bb9

+28 -18
+2 -2
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c
··· 1333 1333 1334 1334 static const struct dpu_vbif_cfg msm8998_vbif[] = { 1335 1335 { 1336 - .name = "vbif_0", .id = VBIF_0, 1336 + .name = "vbif_rt", .id = VBIF_RT, 1337 1337 .base = 0, .len = 0x1040, 1338 1338 .default_ot_rd_limit = 32, 1339 1339 .default_ot_wr_limit = 32, ··· 1363 1363 1364 1364 static const struct dpu_vbif_cfg sdm845_vbif[] = { 1365 1365 { 1366 - .name = "vbif_0", .id = VBIF_0, 1366 + .name = "vbif_rt", .id = VBIF_RT, 1367 1367 .base = 0, .len = 0x1040, 1368 1368 .features = BIT(DPU_VBIF_QOS_REMAP), 1369 1369 .xin_halt_timeout = 0x4000,
+2 -4
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_mdss.h
··· 273 273 }; 274 274 275 275 enum dpu_vbif { 276 - VBIF_0, 277 - VBIF_1, 276 + VBIF_RT, 277 + VBIF_NRT, 278 278 VBIF_MAX, 279 - VBIF_RT = VBIF_0, 280 - VBIF_NRT = VBIF_1 281 279 }; 282 280 283 281 /**
+24 -12
drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.c
··· 19 19 return NULL; 20 20 } 21 21 22 + static const char *dpu_vbif_name(enum dpu_vbif idx) 23 + { 24 + switch (idx) { 25 + case VBIF_RT: 26 + return "VBIF_RT"; 27 + case VBIF_NRT: 28 + return "VBIF_NRT"; 29 + default: 30 + return "??"; 31 + } 32 + } 33 + 22 34 /** 23 35 * _dpu_vbif_wait_for_xin_halt - wait for the xin to halt 24 36 * @vbif: Pointer to hardware vbif driver ··· 62 50 63 51 if (!status) { 64 52 rc = -ETIMEDOUT; 65 - DPU_ERROR("VBIF %d client %d not halting. TIMEDOUT.\n", 66 - vbif->idx - VBIF_0, xin_id); 53 + DPU_ERROR("%s client %d not halting. TIMEDOUT.\n", 54 + dpu_vbif_name(vbif->idx), xin_id); 67 55 } else { 68 56 rc = 0; 69 - DRM_DEBUG_ATOMIC("VBIF %d client %d is halted\n", 70 - vbif->idx - VBIF_0, xin_id); 57 + DRM_DEBUG_ATOMIC("%s client %d is halted\n", 58 + dpu_vbif_name(vbif->idx), xin_id); 71 59 } 72 60 73 61 return rc; ··· 107 95 } 108 96 } 109 97 110 - DRM_DEBUG_ATOMIC("vbif:%d xin:%d w:%d h:%d fps:%d pps:%llu ot:%u\n", 111 - vbif->idx - VBIF_0, params->xin_id, 98 + DRM_DEBUG_ATOMIC("%s xin:%d w:%d h:%d fps:%d pps:%llu ot:%u\n", 99 + dpu_vbif_name(vbif->idx), params->xin_id, 112 100 params->width, params->height, params->frame_rate, 113 101 pps, *ot_lim); 114 102 } ··· 153 141 } 154 142 155 143 exit: 156 - DRM_DEBUG_ATOMIC("vbif:%d xin:%d ot_lim:%d\n", 157 - vbif->idx - VBIF_0, params->xin_id, ot_lim); 144 + DRM_DEBUG_ATOMIC("%s xin:%d ot_lim:%d\n", 145 + dpu_vbif_name(vbif->idx), params->xin_id, ot_lim); 158 146 return ot_lim; 159 147 } 160 148 ··· 254 242 forced_on = mdp->ops.setup_clk_force_ctrl(mdp, params->clk_ctrl, true); 255 243 256 244 for (i = 0; i < qos_tbl->npriority_lvl; i++) { 257 - DRM_DEBUG_ATOMIC("vbif:%d xin:%d lvl:%d/%d\n", 258 - params->vbif_idx, params->xin_id, i, 245 + DRM_DEBUG_ATOMIC("%s xin:%d lvl:%d/%d\n", 246 + dpu_vbif_name(params->vbif_idx), params->xin_id, i, 259 247 qos_tbl->priority_lvl[i]); 260 248 vbif->ops.set_qos_remap(vbif, params->xin_id, i, 261 249 qos_tbl->priority_lvl[i]); ··· 275 263 if (vbif && vbif->ops.clear_errors) { 276 264 vbif->ops.clear_errors(vbif, &pnd, &src); 277 265 if (pnd || src) { 278 - DRM_DEBUG_KMS("VBIF %d: pnd 0x%X, src 0x%X\n", 279 - vbif->idx - VBIF_0, pnd, src); 266 + DRM_DEBUG_KMS("%s: pnd 0x%X, src 0x%X\n", 267 + dpu_vbif_name(vbif->idx), pnd, src); 280 268 } 281 269 } 282 270 }