All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-xe] [PATCH 1/2] drm/xe: Keep all resize bar related prints inside xe_resize_vram_bar
@ 2023-04-21 15:38 Balasubramani Vivekanandan
  2023-04-21 15:38 ` [Intel-xe] [PATCH 2/2] drm/xe: Change log level of error prints Balasubramani Vivekanandan
                   ` (5 more replies)
  0 siblings, 6 replies; 13+ messages in thread
From: Balasubramani Vivekanandan @ 2023-04-21 15:38 UTC (permalink / raw)
  To: intel-xe

xe_resize_vram_bar() function is already printing the status of bar
resizing. It has prints covering both success and failure.
There is no need of additional prints in the caller which were not so
easily to follow.

Signed-off-by: Balasubramani Vivekanandan <balasubramani.vivekanandan@intel.com>
---
 drivers/gpu/drm/xe/xe_mmio.c | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/drivers/gpu/drm/xe/xe_mmio.c b/drivers/gpu/drm/xe/xe_mmio.c
index 98357c1f109f..8bd39c3e65ae 100644
--- a/drivers/gpu/drm/xe/xe_mmio.c
+++ b/drivers/gpu/drm/xe/xe_mmio.c
@@ -107,6 +107,8 @@ static int xe_resize_vram_bar(struct xe_device *xe, resource_size_t vram_size)
 			return 0;
 	}
 
+	drm_info(&xe->drm, "Resizing bar from %llu -> %llu\n", current_size, rebar_size);
+
 	while (root->parent)
 		root = root->parent;
 
@@ -117,7 +119,7 @@ static int xe_resize_vram_bar(struct xe_device *xe, resource_size_t vram_size)
 	}
 
 	if (!root_res) {
-		drm_info(&xe->drm, "Can't resize VRAM BAR - platform support is missing\n");
+		drm_info(&xe->drm, "Can't resize VRAM BAR - platform support is missing. Consider enabling 'Resizable BAR' support in your BIOS\n");
 		return -1;
 	}
 
@@ -183,7 +185,7 @@ int xe_mmio_probe_vram(struct xe_device *xe)
 	u64 vram_size;
 	u64 original_size;
 	u64 usable_size;
-	int resize_result, err;
+	int err;
 
 	if (!IS_DGFX(xe)) {
 		xe->mem.vram.mapping = 0;
@@ -212,7 +214,7 @@ int xe_mmio_probe_vram(struct xe_device *xe)
 	if (err)
 		return err;
 
-	resize_result = xe_resize_vram_bar(xe, vram_size);
+	xe_resize_vram_bar(xe, vram_size);
 	xe->mem.vram.io_start = pci_resource_start(pdev, GEN12_LMEM_BAR);
 	xe->mem.vram.io_size = min(usable_size,
 				   pci_resource_len(pdev, GEN12_LMEM_BAR));
@@ -221,13 +223,6 @@ int xe_mmio_probe_vram(struct xe_device *xe)
 	if (!xe->mem.vram.size)
 		return -EIO;
 
-	if (resize_result > 0)
-		drm_info(&xe->drm, "Successfully resize VRAM from %lluMiB to %lluMiB\n",
-			 (u64)original_size >> 20,
-			 (u64)xe->mem.vram.io_size >> 20);
-	else if (xe->mem.vram.io_size < usable_size && !xe_force_vram_bar_size)
-		drm_info(&xe->drm, "Using a reduced BAR size of %lluMiB. Consider enabling 'Resizable BAR' support in your BIOS.\n",
-			 (u64)xe->mem.vram.size >> 20);
 	if (usable_size > xe->mem.vram.io_size)
 		drm_warn(&xe->drm, "Restricting VRAM size to PCI resource size (0x%llx->0x%llx)\n",
 			 usable_size, xe->mem.vram.io_size);
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2023-04-25 10:47 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-21 15:38 [Intel-xe] [PATCH 1/2] drm/xe: Keep all resize bar related prints inside xe_resize_vram_bar Balasubramani Vivekanandan
2023-04-21 15:38 ` [Intel-xe] [PATCH 2/2] drm/xe: Change log level of error prints Balasubramani Vivekanandan
2023-04-21 16:43   ` Matthew Auld
2023-04-25  9:30     ` Balasubramani Vivekanandan
2023-04-21 15:41 ` [Intel-xe] ✓ CI.Patch_applied: success for series starting with [1/2] drm/xe: Keep all resize bar related prints inside xe_resize_vram_bar Patchwork
2023-04-21 15:42 ` [Intel-xe] ✓ CI.KUnit: " Patchwork
2023-04-21 15:46 ` [Intel-xe] ✓ CI.Build: " Patchwork
2023-04-21 16:09 ` [Intel-xe] ○ CI.BAT: info " Patchwork
2023-04-21 16:31 ` [Intel-xe] [PATCH 1/2] " Matthew Auld
2023-04-25  9:28   ` Balasubramani Vivekanandan
2023-04-25 10:25     ` Matthew Auld
2023-04-25 10:42       ` Balasubramani Vivekanandan
2023-04-25 10:46         ` Matthew Auld

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.