Lines Matching refs:vbif
20 static int _dpu_vbif_wait_for_xin_halt(struct dpu_hw_vbif *vbif, u32 xin_id) in _dpu_vbif_wait_for_xin_halt() argument
26 if (!vbif || !vbif->cap || !vbif->ops.get_halt_ctrl) { in _dpu_vbif_wait_for_xin_halt()
27 DPU_ERROR("invalid arguments vbif %d\n", vbif != 0); in _dpu_vbif_wait_for_xin_halt()
31 timeout = ktime_add_us(ktime_get(), vbif->cap->xin_halt_timeout); in _dpu_vbif_wait_for_xin_halt()
33 status = vbif->ops.get_halt_ctrl(vbif, xin_id); in _dpu_vbif_wait_for_xin_halt()
37 status = vbif->ops.get_halt_ctrl(vbif, xin_id); in _dpu_vbif_wait_for_xin_halt()
46 vbif->idx - VBIF_0, xin_id); in _dpu_vbif_wait_for_xin_halt()
50 vbif->idx - VBIF_0, xin_id); in _dpu_vbif_wait_for_xin_halt()
62 static void _dpu_vbif_apply_dynamic_ot_limit(struct dpu_hw_vbif *vbif, in _dpu_vbif_apply_dynamic_ot_limit() argument
69 if (!vbif || !(vbif->cap->features & BIT(DPU_VBIF_QOS_OTLIM))) in _dpu_vbif_apply_dynamic_ot_limit()
80 tbl = params->rd ? &vbif->cap->dynamic_ot_rd_tbl : in _dpu_vbif_apply_dynamic_ot_limit()
81 &vbif->cap->dynamic_ot_wr_tbl; in _dpu_vbif_apply_dynamic_ot_limit()
91 vbif->idx - VBIF_0, params->xin_id, in _dpu_vbif_apply_dynamic_ot_limit()
102 static u32 _dpu_vbif_get_ot_limit(struct dpu_hw_vbif *vbif, in _dpu_vbif_get_ot_limit() argument
108 if (!vbif || !vbif->cap) { in _dpu_vbif_get_ot_limit()
109 DPU_ERROR("invalid arguments vbif %d\n", vbif != 0); in _dpu_vbif_get_ot_limit()
113 if (vbif->cap->default_ot_wr_limit && !params->rd) in _dpu_vbif_get_ot_limit()
114 ot_lim = vbif->cap->default_ot_wr_limit; in _dpu_vbif_get_ot_limit()
115 else if (vbif->cap->default_ot_rd_limit && params->rd) in _dpu_vbif_get_ot_limit()
116 ot_lim = vbif->cap->default_ot_rd_limit; in _dpu_vbif_get_ot_limit()
126 _dpu_vbif_apply_dynamic_ot_limit(vbif, &ot_lim, params); in _dpu_vbif_get_ot_limit()
128 if (vbif && vbif->ops.get_limit_conf) { in _dpu_vbif_get_ot_limit()
129 val = vbif->ops.get_limit_conf(vbif, in _dpu_vbif_get_ot_limit()
137 vbif->idx - VBIF_0, params->xin_id, ot_lim); in _dpu_vbif_get_ot_limit()
151 struct dpu_hw_vbif *vbif = NULL; in dpu_vbif_set_ot_limit() local
166 vbif = dpu_kms->hw_vbif[i]; in dpu_vbif_set_ot_limit()
169 if (!vbif || !mdp) { in dpu_vbif_set_ot_limit()
171 vbif != 0, mdp != 0); in dpu_vbif_set_ot_limit()
176 !vbif->ops.set_limit_conf || in dpu_vbif_set_ot_limit()
177 !vbif->ops.set_halt_ctrl) in dpu_vbif_set_ot_limit()
181 if (vbif->ops.set_write_gather_en && !params->rd) in dpu_vbif_set_ot_limit()
182 vbif->ops.set_write_gather_en(vbif, params->xin_id); in dpu_vbif_set_ot_limit()
184 ot_lim = _dpu_vbif_get_ot_limit(vbif, params) & 0xFF; in dpu_vbif_set_ot_limit()
194 vbif->ops.set_limit_conf(vbif, params->xin_id, params->rd, ot_lim); in dpu_vbif_set_ot_limit()
196 vbif->ops.set_halt_ctrl(vbif, params->xin_id, true); in dpu_vbif_set_ot_limit()
198 ret = _dpu_vbif_wait_for_xin_halt(vbif, params->xin_id); in dpu_vbif_set_ot_limit()
200 trace_dpu_vbif_wait_xin_halt_fail(vbif->idx, params->xin_id); in dpu_vbif_set_ot_limit()
202 vbif->ops.set_halt_ctrl(vbif, params->xin_id, false); in dpu_vbif_set_ot_limit()
211 struct dpu_hw_vbif *vbif = NULL; in dpu_vbif_set_qos_remap() local
226 vbif = dpu_kms->hw_vbif[i]; in dpu_vbif_set_qos_remap()
231 if (!vbif || !vbif->cap) { in dpu_vbif_set_qos_remap()
236 if (!vbif->ops.set_qos_remap || !mdp->ops.setup_clk_force_ctrl) { in dpu_vbif_set_qos_remap()
241 qos_tbl = params->is_rt ? &vbif->cap->qos_rt_tbl : in dpu_vbif_set_qos_remap()
242 &vbif->cap->qos_nrt_tbl; in dpu_vbif_set_qos_remap()
255 vbif->ops.set_qos_remap(vbif, params->xin_id, i, in dpu_vbif_set_qos_remap()
265 struct dpu_hw_vbif *vbif; in dpu_vbif_clear_errors() local
269 vbif = dpu_kms->hw_vbif[i]; in dpu_vbif_clear_errors()
270 if (vbif && vbif->ops.clear_errors) { in dpu_vbif_clear_errors()
271 vbif->ops.clear_errors(vbif, &pnd, &src); in dpu_vbif_clear_errors()
274 vbif->idx - VBIF_0, pnd, src); in dpu_vbif_clear_errors()
282 struct dpu_hw_vbif *vbif; in dpu_vbif_init_memtypes() local
286 vbif = dpu_kms->hw_vbif[i]; in dpu_vbif_init_memtypes()
287 if (vbif && vbif->cap && vbif->ops.set_mem_type) { in dpu_vbif_init_memtypes()
288 for (j = 0; j < vbif->cap->memtype_count; j++) in dpu_vbif_init_memtypes()
289 vbif->ops.set_mem_type( in dpu_vbif_init_memtypes()
290 vbif, j, vbif->cap->memtype[j]); in dpu_vbif_init_memtypes()
306 struct dpu_vbif_cfg *vbif = &dpu_kms->catalog->vbif[i]; in dpu_debugfs_vbif_init() local
308 snprintf(vbif_name, sizeof(vbif_name), "%d", vbif->id); in dpu_debugfs_vbif_init()
313 (u32 *)&vbif->features); in dpu_debugfs_vbif_init()
316 (u32 *)&vbif->xin_halt_timeout); in dpu_debugfs_vbif_init()
319 (u32 *)&vbif->default_ot_rd_limit); in dpu_debugfs_vbif_init()
322 (u32 *)&vbif->default_ot_wr_limit); in dpu_debugfs_vbif_init()
324 for (j = 0; j < vbif->dynamic_ot_rd_tbl.count; j++) { in dpu_debugfs_vbif_init()
326 &vbif->dynamic_ot_rd_tbl.cfg[j]; in dpu_debugfs_vbif_init()
338 for (j = 0; j < vbif->dynamic_ot_wr_tbl.count; j++) { in dpu_debugfs_vbif_init()
340 &vbif->dynamic_ot_wr_tbl.cfg[j]; in dpu_debugfs_vbif_init()