From 6e2326a7730158e3f83b159335b51e97f48e767e Mon Sep 17 00:00:00 2001 From: Taylor R Campbell Date: Fri, 29 Jul 2022 22:44:25 +0000 Subject: [PATCH] WIP: print radeon_gart crap --- .../bsd/drm2/dist/drm/radeon/radeon_gart.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/sys/external/bsd/drm2/dist/drm/radeon/radeon_gart.c b/sys/external/bsd/drm2/dist/drm/radeon/radeon_gart.c index bf674397b2b7..1d5b6457e63f 100644 --- a/sys/external/bsd/drm2/dist/drm/radeon/radeon_gart.c +++ b/sys/external/bsd/drm2/dist/drm/radeon/radeon_gart.c @@ -424,6 +424,12 @@ radeon_gart_bind(struct radeon_device *rdev, unsigned gpu_start, return -EINVAL; } + device_printf(rdev->dev, "%s: gpu_start=0x%x npages=%u flags=0x%x\n", + __func__, gpu_start, npages, flags); + device_printf(rdev->dev, + "gpu_per_cpu=%u gpu_npages=%u gpu_pgstart=0x%x pgstart=0x%x\n", + gpu_per_cpu, gpu_npages, gpu_pgstart, pgstart); + radeon_gart_pre_update(rdev, gpu_pgstart, gpu_npages); for (pgno = 0; pgno < npages; pgno++) { const bus_addr_t addr = dmamap->dm_segs[pgno].ds_addr; @@ -438,6 +444,15 @@ radeon_gart_bind(struct radeon_device *rdev, unsigned gpu_start, rdev->gart.pages_entry[i] = page_entry; if (rdev->gart.ptr == NULL) continue; + device_printf(rdev->dev, + "pgno=%u i=%u" + " addr=0x%"PRIxBUSADDR"+0x%x*GPU_PAGE_SIZE" + "=%"PRIxBUSADDR + " entry=0x%"PRIx64"\n", + pgno, i, + addr, gpu_pgno, + addr + gpu_pgno*RADEON_GPU_PAGE_SIZE, + page_entry); radeon_gart_set_page(rdev, i, page_entry); } }