Lines Matching refs:rule
138 imc_decode_sad_interleave(const imc_sad_rule_t *rule, uint64_t pa) in imc_decode_sad_interleave() argument
142 switch (rule->isr_imode) { in imc_decode_sad_interleave()
144 if (rule->isr_a7mode) { in imc_decode_sad_interleave()
152 if (rule->isr_a7mode) { in imc_decode_sad_interleave()
188 const imc_sad_rule_t *rule; in imc_decode_sad() local
196 for (rule = NULL, i = 0, base = 0; i < sad->isad_nrules; i++) { in imc_decode_sad()
197 rule = &sad->isad_rules[i]; in imc_decode_sad()
199 if (rule->isr_enable && dec->ids_pa >= base && in imc_decode_sad()
200 dec->ids_pa < rule->isr_limit) { in imc_decode_sad()
204 base = rule->isr_limit; in imc_decode_sad()
207 if (rule == NULL || i == sad->isad_nrules) { in imc_decode_sad()
216 dec->ids_sad_rule = rule; in imc_decode_sad()
226 ileaveidx = imc_decode_sad_interleave(rule, dec->ids_pa); in imc_decode_sad()
227 if (ileaveidx >= rule->isr_ntargets) { in imc_decode_sad()
232 ileavetgt = rule->isr_targets[ileaveidx]; in imc_decode_sad()
269 if (rule->isr_need_mod3) { in imc_decode_sad()
273 switch (rule->isr_mod_mode) { in imc_decode_sad()
288 switch (rule->isr_mod_type) { in imc_decode_sad()
426 const imc_tad_rule_t *rule = dec->ids_tad_rule; in imc_decode_tad_channel() local
437 index = index / rule->itr_sock_way; in imc_decode_tad_channel()
447 index %= rule->itr_chan_way; in imc_decode_tad_channel()
448 if (index >= rule->itr_ntargets) { in imc_decode_tad_channel()
454 dec->ids_channelid = rule->itr_targets[index]; in imc_decode_tad_channel()
492 const imc_tad_rule_t *rule = NULL; in imc_decode_tad() local
500 rule = &tad->itad_rules[i]; in imc_decode_tad()
502 if (dec->ids_pa >= rule->itr_base && in imc_decode_tad()
503 dec->ids_pa < rule->itr_limit) { in imc_decode_tad()
508 if (rule == NULL || i == tad->itad_nrules) { in imc_decode_tad()
513 dec->ids_tad_rule = rule; in imc_decode_tad()
520 if (rule->itr_chan_way == 3) { in imc_decode_tad()
589 chanshift = imc_tad_gran_to_shift(tad, rule->itr_chan_gran); in imc_decode_tad()
590 sockshift = imc_tad_gran_to_shift(tad, rule->itr_sock_gran); in imc_decode_tad()
596 chanaddr /= rule->itr_sock_way; in imc_decode_tad()
600 chanaddr /= rule->itr_chan_way; in imc_decode_tad()