Lines Matching refs:rsc

38 	hw = src->rsc.hw;  in src_set_state()
39 hw->src_set_state(src->rsc.ctrl_blk, state); in src_set_state()
48 hw = src->rsc.hw; in src_set_bm()
49 hw->src_set_bm(src->rsc.ctrl_blk, bm); in src_set_bm()
58 hw = src->rsc.hw; in src_set_sf()
59 hw->src_set_sf(src->rsc.ctrl_blk, sf); in src_set_sf()
68 hw = src->rsc.hw; in src_set_pm()
69 hw->src_set_pm(src->rsc.ctrl_blk, pm); in src_set_pm()
78 hw = src->rsc.hw; in src_set_rom()
79 hw->src_set_rom(src->rsc.ctrl_blk, rom); in src_set_rom()
88 hw = src->rsc.hw; in src_set_vo()
89 hw->src_set_vo(src->rsc.ctrl_blk, vo); in src_set_vo()
98 hw = src->rsc.hw; in src_set_st()
99 hw->src_set_st(src->rsc.ctrl_blk, st); in src_set_st()
108 hw = src->rsc.hw; in src_set_bp()
109 hw->src_set_bp(src->rsc.ctrl_blk, bp); in src_set_bp()
118 hw = src->rsc.hw; in src_set_cisz()
119 hw->src_set_cisz(src->rsc.ctrl_blk, cisz); in src_set_cisz()
128 hw = src->rsc.hw; in src_set_ca()
129 hw->src_set_ca(src->rsc.ctrl_blk, ca); in src_set_ca()
138 hw = src->rsc.hw; in src_set_sa()
139 hw->src_set_sa(src->rsc.ctrl_blk, sa); in src_set_sa()
148 hw = src->rsc.hw; in src_set_la()
149 hw->src_set_la(src->rsc.ctrl_blk, la); in src_set_la()
158 hw = src->rsc.hw; in src_set_pitch()
159 hw->src_set_pitch(src->rsc.ctrl_blk, pitch); in src_set_pitch()
168 hw = src->rsc.hw; in src_set_clear_zbufs()
169 hw->src_set_clear_zbufs(src->rsc.ctrl_blk, 1); in src_set_clear_zbufs()
180 hw = src->rsc.hw; in src_commit_write()
181 src->rsc.ops->master(&src->rsc); in src_commit_write()
182 if (src->rsc.msr > 1) { in src_commit_write()
184 dirty = hw->src_get_dirty(src->rsc.ctrl_blk) & conj_mask; in src_commit_write()
186 hw->src_commit_write(hw, src->rsc.ops->index(&src->rsc), in src_commit_write()
187 src->rsc.ctrl_blk); in src_commit_write()
193 for (i = 1; i < src->rsc.msr; i++) { in src_commit_write()
194 src->rsc.ops->next_conj(&src->rsc); in src_commit_write()
195 hw->src_set_dirty(src->rsc.ctrl_blk, dirty); in src_commit_write()
196 hw->src_commit_write(hw, src->rsc.ops->index(&src->rsc), in src_commit_write()
197 src->rsc.ctrl_blk); in src_commit_write()
199 src->rsc.ops->master(&src->rsc); in src_commit_write()
208 hw = src->rsc.hw; in src_get_ca()
209 return hw->src_get_ca(hw, src->rsc.ops->index(&src->rsc), in src_get_ca()
210 src->rsc.ctrl_blk); in src_get_ca()
227 struct hw *hw = src->rsc.hw; in src_default_config_memrd()
230 hw->src_set_state(src->rsc.ctrl_blk, SRC_STATE_OFF); in src_default_config_memrd()
231 hw->src_set_bm(src->rsc.ctrl_blk, 1); in src_default_config_memrd()
232 for (rsr = 0, msr = src->rsc.msr; msr > 1; msr >>= 1) in src_default_config_memrd()
235 hw->src_set_rsr(src->rsc.ctrl_blk, rsr); in src_default_config_memrd()
236 hw->src_set_sf(src->rsc.ctrl_blk, SRC_SF_S16); in src_default_config_memrd()
237 hw->src_set_wr(src->rsc.ctrl_blk, 0); in src_default_config_memrd()
238 hw->src_set_pm(src->rsc.ctrl_blk, 0); in src_default_config_memrd()
239 hw->src_set_rom(src->rsc.ctrl_blk, 0); in src_default_config_memrd()
240 hw->src_set_vo(src->rsc.ctrl_blk, 0); in src_default_config_memrd()
241 hw->src_set_st(src->rsc.ctrl_blk, 0); in src_default_config_memrd()
242 hw->src_set_ilsz(src->rsc.ctrl_blk, src->multi - 1); in src_default_config_memrd()
243 hw->src_set_cisz(src->rsc.ctrl_blk, 0x80); in src_default_config_memrd()
244 hw->src_set_sa(src->rsc.ctrl_blk, 0x0); in src_default_config_memrd()
245 hw->src_set_la(src->rsc.ctrl_blk, 0x1000); in src_default_config_memrd()
246 hw->src_set_ca(src->rsc.ctrl_blk, 0x80); in src_default_config_memrd()
247 hw->src_set_pitch(src->rsc.ctrl_blk, 0x1000000); in src_default_config_memrd()
248 hw->src_set_clear_zbufs(src->rsc.ctrl_blk, 1); in src_default_config_memrd()
250 src->rsc.ops->master(&src->rsc); in src_default_config_memrd()
251 hw->src_commit_write(hw, src->rsc.ops->index(&src->rsc), in src_default_config_memrd()
252 src->rsc.ctrl_blk); in src_default_config_memrd()
254 for (msr = 1; msr < src->rsc.msr; msr++) { in src_default_config_memrd()
255 src->rsc.ops->next_conj(&src->rsc); in src_default_config_memrd()
256 hw->src_set_pitch(src->rsc.ctrl_blk, 0x1000000); in src_default_config_memrd()
257 hw->src_commit_write(hw, src->rsc.ops->index(&src->rsc), in src_default_config_memrd()
258 src->rsc.ctrl_blk); in src_default_config_memrd()
260 src->rsc.ops->master(&src->rsc); in src_default_config_memrd()
267 struct hw *hw = src->rsc.hw; in src_default_config_memwr()
269 hw->src_set_state(src->rsc.ctrl_blk, SRC_STATE_OFF); in src_default_config_memwr()
270 hw->src_set_bm(src->rsc.ctrl_blk, 1); in src_default_config_memwr()
271 hw->src_set_rsr(src->rsc.ctrl_blk, 0); in src_default_config_memwr()
272 hw->src_set_sf(src->rsc.ctrl_blk, SRC_SF_S16); in src_default_config_memwr()
273 hw->src_set_wr(src->rsc.ctrl_blk, 1); in src_default_config_memwr()
274 hw->src_set_pm(src->rsc.ctrl_blk, 0); in src_default_config_memwr()
275 hw->src_set_rom(src->rsc.ctrl_blk, 0); in src_default_config_memwr()
276 hw->src_set_vo(src->rsc.ctrl_blk, 0); in src_default_config_memwr()
277 hw->src_set_st(src->rsc.ctrl_blk, 0); in src_default_config_memwr()
278 hw->src_set_ilsz(src->rsc.ctrl_blk, 0); in src_default_config_memwr()
279 hw->src_set_cisz(src->rsc.ctrl_blk, 0x80); in src_default_config_memwr()
280 hw->src_set_sa(src->rsc.ctrl_blk, 0x0); in src_default_config_memwr()
281 hw->src_set_la(src->rsc.ctrl_blk, 0x1000); in src_default_config_memwr()
282 hw->src_set_ca(src->rsc.ctrl_blk, 0x80); in src_default_config_memwr()
283 hw->src_set_pitch(src->rsc.ctrl_blk, 0x1000000); in src_default_config_memwr()
284 hw->src_set_clear_zbufs(src->rsc.ctrl_blk, 1); in src_default_config_memwr()
286 src->rsc.ops->master(&src->rsc); in src_default_config_memwr()
287 hw->src_commit_write(hw, src->rsc.ops->index(&src->rsc), in src_default_config_memwr()
288 src->rsc.ctrl_blk); in src_default_config_memwr()
295 struct hw *hw = src->rsc.hw; in src_default_config_arcrw()
299 hw->src_set_state(src->rsc.ctrl_blk, SRC_STATE_OFF); in src_default_config_arcrw()
300 hw->src_set_bm(src->rsc.ctrl_blk, 0); in src_default_config_arcrw()
301 for (rsr = 0, msr = src->rsc.msr; msr > 1; msr >>= 1) in src_default_config_arcrw()
304 hw->src_set_rsr(src->rsc.ctrl_blk, rsr); in src_default_config_arcrw()
305 hw->src_set_sf(src->rsc.ctrl_blk, SRC_SF_F32); in src_default_config_arcrw()
306 hw->src_set_wr(src->rsc.ctrl_blk, 0); in src_default_config_arcrw()
307 hw->src_set_pm(src->rsc.ctrl_blk, 0); in src_default_config_arcrw()
308 hw->src_set_rom(src->rsc.ctrl_blk, 0); in src_default_config_arcrw()
309 hw->src_set_vo(src->rsc.ctrl_blk, 0); in src_default_config_arcrw()
310 hw->src_set_st(src->rsc.ctrl_blk, 0); in src_default_config_arcrw()
311 hw->src_set_ilsz(src->rsc.ctrl_blk, 0); in src_default_config_arcrw()
312 hw->src_set_cisz(src->rsc.ctrl_blk, 0x80); in src_default_config_arcrw()
313 hw->src_set_sa(src->rsc.ctrl_blk, 0x0); in src_default_config_arcrw()
315 hw->src_set_la(src->rsc.ctrl_blk, 0x1000); in src_default_config_arcrw()
317 hw->src_set_ca(src->rsc.ctrl_blk, 0x80); in src_default_config_arcrw()
318 hw->src_set_pitch(src->rsc.ctrl_blk, 0x1000000); in src_default_config_arcrw()
319 hw->src_set_clear_zbufs(src->rsc.ctrl_blk, 1); in src_default_config_arcrw()
321 dirty = hw->src_get_dirty(src->rsc.ctrl_blk); in src_default_config_arcrw()
322 src->rsc.ops->master(&src->rsc); in src_default_config_arcrw()
323 for (msr = 0; msr < src->rsc.msr; msr++) { in src_default_config_arcrw()
324 hw->src_set_dirty(src->rsc.ctrl_blk, dirty); in src_default_config_arcrw()
325 hw->src_commit_write(hw, src->rsc.ops->index(&src->rsc), in src_default_config_arcrw()
326 src->rsc.ctrl_blk); in src_default_config_arcrw()
327 src->rsc.ops->next_conj(&src->rsc); in src_default_config_arcrw()
329 src->rsc.ops->master(&src->rsc); in src_default_config_arcrw()
365 err = rsc_init(&p->rsc, idx + i, SRC, desc->msr, mgr->mgr.hw); in src_rsc_init()
386 rsc_uninit(&p->rsc); in src_rsc_init()
400 rsc_uninit(&p->rsc); in src_rsc_uninit()
472 src->rsc.ops->master(&src->rsc); in put_src_rsc()
475 src->rsc.ops->index(&src->rsc)); in put_src_rsc()
477 mgr_put_resource(&mgr->mgr, 1, src->rsc.ops->index(&src->rsc)); in put_src_rsc()
491 src->rsc.ops->master(&src->rsc); in src_enable_s()
492 for (i = 0; i < src->rsc.msr; i++) { in src_enable_s()
494 src->rsc.ops->index(&src->rsc)); in src_enable_s()
495 src->rsc.ops->next_conj(&src->rsc); in src_enable_s()
497 src->rsc.ops->master(&src->rsc); in src_enable_s()
507 src->rsc.ops->master(&src->rsc); in src_enable()
508 for (i = 0; i < src->rsc.msr; i++) { in src_enable()
510 src->rsc.ops->index(&src->rsc)); in src_enable()
511 src->rsc.ops->next_conj(&src->rsc); in src_enable()
513 src->rsc.ops->master(&src->rsc); in src_enable()
523 src->rsc.ops->master(&src->rsc); in src_disable()
524 for (i = 0; i < src->rsc.msr; i++) { in src_disable()
526 src->rsc.ops->index(&src->rsc)); in src_disable()
527 src->rsc.ops->next_conj(&src->rsc); in src_disable()
529 src->rsc.ops->master(&src->rsc); in src_disable()
593 static void srcimp_master(struct rsc *rsc) in srcimp_master() argument
595 rsc->conj = 0; in srcimp_master()
596 rsc->idx = container_of(rsc, struct srcimp, rsc)->idx[0]; in srcimp_master()
599 static void srcimp_next_conj(struct rsc *rsc) in srcimp_next_conj() argument
601 rsc->conj++; in srcimp_next_conj()
604 static int srcimp_index(const struct rsc *rsc) in srcimp_index() argument
606 return container_of(rsc, struct srcimp, rsc)->idx[rsc->conj]; in srcimp_index()
616 static int srcimp_map(struct srcimp *srcimp, struct src *src, struct rsc *input) in srcimp_map()
621 srcimp->rsc.ops->master(&srcimp->rsc); in srcimp_map()
622 src->rsc.ops->master(&src->rsc); in srcimp_map()
626 for (i = 0; i < srcimp->rsc.msr; i++) { in srcimp_map()
629 entry->user = src->rsc.ops->index(&src->rsc); in srcimp_map()
630 entry->addr = srcimp->rsc.ops->index(&srcimp->rsc); in srcimp_map()
634 srcimp->rsc.ops->next_conj(&srcimp->rsc); in srcimp_map()
638 srcimp->rsc.ops->master(&srcimp->rsc); in srcimp_map()
649 for (i = 0; i < srcimp->rsc.msr; i++) { in srcimp_unmap()
671 err = rsc_init(&srcimp->rsc, srcimp->idx[0], in srcimp_rsc_init()
685 srcimp->rsc.ops = &srcimp_basic_rsc_ops; in srcimp_rsc_init()
689 srcimp->rsc.ops->master(&srcimp->rsc); in srcimp_rsc_init()
694 rsc_uninit(&srcimp->rsc); in srcimp_rsc_init()
704 rsc_uninit(&srcimp->rsc); in srcimp_rsc_uninit()
766 for (i = 0; i < srcimp->rsc.msr; i++) in put_srcimp_rsc()