Lines Matching refs:wa

87 static void _wa_add(struct i915_wa_list *wal, const struct i915_wa *wa)  in _wa_add()  argument
89 unsigned int addr = i915_mmio_reg_offset(wa->reg); in _wa_add()
99 list = kmalloc_array(ALIGN(wal->count + 1, grow), sizeof(*wa), in _wa_add()
107 memcpy(list, wal->list, sizeof(*wa) * wal->count); in _wa_add()
124 if ((wa->clr | wa_->clr) && !(wa->clr & ~wa_->clr)) { in _wa_add()
129 wa_->set &= ~wa->clr; in _wa_add()
133 wa_->set |= wa->set; in _wa_add()
134 wa_->clr |= wa->clr; in _wa_add()
135 wa_->read |= wa->read; in _wa_add()
142 *wa_ = *wa; in _wa_add()
158 struct i915_wa wa = { in wa_add() local
166 _wa_add(wal, &wa); in wa_add()
831 struct i915_wa *wa; in intel_engine_emit_ctx_wa() local
848 for (i = 0, wa = wal->list; i < wal->count; i++, wa++) { in intel_engine_emit_ctx_wa()
849 *cs++ = i915_mmio_reg_offset(wa->reg); in intel_engine_emit_ctx_wa()
850 *cs++ = wa->set; in intel_engine_emit_ctx_wa()
1584 struct i915_wa *wa; in wal_get_fw_for_rmw() local
1587 for (i = 0, wa = wal->list; i < wal->count; i++, wa++) in wal_get_fw_for_rmw()
1589 wa->reg, in wal_get_fw_for_rmw()
1597 wa_verify(const struct i915_wa *wa, u32 cur, const char *name, const char *from) in wa_verify() argument
1599 if ((cur ^ wa->set) & wa->read) { in wa_verify()
1601 name, from, i915_mmio_reg_offset(wa->reg), in wa_verify()
1602 cur, cur & wa->read, wa->set & wa->read); in wa_verify()
1616 struct i915_wa *wa; in wa_list_apply() local
1627 for (i = 0, wa = wal->list; i < wal->count; i++, wa++) { in wa_list_apply()
1631 old = wa->clr ? intel_gt_mcr_read_any_fw(gt, wa->reg) : 0; in wa_list_apply()
1632 val = (old & ~wa->clr) | wa->set; in wa_list_apply()
1633 if (val != old || !wa->clr) in wa_list_apply()
1634 intel_uncore_write_fw(uncore, wa->reg, val); in wa_list_apply()
1637 wa_verify(wa, intel_gt_mcr_read_any_fw(gt, wa->reg), in wa_list_apply()
1655 struct i915_wa *wa; in wa_list_verify() local
1666 for (i = 0, wa = wal->list; i < wal->count; i++, wa++) in wa_list_verify()
1667 ok &= wa_verify(wa, in wa_list_verify()
1668 intel_gt_mcr_read_any_fw(gt, wa->reg), in wa_list_verify()
1700 struct i915_wa wa = { in whitelist_reg_ext() local
1710 wa.reg.reg |= flags; in whitelist_reg_ext()
1711 _wa_add(wal, &wa); in whitelist_reg_ext()
2029 struct i915_wa *wa; in intel_engine_apply_whitelist() local
2035 for (i = 0, wa = wal->list; i < wal->count; i++, wa++) in intel_engine_apply_whitelist()
2038 i915_mmio_reg_offset(wa->reg)); in intel_engine_apply_whitelist()
2895 const struct i915_wa *wa; in wa_list_srm() local
2902 for (i = 0, wa = wal->list; i < wal->count; i++, wa++) { in wa_list_srm()
2903 if (!mcr_range(i915, i915_mmio_reg_offset(wa->reg))) in wa_list_srm()
2911 for (i = 0, wa = wal->list; i < wal->count; i++, wa++) { in wa_list_srm()
2912 u32 offset = i915_mmio_reg_offset(wa->reg); in wa_list_srm()
2931 const struct i915_wa *wa; in engine_wa_list_verify() local
2993 for (i = 0, wa = wal->list; i < wal->count; i++, wa++) { in engine_wa_list_verify()
2994 if (mcr_range(rq->engine->i915, i915_mmio_reg_offset(wa->reg))) in engine_wa_list_verify()
2997 if (!wa_verify(wa, results[i], wal->name, from)) in engine_wa_list_verify()