switch over from ttm trace to iova debugfs entry (v2)
PATCH 1/1 switch over from ttm trace to iova debugfs entry (v2)
Signed-off-by Tom St Denis <[email protected]>
(v2): Use iova debugfs for read/write not address translation
--- src/lib/CMakeLists.txt | 1 - src/lib/close_asic.c | 2 +- src/lib/discover.c | 3 + src/lib/free_maps.c | 44 ---------- src/lib/read_vram.c | 213 ++++--------------------------------------------- src/umr.h | 14 +--- 6 files changed, 23 insertions(+), 254 deletions(-) delete mode 100644 src/lib/free_maps.c
src/lib/CMakeLists.txt +0 -1
@@ -14,7 +14,6 @@ add_library(umrcore STATIC discover.c dump_ib.c find_reg.c - free_maps.c mmio.c query_drm.c read_sensor.c
src/lib/close_asic.c +1 -1
@@ -29,7 +29,6 @@void umr_free_asic (struct umr_asic *asic) {int x; -umr_free_maps (asic);if (asic->pci.mem !=NULL ) {// free PCI mapping pci_device_unmap_range (asic->pci.pdevice, asic->pci.mem, asic->pci.pdevice->regions[asic->pci.region].size);
@@ -57,6 +56,7 @@ void umr_close_asic(struct umr_asic *asic)cond_close (asic->fd.vram);cond_close (asic->fd.gpr);cond_close (asic->fd.drm); +cond_close (asic->fd.iova);umr_free_asic (asic); } }
src/lib/discover.c +3 -0
@@ -222,6 +222,8 @@ struct umr_asic *umr_discover_asic(struct umr_options *options) asic->fd.vram =open (fname,O_RDWR );snprintf (fname,sizeof (fname)-1 ,"/sys/kernel/debug/dri/%d/amdgpu_gpr" , asic->instance); asic->fd.gpr =open (fname,O_RDWR ); +snprintf (fname,sizeof (fname)-1 ,"/sys/kernel/debug/dri/%d/amdgpu_iova" , asic->instance); + asic->fd.iova =open (fname,O_RDWR ); asic->fd.drm =-1 ;// default to closed // if appending to the fd list remember to update close_asic() and discover_by_did()... }else {
@@ -235,6 +237,7 @@ struct umr_asic *umr_discover_asic(struct umr_options *options) asic->fd.vram =-1 ; asic->fd.gpr =-1 ; asic->fd.drm =-1 ; + asic->fd.iova =-1 ; }if (options->use_pci) {
src/lib/free_maps.c deleted +0 -44
44 lines not on this page · raw message
src/lib/read_vram.c +17 -196
272 lines not on this page · raw message
src/umr.h +2 -12
@@ -210,17 +210,6 @@ struct umr_options { } pci; }; -struct umr_dma_maps { -struct umr_map { -uint64_t - dma_addr, - phys_addr, - key; -int valid; -struct umr_map *left, *right; - } *maps; -}; -struct umr_asic {char *asicname;int no_blocks;
@@ -243,7 +232,8 @@ struct umr_asic { drm, wave, vram, - gpr; + gpr, + iova; } fd;struct {struct pci_device *pdevice;
Signature · 6 lines
2.12.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx