Commit 606f015b authored by Dmitry Baryshkov's avatar Dmitry Baryshkov Committed by Rob Clark

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: default avatarAbhinav Kumar <quic_abhinavk@quicinc.com>
Signed-off-by: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Patchwork: https://patchwork.freedesktop.org/patch/489571/
Link: https://lore.kernel.org/r/20220615125703.24647-3-dmitry.baryshkov@linaro.orgSigned-off-by: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: default avatarRob Clark <robdclark@chromium.org>
parent bc778bb9
...@@ -1333,7 +1333,7 @@ static const struct dpu_vbif_dynamic_ot_cfg msm8998_ot_rdwr_cfg[] = { ...@@ -1333,7 +1333,7 @@ static const struct dpu_vbif_dynamic_ot_cfg msm8998_ot_rdwr_cfg[] = {
static const struct dpu_vbif_cfg msm8998_vbif[] = { static const struct dpu_vbif_cfg msm8998_vbif[] = {
{ {
.name = "vbif_0", .id = VBIF_0, .name = "vbif_rt", .id = VBIF_RT,
.base = 0, .len = 0x1040, .base = 0, .len = 0x1040,
.default_ot_rd_limit = 32, .default_ot_rd_limit = 32,
.default_ot_wr_limit = 32, .default_ot_wr_limit = 32,
...@@ -1363,7 +1363,7 @@ static const struct dpu_vbif_cfg msm8998_vbif[] = { ...@@ -1363,7 +1363,7 @@ static const struct dpu_vbif_cfg msm8998_vbif[] = {
static const struct dpu_vbif_cfg sdm845_vbif[] = { static const struct dpu_vbif_cfg sdm845_vbif[] = {
{ {
.name = "vbif_0", .id = VBIF_0, .name = "vbif_rt", .id = VBIF_RT,
.base = 0, .len = 0x1040, .base = 0, .len = 0x1040,
.features = BIT(DPU_VBIF_QOS_REMAP), .features = BIT(DPU_VBIF_QOS_REMAP),
.xin_halt_timeout = 0x4000, .xin_halt_timeout = 0x4000,
......
...@@ -273,11 +273,9 @@ enum dpu_wd_timer { ...@@ -273,11 +273,9 @@ enum dpu_wd_timer {
}; };
enum dpu_vbif { enum dpu_vbif {
VBIF_0, VBIF_RT,
VBIF_1, VBIF_NRT,
VBIF_MAX, VBIF_MAX,
VBIF_RT = VBIF_0,
VBIF_NRT = VBIF_1
}; };
/** /**
......
...@@ -19,6 +19,18 @@ static struct dpu_hw_vbif *dpu_get_vbif(struct dpu_kms *dpu_kms, enum dpu_vbif v ...@@ -19,6 +19,18 @@ static struct dpu_hw_vbif *dpu_get_vbif(struct dpu_kms *dpu_kms, enum dpu_vbif v
return NULL; return NULL;
} }
static const char *dpu_vbif_name(enum dpu_vbif idx)
{
switch (idx) {
case VBIF_RT:
return "VBIF_RT";
case VBIF_NRT:
return "VBIF_NRT";
default:
return "??";
}
}
/** /**
* _dpu_vbif_wait_for_xin_halt - wait for the xin to halt * _dpu_vbif_wait_for_xin_halt - wait for the xin to halt
* @vbif: Pointer to hardware vbif driver * @vbif: Pointer to hardware vbif driver
...@@ -50,12 +62,12 @@ static int _dpu_vbif_wait_for_xin_halt(struct dpu_hw_vbif *vbif, u32 xin_id) ...@@ -50,12 +62,12 @@ static int _dpu_vbif_wait_for_xin_halt(struct dpu_hw_vbif *vbif, u32 xin_id)
if (!status) { if (!status) {
rc = -ETIMEDOUT; rc = -ETIMEDOUT;
DPU_ERROR("VBIF %d client %d not halting. TIMEDOUT.\n", DPU_ERROR("%s client %d not halting. TIMEDOUT.\n",
vbif->idx - VBIF_0, xin_id); dpu_vbif_name(vbif->idx), xin_id);
} else { } else {
rc = 0; rc = 0;
DRM_DEBUG_ATOMIC("VBIF %d client %d is halted\n", DRM_DEBUG_ATOMIC("%s client %d is halted\n",
vbif->idx - VBIF_0, xin_id); dpu_vbif_name(vbif->idx), xin_id);
} }
return rc; return rc;
...@@ -95,8 +107,8 @@ static void _dpu_vbif_apply_dynamic_ot_limit(struct dpu_hw_vbif *vbif, ...@@ -95,8 +107,8 @@ static void _dpu_vbif_apply_dynamic_ot_limit(struct dpu_hw_vbif *vbif,
} }
} }
DRM_DEBUG_ATOMIC("vbif:%d xin:%d w:%d h:%d fps:%d pps:%llu ot:%u\n", DRM_DEBUG_ATOMIC("%s xin:%d w:%d h:%d fps:%d pps:%llu ot:%u\n",
vbif->idx - VBIF_0, params->xin_id, dpu_vbif_name(vbif->idx), params->xin_id,
params->width, params->height, params->frame_rate, params->width, params->height, params->frame_rate,
pps, *ot_lim); pps, *ot_lim);
} }
...@@ -141,8 +153,8 @@ static u32 _dpu_vbif_get_ot_limit(struct dpu_hw_vbif *vbif, ...@@ -141,8 +153,8 @@ static u32 _dpu_vbif_get_ot_limit(struct dpu_hw_vbif *vbif,
} }
exit: exit:
DRM_DEBUG_ATOMIC("vbif:%d xin:%d ot_lim:%d\n", DRM_DEBUG_ATOMIC("%s xin:%d ot_lim:%d\n",
vbif->idx - VBIF_0, params->xin_id, ot_lim); dpu_vbif_name(vbif->idx), params->xin_id, ot_lim);
return ot_lim; return ot_lim;
} }
...@@ -242,8 +254,8 @@ void dpu_vbif_set_qos_remap(struct dpu_kms *dpu_kms, ...@@ -242,8 +254,8 @@ void dpu_vbif_set_qos_remap(struct dpu_kms *dpu_kms,
forced_on = mdp->ops.setup_clk_force_ctrl(mdp, params->clk_ctrl, true); forced_on = mdp->ops.setup_clk_force_ctrl(mdp, params->clk_ctrl, true);
for (i = 0; i < qos_tbl->npriority_lvl; i++) { for (i = 0; i < qos_tbl->npriority_lvl; i++) {
DRM_DEBUG_ATOMIC("vbif:%d xin:%d lvl:%d/%d\n", DRM_DEBUG_ATOMIC("%s xin:%d lvl:%d/%d\n",
params->vbif_idx, params->xin_id, i, dpu_vbif_name(params->vbif_idx), params->xin_id, i,
qos_tbl->priority_lvl[i]); qos_tbl->priority_lvl[i]);
vbif->ops.set_qos_remap(vbif, params->xin_id, i, vbif->ops.set_qos_remap(vbif, params->xin_id, i,
qos_tbl->priority_lvl[i]); qos_tbl->priority_lvl[i]);
...@@ -263,8 +275,8 @@ void dpu_vbif_clear_errors(struct dpu_kms *dpu_kms) ...@@ -263,8 +275,8 @@ void dpu_vbif_clear_errors(struct dpu_kms *dpu_kms)
if (vbif && vbif->ops.clear_errors) { if (vbif && vbif->ops.clear_errors) {
vbif->ops.clear_errors(vbif, &pnd, &src); vbif->ops.clear_errors(vbif, &pnd, &src);
if (pnd || src) { if (pnd || src) {
DRM_DEBUG_KMS("VBIF %d: pnd 0x%X, src 0x%X\n", DRM_DEBUG_KMS("%s: pnd 0x%X, src 0x%X\n",
vbif->idx - VBIF_0, pnd, src); dpu_vbif_name(vbif->idx), pnd, src);
} }
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment