Lines Matching full:vbif

36  * @vbif:	Pointer to hardware vbif driver
40 static int _dpu_vbif_wait_for_xin_halt(struct dpu_hw_vbif *vbif, u32 xin_id) in _dpu_vbif_wait_for_xin_halt() argument
46 if (!vbif || !vbif->cap || !vbif->ops.get_halt_ctrl) { in _dpu_vbif_wait_for_xin_halt()
47 DPU_ERROR("invalid arguments vbif %d\n", vbif != NULL); in _dpu_vbif_wait_for_xin_halt()
51 timeout = ktime_add_us(ktime_get(), vbif->cap->xin_halt_timeout); in _dpu_vbif_wait_for_xin_halt()
53 status = vbif->ops.get_halt_ctrl(vbif, xin_id); in _dpu_vbif_wait_for_xin_halt()
57 status = vbif->ops.get_halt_ctrl(vbif, xin_id); in _dpu_vbif_wait_for_xin_halt()
66 dpu_vbif_name(vbif->idx), xin_id); in _dpu_vbif_wait_for_xin_halt()
70 dpu_vbif_name(vbif->idx), xin_id); in _dpu_vbif_wait_for_xin_halt()
78 * @vbif: Pointer to hardware vbif driver
82 static void _dpu_vbif_apply_dynamic_ot_limit(struct dpu_hw_vbif *vbif, in _dpu_vbif_apply_dynamic_ot_limit() argument
89 if (!vbif || !(vbif->cap->features & BIT(DPU_VBIF_QOS_OTLIM))) in _dpu_vbif_apply_dynamic_ot_limit()
100 tbl = params->rd ? &vbif->cap->dynamic_ot_rd_tbl : in _dpu_vbif_apply_dynamic_ot_limit()
101 &vbif->cap->dynamic_ot_wr_tbl; in _dpu_vbif_apply_dynamic_ot_limit()
111 dpu_vbif_name(vbif->idx), params->xin_id, in _dpu_vbif_apply_dynamic_ot_limit()
118 * @vbif: Pointer to hardware vbif driver
122 static u32 _dpu_vbif_get_ot_limit(struct dpu_hw_vbif *vbif, in _dpu_vbif_get_ot_limit() argument
128 if (!vbif || !vbif->cap) { in _dpu_vbif_get_ot_limit()
129 DPU_ERROR("invalid arguments vbif %d\n", vbif != NULL); in _dpu_vbif_get_ot_limit()
133 if (vbif->cap->default_ot_wr_limit && !params->rd) in _dpu_vbif_get_ot_limit()
134 ot_lim = vbif->cap->default_ot_wr_limit; in _dpu_vbif_get_ot_limit()
135 else if (vbif->cap->default_ot_rd_limit && params->rd) in _dpu_vbif_get_ot_limit()
136 ot_lim = vbif->cap->default_ot_rd_limit; in _dpu_vbif_get_ot_limit()
146 _dpu_vbif_apply_dynamic_ot_limit(vbif, &ot_lim, params); in _dpu_vbif_get_ot_limit()
148 if (vbif && vbif->ops.get_limit_conf) { in _dpu_vbif_get_ot_limit()
149 val = vbif->ops.get_limit_conf(vbif, in _dpu_vbif_get_ot_limit()
157 dpu_vbif_name(vbif->idx), params->xin_id, ot_lim); in _dpu_vbif_get_ot_limit()
171 struct dpu_hw_vbif *vbif; in dpu_vbif_set_ot_limit() local
175 vbif = dpu_get_vbif(dpu_kms, params->vbif_idx); in dpu_vbif_set_ot_limit()
176 if (!vbif) { in dpu_vbif_set_ot_limit()
177 DRM_DEBUG_ATOMIC("invalid arguments vbif %d\n", vbif != NULL); in dpu_vbif_set_ot_limit()
181 if (!vbif->ops.set_limit_conf || !vbif->ops.set_halt_ctrl) in dpu_vbif_set_ot_limit()
185 if (vbif->ops.set_write_gather_en && !params->rd) in dpu_vbif_set_ot_limit()
186 vbif->ops.set_write_gather_en(vbif, params->xin_id); in dpu_vbif_set_ot_limit()
188 ot_lim = _dpu_vbif_get_ot_limit(vbif, params) & 0xFF; in dpu_vbif_set_ot_limit()
196 vbif->ops.set_limit_conf(vbif, params->xin_id, params->rd, ot_lim); in dpu_vbif_set_ot_limit()
198 vbif->ops.set_halt_ctrl(vbif, params->xin_id, true); in dpu_vbif_set_ot_limit()
200 ret = _dpu_vbif_wait_for_xin_halt(vbif, params->xin_id); in dpu_vbif_set_ot_limit()
202 trace_dpu_vbif_wait_xin_halt_fail(vbif->idx, params->xin_id); in dpu_vbif_set_ot_limit()
204 vbif->ops.set_halt_ctrl(vbif, params->xin_id, false); in dpu_vbif_set_ot_limit()
210 struct dpu_hw_vbif *vbif; in dpu_vbif_set_qos_remap() local
219 vbif = dpu_get_vbif(dpu_kms, params->vbif_idx); in dpu_vbif_set_qos_remap()
221 if (!vbif || !vbif->cap) { in dpu_vbif_set_qos_remap()
222 DPU_ERROR("invalid vbif %d\n", params->vbif_idx); in dpu_vbif_set_qos_remap()
226 if (!vbif->ops.set_qos_remap) { in dpu_vbif_set_qos_remap()
231 qos_tbl = params->is_rt ? &vbif->cap->qos_rt_tbl : in dpu_vbif_set_qos_remap()
232 &vbif->cap->qos_nrt_tbl; in dpu_vbif_set_qos_remap()
243 vbif->ops.set_qos_remap(vbif, params->xin_id, i, in dpu_vbif_set_qos_remap()
250 struct dpu_hw_vbif *vbif; in dpu_vbif_clear_errors() local
254 vbif = dpu_kms->hw_vbif[i]; in dpu_vbif_clear_errors()
255 if (vbif && vbif->ops.clear_errors) { in dpu_vbif_clear_errors()
256 vbif->ops.clear_errors(vbif, &pnd, &src); in dpu_vbif_clear_errors()
259 dpu_vbif_name(vbif->idx), pnd, src); in dpu_vbif_clear_errors()
267 struct dpu_hw_vbif *vbif; in dpu_vbif_init_memtypes() local
271 vbif = dpu_kms->hw_vbif[i]; in dpu_vbif_init_memtypes()
272 if (vbif && vbif->cap && vbif->ops.set_mem_type) { in dpu_vbif_init_memtypes()
273 for (j = 0; j < vbif->cap->memtype_count; j++) in dpu_vbif_init_memtypes()
274 vbif->ops.set_mem_type( in dpu_vbif_init_memtypes()
275 vbif, j, vbif->cap->memtype[j]); in dpu_vbif_init_memtypes()
288 entry = debugfs_create_dir("vbif", debugfs_root); in dpu_debugfs_vbif_init()
291 const struct dpu_vbif_cfg *vbif = &dpu_kms->catalog->vbif[i]; in dpu_debugfs_vbif_init() local
293 snprintf(vbif_name, sizeof(vbif_name), "%d", vbif->id); in dpu_debugfs_vbif_init()
298 (u32 *)&vbif->features); in dpu_debugfs_vbif_init()
301 (u32 *)&vbif->xin_halt_timeout); in dpu_debugfs_vbif_init()
304 (u32 *)&vbif->default_ot_rd_limit); in dpu_debugfs_vbif_init()
307 (u32 *)&vbif->default_ot_wr_limit); in dpu_debugfs_vbif_init()
309 for (j = 0; j < vbif->dynamic_ot_rd_tbl.count; j++) { in dpu_debugfs_vbif_init()
311 &vbif->dynamic_ot_rd_tbl.cfg[j]; in dpu_debugfs_vbif_init()
323 for (j = 0; j < vbif->dynamic_ot_wr_tbl.count; j++) { in dpu_debugfs_vbif_init()
325 &vbif->dynamic_ot_wr_tbl.cfg[j]; in dpu_debugfs_vbif_init()