]> www.infradead.org Git - users/hch/configfs.git/commit
drm/buddy: Add start address support to trim function
authorArunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com>
Fri, 2 Aug 2024 05:43:19 +0000 (11:13 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 6 Aug 2024 15:11:01 +0000 (11:11 -0400)
commitdb65eb46de135338d6177f8853e0fd208f19d63e
treed4d62f6a20f3a42935f0e0dd353ca344c1db1a42
parente1dbe625d6ac2821eb29e087db46cb539d8079f0
drm/buddy: Add start address support to trim function

- Add a new start parameter in trim function to specify exact
  address from where to start the trimming. This would help us
  in situations like if drivers would like to do address alignment
  for specific requirements.

- Add a new flag DRM_BUDDY_TRIM_DISABLE. Drivers can use this
  flag to disable the allocator trimming part. This patch enables
  the drivers control trimming and they can do it themselves
  based on the application requirements.

v1:(Matthew)
  - check new_start alignment with min chunk_size
  - use range_overflows()

Signed-off-by: Arunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/drm_buddy.c
drivers/gpu/drm/xe/xe_ttm_vram_mgr.c
include/drm/drm_buddy.h