drm/xe: Improve vram info debug printing
authorOak Zeng <oak.zeng@intel.com>
Fri, 14 Jul 2023 14:42:07 +0000 (10:42 -0400)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Thu, 21 Dec 2023 16:40:20 +0000 (11:40 -0500)
Print both device physical address range and CPU io range
of vram. Also print vram's actual size, usable size excluding
stolen memory, and CPU io accessible size.
V1:
  - Add back small BAR device info (Matt)

Signed-off-by: Oak Zeng <oak.zeng@intel.com>
Reviewed-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/xe/xe_mmio.c

index 41ee89247ddb74243d9b1bf9d7ede870d7f83b53..bb6823db14d49f38f40d269207f41265652008d9 100644 (file)
@@ -286,12 +286,13 @@ int xe_mmio_probe_vram(struct xe_device *xe)
                tile->mem.vram.usable_size = vram_size;
                tile->mem.vram.mapping = xe->mem.vram.mapping + tile_offset;
 
-               drm_info(&xe->drm, "VRAM[%u, %u]: %pa, %pa\n", id, tile->id,
-                        &tile->mem.vram.io_start, &tile->mem.vram.usable_size);
-
                if (tile->mem.vram.io_size < tile->mem.vram.usable_size)
-                       drm_info(&xe->drm, "VRAM[%u, %u]: CPU access limited to %pa\n", id,
-                                tile->id, &tile->mem.vram.io_size);
+                       drm_info(&xe->drm, "Small BAR device\n");
+               drm_info(&xe->drm, "VRAM[%u, %u]: Actual physical size %pa, usable size exclude stolen %pa, CPU accessible size %pa\n", id,
+                        tile->id, &tile->mem.vram.actual_physical_size, &tile->mem.vram.usable_size, &tile->mem.vram.io_size);
+               drm_info(&xe->drm, "VRAM[%u, %u]: DPA range: [%pa-%llx], io range: [%pa-%llx]\n", id, tile->id,
+                        &tile->mem.vram.dpa_base, tile->mem.vram.dpa_base + tile->mem.vram.actual_physical_size,
+                        &tile->mem.vram.io_start, tile->mem.vram.io_start + tile->mem.vram.io_size);
 
                /* calculate total size using tile size to get the correct HW sizing */
                total_size += tile_size;