Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/xe/stolen: lower the default alignment
@ 2024-04-12 15:03 Matthew Auld
  2024-04-12 15:03 ` [PATCH 2/2] drm/xe/stolen: ignore first page for FBC Matthew Auld
                   ` (8 more replies)
  0 siblings, 9 replies; 11+ messages in thread
From: Matthew Auld @ 2024-04-12 15:03 UTC (permalink / raw)
  To: intel-xe; +Cc: Matt Roper, Maarten Lankhorst

No need to be so aggressive here. The upper layers will already apply
the needed alignment, plus some allocations might wish to skip it. Main
issue is that we might want to have start/end bias range which doesn't
match the default alignment which is rejected by the allocator.

Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
---
 drivers/gpu/drm/xe/xe_ttm_stolen_mgr.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/xe/xe_ttm_stolen_mgr.c b/drivers/gpu/drm/xe/xe_ttm_stolen_mgr.c
index 6ffecf9f23d1..f77367329760 100644
--- a/drivers/gpu/drm/xe/xe_ttm_stolen_mgr.c
+++ b/drivers/gpu/drm/xe/xe_ttm_stolen_mgr.c
@@ -204,7 +204,7 @@ void xe_ttm_stolen_mgr_init(struct xe_device *xe)
 {
 	struct xe_ttm_stolen_mgr *mgr = drmm_kzalloc(&xe->drm, sizeof(*mgr), GFP_KERNEL);
 	struct pci_dev *pdev = to_pci_dev(xe->drm.dev);
-	u64 stolen_size, io_size, pgsize;
+	u64 stolen_size, io_size;
 	int err;
 
 	if (!mgr) {
@@ -226,10 +226,6 @@ void xe_ttm_stolen_mgr_init(struct xe_device *xe)
 		return;
 	}
 
-	pgsize = xe->info.vram_flags & XE_VRAM_FLAGS_NEED64K ? SZ_64K : SZ_4K;
-	if (pgsize < PAGE_SIZE)
-		pgsize = PAGE_SIZE;
-
 	/*
 	 * We don't try to attempt partial visible support for stolen vram,
 	 * since stolen is always at the end of vram, and the BAR size is pretty
@@ -240,7 +236,7 @@ void xe_ttm_stolen_mgr_init(struct xe_device *xe)
 		io_size = stolen_size;
 
 	err = __xe_ttm_vram_mgr_init(xe, &mgr->base, XE_PL_STOLEN, stolen_size,
-				     io_size, pgsize);
+				     io_size, PAGE_SIZE);
 	if (err) {
 		drm_dbg_kms(&xe->drm, "Stolen mgr init failed: %i\n", err);
 		return;
-- 
2.44.0


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

end of thread, other threads:[~2024-05-01 12:38 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-12 15:03 [PATCH 1/2] drm/xe/stolen: lower the default alignment Matthew Auld
2024-04-12 15:03 ` [PATCH 2/2] drm/xe/stolen: ignore first page for FBC Matthew Auld
2024-05-01 12:37   ` Saarinen, Jani
2024-04-15 14:04 ` ✓ CI.Patch_applied: success for series starting with [1/2] drm/xe/stolen: lower the default alignment Patchwork
2024-04-15 14:05 ` ✗ CI.checkpatch: warning " Patchwork
2024-04-15 14:05 ` ✓ CI.KUnit: success " Patchwork
2024-04-15 14:17 ` ✓ CI.Build: " Patchwork
2024-04-15 14:19 ` ✓ CI.Hooks: " Patchwork
2024-04-15 14:21 ` ✓ CI.checksparse: " Patchwork
2024-04-15 14:44 ` ✓ CI.BAT: " Patchwork
2024-04-15 19:42 ` ✗ CI.FULL: failure " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox