aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/evergreen_cs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/radeon/evergreen_cs.c')
-rw-r--r--drivers/gpu/drm/radeon/evergreen_cs.c32
1 files changed, 2 insertions, 30 deletions
diff --git a/drivers/gpu/drm/radeon/evergreen_cs.c b/drivers/gpu/drm/radeon/evergreen_cs.c
index a134790903d3..7fdfa8ea7570 100644
--- a/drivers/gpu/drm/radeon/evergreen_cs.c
+++ b/drivers/gpu/drm/radeon/evergreen_cs.c
@@ -122,12 +122,6 @@ static void evergreen_cs_track_init(struct evergreen_cs_track *track)
122 track->db_s_write_bo = NULL; 122 track->db_s_write_bo = NULL;
123} 123}
124 124
125static inline int evergreen_cs_track_validate_cb(struct radeon_cs_parser *p, int i)
126{
127 /* XXX fill in */
128 return 0;
129}
130
131static int evergreen_cs_track_check(struct radeon_cs_parser *p) 125static int evergreen_cs_track_check(struct radeon_cs_parser *p)
132{ 126{
133 struct evergreen_cs_track *track = p->track; 127 struct evergreen_cs_track *track = p->track;
@@ -236,28 +230,6 @@ static int evergreen_cs_packet_next_reloc(struct radeon_cs_parser *p,
236} 230}
237 231
238/** 232/**
239 * evergreen_cs_packet_next_is_pkt3_nop() - test if next packet is packet3 nop for reloc
240 * @parser: parser structure holding parsing context.
241 *
242 * Check next packet is relocation packet3, do bo validation and compute
243 * GPU offset using the provided start.
244 **/
245static inline int evergreen_cs_packet_next_is_pkt3_nop(struct radeon_cs_parser *p)
246{
247 struct radeon_cs_packet p3reloc;
248 int r;
249
250 r = evergreen_cs_packet_parse(p, &p3reloc, p->idx);
251 if (r) {
252 return 0;
253 }
254 if (p3reloc.type != PACKET_TYPE3 || p3reloc.opcode != PACKET3_NOP) {
255 return 0;
256 }
257 return 1;
258}
259
260/**
261 * evergreen_cs_packet_next_vline() - parse userspace VLINE packet 233 * evergreen_cs_packet_next_vline() - parse userspace VLINE packet
262 * @parser: parser structure holding parsing context. 234 * @parser: parser structure holding parsing context.
263 * 235 *
@@ -414,7 +386,7 @@ static int evergreen_cs_parse_packet0(struct radeon_cs_parser *p,
414 * if register is safe. If register is not flag as safe this function 386 * if register is safe. If register is not flag as safe this function
415 * will test it against a list of register needind special handling. 387 * will test it against a list of register needind special handling.
416 */ 388 */
417static inline int evergreen_cs_check_reg(struct radeon_cs_parser *p, u32 reg, u32 idx) 389static int evergreen_cs_check_reg(struct radeon_cs_parser *p, u32 reg, u32 idx)
418{ 390{
419 struct evergreen_cs_track *track = (struct evergreen_cs_track *)p->track; 391 struct evergreen_cs_track *track = (struct evergreen_cs_track *)p->track;
420 struct radeon_cs_reloc *reloc; 392 struct radeon_cs_reloc *reloc;
@@ -990,7 +962,7 @@ static inline int evergreen_cs_check_reg(struct radeon_cs_parser *p, u32 reg, u3
990 * This function will check that the resource has valid field and that 962 * This function will check that the resource has valid field and that
991 * the texture and mipmap bo object are big enough to cover this resource. 963 * the texture and mipmap bo object are big enough to cover this resource.
992 */ 964 */
993static inline int evergreen_check_texture_resource(struct radeon_cs_parser *p, u32 idx, 965static int evergreen_check_texture_resource(struct radeon_cs_parser *p, u32 idx,
994 struct radeon_bo *texture, 966 struct radeon_bo *texture,
995 struct radeon_bo *mipmap) 967 struct radeon_bo *mipmap)
996{ 968{