}
static void
-clif_process_worklist(struct clif_dump *clif)
+clif_dump_cl(struct clif_dump *clif, uint32_t start, uint32_t end)
{
- while (!list_empty(&clif->worklist)) {
- struct reloc_worklist_entry *reloc =
- list_first_entry(&clif->worklist,
- struct reloc_worklist_entry, link);
- list_del(&reloc->link);
-
- void *vaddr;
- if (!clif->lookup_vaddr(clif->data, reloc->addr, &vaddr)) {
- out(clif, "Failed to look up address 0x%08x\n",
- reloc->addr);
- continue;
- }
-
- switch (reloc->type) {
- case reloc_gl_shader_state:
- clif_dump_gl_shader_state_record(clif, reloc, vaddr);
- break;
- }
- out(clif, "\n");
- }
-}
-
-void
-clif_dump_add_cl(struct clif_dump *clif, uint32_t start, uint32_t end)
-{
- uint32_t size;
-
void *start_vaddr;
if (!clif->lookup_vaddr(clif->data, start, &start_vaddr)) {
out(clif, "Failed to look up address 0x%08x\n",
return;
}
+ uint32_t size;
uint8_t *cl = start_vaddr;
while (clif_dump_packet(clif, start, cl, &size)) {
cl += size;
if (cl == end_vaddr)
break;
}
+}
+static void
+clif_process_worklist(struct clif_dump *clif)
+{
+ while (!list_empty(&clif->worklist)) {
+ struct reloc_worklist_entry *reloc =
+ list_first_entry(&clif->worklist,
+ struct reloc_worklist_entry, link);
+ list_del(&reloc->link);
+
+ void *vaddr;
+ if (!clif->lookup_vaddr(clif->data, reloc->addr, &vaddr)) {
+ out(clif, "Failed to look up address 0x%08x\n",
+ reloc->addr);
+ continue;
+ }
+
+ switch (reloc->type) {
+ case reloc_gl_shader_state:
+ clif_dump_gl_shader_state_record(clif, reloc, vaddr);
+ break;
+ }
+ out(clif, "\n");
+ }
+}
+
+void
+clif_dump_add_cl(struct clif_dump *clif, uint32_t start, uint32_t end)
+{
+ clif_dump_cl(clif, start, end);
out(clif, "\n");
clif_process_worklist(clif);