Lines Matching refs:cs

84 /* cs functions */
88 int (*cs_write_reloc)(struct radeon_cs *cs,
93 int (*cs_begin)(struct radeon_cs *cs,
98 int (*cs_end)(struct radeon_cs *cs,
102 int (*cs_emit)(struct radeon_cs *cs);
103 int (*cs_destroy)(struct radeon_cs *cs);
104 int (*cs_erase)(struct radeon_cs *cs);
105 int (*cs_need_flush)(struct radeon_cs *cs);
106 void (*cs_print)(struct radeon_cs *cs, FILE *file);
123 static inline int radeon_cs_write_reloc(struct radeon_cs *cs,
129 return cs->csm->funcs->cs_write_reloc(cs,
136 static inline int radeon_cs_begin(struct radeon_cs *cs,
142 return cs->csm->funcs->cs_begin(cs, ndw, file, func, line);
145 static inline int radeon_cs_end(struct radeon_cs *cs,
150 return cs->csm->funcs->cs_end(cs, file, func, line);
153 static inline int radeon_cs_emit(struct radeon_cs *cs)
155 return cs->csm->funcs->cs_emit(cs);
158 static inline int radeon_cs_destroy(struct radeon_cs *cs)
160 return cs->csm->funcs->cs_destroy(cs);
163 static inline int radeon_cs_erase(struct radeon_cs *cs)
165 return cs->csm->funcs->cs_erase(cs);
168 static inline int radeon_cs_need_flush(struct radeon_cs *cs)
170 return cs->csm->funcs->cs_need_flush(cs);
173 static inline void radeon_cs_print(struct radeon_cs *cs, FILE *file)
175 cs->csm->funcs->cs_print(cs, file);
178 static inline void radeon_cs_set_limit(struct radeon_cs *cs, uint32_t domain, uint32_t limit)
182 cs->csm->vram_limit = limit;
184 cs->csm->gart_limit = limit;
187 static inline void radeon_cs_write_dword(struct radeon_cs *cs, uint32_t dword)
189 cs->packets[cs->cdw++] = dword;
190 if (cs->section) {
191 cs->section_cdw++;
195 static inline void radeon_cs_write_qword(struct radeon_cs *cs, uint64_t qword)
197 memcpy(cs->packets + cs->cdw, &qword, sizeof(uint64_t));
198 cs->cdw += 2;
199 if (cs->section) {
200 cs->section_cdw += 2;
204 static inline void radeon_cs_write_table(struct radeon_cs *cs, void *data, uint32_t size)
206 memcpy(cs->packets + cs->cdw, data, size * 4);
207 cs->cdw += size;
208 if (cs->section) {
209 cs->section_cdw += size;
213 static inline void radeon_cs_space_set_flush(struct radeon_cs *cs, void (*fn)(void *), void *data)
215 cs->space_flush_fn = fn;
216 cs->space_flush_data = data;
227 void radeon_cs_space_add_persistent_bo(struct radeon_cs *cs,
233 void radeon_cs_space_reset_bos(struct radeon_cs *cs);
236 int radeon_cs_space_check(struct radeon_cs *cs);
241 int radeon_cs_space_check_with_bo(struct radeon_cs *cs,