All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Auld <matthew.auld@intel.com>
To: intel-xe@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org, Matt Roper <matthew.d.roper@intel.com>
Subject: [PATCH 5/6] drm/xe/stolen: lower the default alignment
Date: Thu, 15 Feb 2024 17:44:36 +0000	[thread overview]
Message-ID: <20240215174431.285069-11-matthew.auld@intel.com> (raw)
In-Reply-To: <20240215174431.285069-7-matthew.auld@intel.com>

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>
---
 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 662f1e9bfc65..2e94f90e1018 100644
--- a/drivers/gpu/drm/xe/xe_ttm_stolen_mgr.c
+++ b/drivers/gpu/drm/xe/xe_ttm_stolen_mgr.c
@@ -203,7 +203,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 (IS_SRIOV_VF(xe))
@@ -220,10 +220,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
@@ -234,7 +230,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, SZ_4K);
 	if (err) {
 		drm_dbg_kms(&xe->drm, "Stolen mgr init failed: %i\n", err);
 		return;
-- 
2.43.0


  parent reply	other threads:[~2024-02-15 17:47 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-15 17:44 [PATCH 1/6] drm/tests/drm_buddy: fix 32b build Matthew Auld
2024-02-15 17:44 ` [PATCH 2/6] drm/buddy: fix range bias Matthew Auld
2024-02-16 11:40   ` Arunpravin Paneer Selvam
2024-02-15 17:44 ` [PATCH 3/6] drm/buddy: check range allocation matches alignment Matthew Auld
2024-02-16 11:25   ` Arunpravin Paneer Selvam
2024-02-15 17:44 ` [PATCH 4/6] drm/tests/drm_buddy: add alloc_range_bias test Matthew Auld
2024-02-16 11:26   ` Arunpravin Paneer Selvam
2024-02-15 17:44 ` Matthew Auld [this message]
2024-02-15 17:44 ` [PATCH 6/6] drm/xe/stolen: ignore first page for FBC Matthew Auld
2024-02-16 13:59   ` Maarten Lankhorst
2024-02-15 17:54 ` ✓ CI.Patch_applied: success for series starting with [1/6] drm/tests/drm_buddy: fix 32b build Patchwork
2024-02-15 17:55 ` ✗ CI.checkpatch: warning " Patchwork
2024-02-15 17:56 ` ✓ CI.KUnit: success " Patchwork
2024-02-15 18:07 ` ✓ CI.Build: " Patchwork
2024-02-15 18:08 ` ✓ CI.Hooks: " Patchwork
2024-02-15 18:09 ` ✗ CI.checksparse: warning " Patchwork
2024-02-15 18:31 ` ✓ CI.BAT: success " Patchwork
2024-02-16 11:23 ` [PATCH 1/6] " Arunpravin Paneer Selvam
2024-02-19  9:42 ` Matthew Auld
2024-02-19  9:53   ` Christian König
2024-02-19 10:28     ` Matthew Auld
2024-02-19 10:30       ` Christian König
2024-02-19 10:48         ` Matthew Auld
2024-02-19 12:24           ` Matthew Auld
2024-02-26  9:58             ` Matthew Auld
2024-02-26 10:38               ` Geert Uytterhoeven
2024-02-26 11:21                 ` Matthew Auld
2024-02-28  7:20               ` Christian König
2024-02-28  9:20                 ` Matthew Auld

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=20240215174431.285069-11-matthew.auld@intel.com \
    --to=matthew.auld@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=matthew.d.roper@intel.com \
    /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 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.