Lines Matching defs:reg
155 #define ADD_RANGE_MARK(reg, count, mark) \
156 for (i = ((reg) >> 2); i < ((reg) >> 2) + (count); i++)\
162 #define ADD_RANGE(reg, count) ADD_RANGE_MARK(reg, count, MARK_SAFE)
251 static __inline__ int r300_check_range(unsigned reg, int count)
254 if (reg & ~0xffff)
256 for (i = (reg >> 2); i < (reg >> 2) + count; i++)
266 int reg;
273 reg = (header.packet0.reghi << 8) | header.packet0.reglo;
277 "(reg=%04x sz=%d)\n", reg, sz);
282 switch (r300_reg_flags[(reg >> 2) + i]) {
288 "(reg=%04x sz=%d)\n", reg, sz);
294 reg + i * 4, r300_reg_flags[(reg >> 2) + i]);
300 OUT_RING(CP_PACKET0(reg, sz - 1));
320 int reg;
325 reg = (header.packet0.reghi << 8) | header.packet0.reglo;
333 if (reg + sz * 4 >= 0x10000) {
334 DRM_ERROR("No such registers in hardware reg=%04x sz=%d\n",
335 reg, sz);
339 if (r300_check_range(reg, sz)) {
350 OUT_RING(CP_PACKET0(reg, sz - 1));
549 DRM_ERROR("Invalid indx_buffer reg address %08X\n", cmd[1]);
758 if (header.scratch.reg >= 5) {
762 dev_priv->scratch_ages[header.scratch.reg] ++;
774 &dev_priv->scratch_ages[header.scratch.reg],
800 OUT_RING(CP_PACKET0(RADEON_SCRATCH_REG0 + header.scratch.reg * 4, 0));
801 OUT_RING(dev_priv->scratch_ages[header.scratch.reg]);