@@ -1454,7 +1454,8 @@ static struct xe_bo *
14541454__xe_bo_create_locked (struct xe_device * xe ,
14551455 struct xe_tile * tile , struct xe_vm * vm ,
14561456 size_t size , u64 start , u64 end ,
1457- u16 cpu_caching , enum ttm_bo_type type , u32 flags )
1457+ u16 cpu_caching , enum ttm_bo_type type , u32 flags ,
1458+ u64 alignment )
14581459{
14591460 struct xe_bo * bo = NULL ;
14601461 int err ;
@@ -1483,6 +1484,8 @@ __xe_bo_create_locked(struct xe_device *xe,
14831484 if (IS_ERR (bo ))
14841485 return bo ;
14851486
1487+ bo -> min_align = alignment ;
1488+
14861489 /*
14871490 * Note that instead of taking a reference no the drm_gpuvm_resv_bo(),
14881491 * to ensure the shared resv doesn't disappear under the bo, the bo
@@ -1523,16 +1526,18 @@ struct xe_bo *
15231526xe_bo_create_locked_range (struct xe_device * xe ,
15241527 struct xe_tile * tile , struct xe_vm * vm ,
15251528 size_t size , u64 start , u64 end ,
1526- enum ttm_bo_type type , u32 flags )
1529+ enum ttm_bo_type type , u32 flags , u64 alignment )
15271530{
1528- return __xe_bo_create_locked (xe , tile , vm , size , start , end , 0 , type , flags );
1531+ return __xe_bo_create_locked (xe , tile , vm , size , start , end , 0 , type ,
1532+ flags , alignment );
15291533}
15301534
15311535struct xe_bo * xe_bo_create_locked (struct xe_device * xe , struct xe_tile * tile ,
15321536 struct xe_vm * vm , size_t size ,
15331537 enum ttm_bo_type type , u32 flags )
15341538{
1535- return __xe_bo_create_locked (xe , tile , vm , size , 0 , ~0ULL , 0 , type , flags );
1539+ return __xe_bo_create_locked (xe , tile , vm , size , 0 , ~0ULL , 0 , type ,
1540+ flags , 0 );
15361541}
15371542
15381543struct xe_bo * xe_bo_create_user (struct xe_device * xe , struct xe_tile * tile ,
@@ -1542,7 +1547,7 @@ struct xe_bo *xe_bo_create_user(struct xe_device *xe, struct xe_tile *tile,
15421547{
15431548 struct xe_bo * bo = __xe_bo_create_locked (xe , tile , vm , size , 0 , ~0ULL ,
15441549 cpu_caching , ttm_bo_type_device ,
1545- flags | XE_BO_FLAG_USER );
1550+ flags | XE_BO_FLAG_USER , 0 );
15461551 if (!IS_ERR (bo ))
15471552 xe_bo_unlock_vm_held (bo );
15481553
@@ -1565,6 +1570,17 @@ struct xe_bo *xe_bo_create_pin_map_at(struct xe_device *xe, struct xe_tile *tile
15651570 struct xe_vm * vm ,
15661571 size_t size , u64 offset ,
15671572 enum ttm_bo_type type , u32 flags )
1573+ {
1574+ return xe_bo_create_pin_map_at_aligned (xe , tile , vm , size , offset ,
1575+ type , flags , 0 );
1576+ }
1577+
1578+ struct xe_bo * xe_bo_create_pin_map_at_aligned (struct xe_device * xe ,
1579+ struct xe_tile * tile ,
1580+ struct xe_vm * vm ,
1581+ size_t size , u64 offset ,
1582+ enum ttm_bo_type type , u32 flags ,
1583+ u64 alignment )
15681584{
15691585 struct xe_bo * bo ;
15701586 int err ;
@@ -1576,7 +1592,8 @@ struct xe_bo *xe_bo_create_pin_map_at(struct xe_device *xe, struct xe_tile *tile
15761592 flags |= XE_BO_FLAG_GGTT ;
15771593
15781594 bo = xe_bo_create_locked_range (xe , tile , vm , size , start , end , type ,
1579- flags | XE_BO_FLAG_NEEDS_CPU_ACCESS );
1595+ flags | XE_BO_FLAG_NEEDS_CPU_ACCESS ,
1596+ alignment );
15801597 if (IS_ERR (bo ))
15811598 return bo ;
15821599
0 commit comments