Home | History | Annotate | Download | only in radeon

Lines Matching refs:cs

43 			     struct radeon_winsys_cs *cs,
46 vram += cs->used_vram;
47 gtt += cs->used_gart;
58 * Add a buffer to the buffer list for the given command stream (CS).
60 * All buffers used by a CS must be added to the list. This tells the kernel
75 ring->cs, rbo->buf,
106 !radeon_cs_memory_below_limit(rctx->screen, ring->cs,
114 static inline void radeon_set_config_reg_seq(struct radeon_winsys_cs *cs, unsigned reg, unsigned num)
117 assert(cs->current.cdw + 2 + num <= cs->current.max_dw);
118 radeon_emit(cs, PKT3(PKT3_SET_CONFIG_REG, num, 0));
119 radeon_emit(cs, (reg - SI_CONFIG_REG_OFFSET) >> 2);
122 static inline void radeon_set_config_reg(struct radeon_winsys_cs *cs, unsigned reg, unsigned value)
124 radeon_set_config_reg_seq(cs, reg, 1);
125 radeon_emit(cs, value);
128 static inline void radeon_set_context_reg_seq(struct radeon_winsys_cs *cs, unsigned reg, unsigned num)
131 assert(cs->current.cdw + 2 + num <= cs->current.max_dw);
132 radeon_emit(cs, PKT3(PKT3_SET_CONTEXT_REG, num, 0));
133 radeon_emit(cs, (reg - SI_CONTEXT_REG_OFFSET) >> 2);
136 static inline void radeon_set_context_reg(struct radeon_winsys_cs *cs, unsigned reg, unsigned value)
138 radeon_set_context_reg_seq(cs, reg, 1);
139 radeon_emit(cs, value);
142 static inline void radeon_set_context_reg_idx(struct radeon_winsys_cs *cs,
147 assert(cs->current.cdw + 3 <= cs->current.max_dw);
148 radeon_emit(cs, PKT3(PKT3_SET_CONTEXT_REG, 1, 0));
149 radeon_emit(cs, (reg - SI_CONTEXT_REG_OFFSET) >> 2 | (idx << 28));
150 radeon_emit(cs, value);
153 static inline void radeon_set_sh_reg_seq(struct radeon_winsys_cs *cs, unsigned reg, unsigned num)
156 assert(cs->current.cdw + 2 + num <= cs->current.max_dw);
157 radeon_emit(cs, PKT3(PKT3_SET_SH_REG, num, 0));
158 radeon_emit(cs, (reg - SI_SH_REG_OFFSET) >> 2);
161 static inline void radeon_set_sh_reg(struct radeon_winsys_cs *cs, unsigned reg, unsigned value)
163 radeon_set_sh_reg_seq(cs, reg, 1);
164 radeon_emit(cs, value);
167 static inline void radeon_set_uconfig_reg_seq(struct radeon_winsys_cs *cs, unsigned reg, unsigned num)
170 assert(cs->current.cdw + 2 + num <= cs->current.max_dw);
171 radeon_emit(cs, PKT3(PKT3_SET_UCONFIG_REG, num, 0));
172 radeon_emit(cs, (reg - CIK_UCONFIG_REG_OFFSET) >> 2);
175 static inline void radeon_set_uconfig_reg(struct radeon_winsys_cs *cs, unsigned reg, unsigned value)
177 radeon_set_uconfig_reg_seq(cs, reg, 1);
178 radeon_emit(cs, value);
181 static inline void radeon_set_uconfig_reg_idx(struct radeon_winsys_cs *cs,
186 assert(cs->current.cdw + 3 <= cs->current.max_dw);
187 radeon_emit(cs, PKT3(PKT3_SET_UCONFIG_REG, 1, 0));
188 radeon_emit(cs, (reg - CIK_UCONFIG_REG_OFFSET) >> 2 | (idx << 28));
189 radeon_emit(cs, value);