Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Oak Zeng <oak.zeng@intel.com>
To: intel-xe@lists.freedesktop.org
Subject: [Intel-xe] [PATCH 2/2] drm/xe: Improve vram info debug printing
Date: Fri, 11 Aug 2023 15:39:23 -0400	[thread overview]
Message-ID: <20230811193923.132091-2-oak.zeng@intel.com> (raw)
In-Reply-To: <20230811193923.132091-1-oak.zeng@intel.com>

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>
---
 drivers/gpu/drm/xe/xe_mmio.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/xe/xe_mmio.c b/drivers/gpu/drm/xe/xe_mmio.c
index 41ee89247ddb..bb6823db14d4 100644
--- a/drivers/gpu/drm/xe/xe_mmio.c
+++ b/drivers/gpu/drm/xe/xe_mmio.c
@@ -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;
-- 
2.26.3


  reply	other threads:[~2023-08-11 19:32 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-11 19:39 [Intel-xe] [PATCH 1/2] drm/xe: Make xe_mem_region struct Oak Zeng
2023-08-11 19:39 ` Oak Zeng [this message]
2023-08-11 20:40   ` [Intel-xe] [PATCH 2/2] drm/xe: Improve vram info debug printing Matthew Brost
2023-08-11 20:07 ` [Intel-xe] ✓ CI.Patch_applied: success for series starting with [1/2] drm/xe: Make xe_mem_region struct Patchwork
2023-08-11 20:07 ` [Intel-xe] ✗ CI.checkpatch: warning " Patchwork
2023-08-11 20:08 ` [Intel-xe] ✓ CI.KUnit: success " Patchwork
2023-08-11 20:12 ` [Intel-xe] ✓ CI.Build: " Patchwork
2023-08-11 20:13 ` [Intel-xe] ✗ CI.Hooks: failure " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2023-08-10 16:08 [Intel-xe] [PATCH 1/2] " Oak Zeng
2023-08-10 16:08 ` [Intel-xe] [PATCH 2/2] drm/xe: Improve vram info debug printing Oak Zeng
2023-08-08  2:44 [Intel-xe] [PATCH 1/3] drm/xe: Move the memory region struct out xe_tile Oak Zeng
2023-08-08  2:45 ` [Intel-xe] [PATCH 2/2] drm/xe: Improve vram info debug printing Oak Zeng
2023-08-11 18:25   ` Matthew Brost
2023-08-11 19:20     ` Zeng, Oak
2023-08-08  2:43 [Intel-xe] [PATCH 1/3] drm/xe: Move the memory region struct out xe_tile Oak Zeng
2023-08-08  2:43 ` [Intel-xe] [PATCH 2/2] drm/xe: Improve vram info debug printing Oak Zeng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230811193923.132091-2-oak.zeng@intel.com \
    --to=oak.zeng@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox