mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 18:13:41 +02:00
drm/xe: Allow VRAM BO allocations aligned to 64K
While today we are getting VRAM allocations aligned to 64K as the XE_VRAM_FLAGS_NEED64K flag could be set, we shouldn't only rely on that flag and we should also allow caller to specify required 64K alignment explicitly. Define new XE_BO_NEEDS_64K flag for that. Cc: Matt Roper <matthew.d.roper@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240313104132.1045-2-michal.wajdeczko@intel.com Signed-off-by: Michał Winiarski <michal.winiarski@intel.com>
This commit is contained in:
parent
54c659660d
commit
6583b0839a
|
|
@ -1217,7 +1217,8 @@ struct xe_bo *___xe_bo_create_locked(struct xe_device *xe, struct xe_bo *bo,
|
|||
|
||||
if (flags & (XE_BO_CREATE_VRAM_MASK | XE_BO_CREATE_STOLEN_BIT) &&
|
||||
!(flags & XE_BO_CREATE_IGNORE_MIN_PAGE_SIZE_BIT) &&
|
||||
xe->info.vram_flags & XE_VRAM_FLAGS_NEED64K) {
|
||||
((xe->info.vram_flags & XE_VRAM_FLAGS_NEED64K) ||
|
||||
(flags & XE_BO_NEEDS_64K))) {
|
||||
aligned_size = ALIGN(size, SZ_64K);
|
||||
if (type != ttm_bo_type_device)
|
||||
size = ALIGN(size, SZ_64K);
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@
|
|||
#define XE_BO_PAGETABLE BIT(12)
|
||||
#define XE_BO_NEEDS_CPU_ACCESS BIT(13)
|
||||
#define XE_BO_NEEDS_UC BIT(14)
|
||||
#define XE_BO_NEEDS_64K BIT(15)
|
||||
/* this one is trigger internally only */
|
||||
#define XE_BO_INTERNAL_TEST BIT(30)
|
||||
#define XE_BO_INTERNAL_64K BIT(31)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user