nouveau: use nv_device_info directly for dumping push buffers

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30455>
This commit is contained in:
Karol Herbst
2024-08-01 00:04:45 +02:00
committed by Marge Bot
parent 1454347c85
commit 168dc73fa9
2 changed files with 7 additions and 19 deletions

View File

@@ -484,10 +484,10 @@ nouveau_device_set_classes_for_debug(struct nouveau_device *dev,
uint32_t cls_m2mf, uint32_t cls_m2mf,
uint32_t cls_copy) uint32_t cls_copy)
{ {
dev->cls_eng3d = cls_eng3d; dev->info.cls_eng3d = cls_eng3d;
dev->cls_compute = cls_compute; dev->info.cls_compute = cls_compute;
dev->cls_m2mf = cls_m2mf; dev->info.cls_m2mf = cls_m2mf;
dev->cls_copy = cls_copy; dev->info.cls_copy = cls_copy;
} }
void void
@@ -1130,18 +1130,12 @@ pushbuf_dump(struct nouveau_device *dev,
if (!bo->map) if (!bo->map)
continue; continue;
if (dev->cls_eng3d) { if (dev->info.cls_eng3d) {
struct nv_device_info info = {
.cls_eng3d = dev->cls_eng3d,
.cls_compute = dev->cls_compute,
.cls_m2mf = dev->cls_m2mf,
.cls_copy = dev->cls_copy,
};
struct nv_push push = { struct nv_push push = {
.start = bgn, .start = bgn,
.end = end .end = end
}; };
vk_push_print(nouveau_out, &push, &info); vk_push_print(nouveau_out, &push, &dev->info);
} else { } else {
while (bgn < end) while (bgn < end)
err("\t0x%08x\n", *bgn++); err("\t0x%08x\n", *bgn++);

View File

@@ -52,14 +52,8 @@ struct nouveau_device {
uint64_t vram_limit; uint64_t vram_limit;
uint64_t gart_limit; uint64_t gart_limit;
/* only pci info and device type are set */ /* only pci info, class ids and and device type are set */
struct nv_device_info info; struct nv_device_info info;
/* classes for common push buf dumping */
uint32_t cls_eng3d;
uint32_t cls_compute;
uint32_t cls_m2mf;
uint32_t cls_copy;
}; };
struct nouveau_client { struct nouveau_client {