diff options
author | Matthew Auld <matthew.auld@intel.com> | 2024-02-29 10:51:13 +0000 |
---|---|---|
committer | Christian König <christian.koenig@amd.com> | 2024-05-17 12:56:42 +0200 |
commit | 117bbc0e43adc6f76a3fc39a98f75a811a853459 (patch) | |
tree | 58fae28cf1ed47b7d61c19364e9f58682a3c723f /include/drm | |
parent | aed9a1a4f7106ff99a882ad06318cebfa71016a2 (diff) |
drm/buddy: stop using PAGE_SIZE
The drm_buddy minimum page-size requirements should be distinct from the
CPU PAGE_SIZE. Only restriction is that the minimum page-size is at
least 4K.
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Arunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com>
Cc: Christian König <christian.koenig@amd.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Arunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20240229105112.250077-3-matthew.auld@intel.com
Signed-off-by: Christian König <christian.koenig@amd.com>
Diffstat (limited to 'include/drm')
-rw-r--r-- | include/drm/drm_buddy.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/drm/drm_buddy.h b/include/drm/drm_buddy.h index a5b39fc01003..19ed661a32f3 100644 --- a/include/drm/drm_buddy.h +++ b/include/drm/drm_buddy.h @@ -53,8 +53,8 @@ struct drm_buddy_block { struct list_head tmp_link; }; -/* Order-zero must be at least PAGE_SIZE */ -#define DRM_BUDDY_MAX_ORDER (63 - PAGE_SHIFT) +/* Order-zero must be at least SZ_4K */ +#define DRM_BUDDY_MAX_ORDER (63 - 12) /* * Binary Buddy System. @@ -82,7 +82,7 @@ struct drm_buddy { unsigned int n_roots; unsigned int max_order; - /* Must be at least PAGE_SIZE */ + /* Must be at least SZ_4K */ u64 chunk_size; u64 size; u64 avail; |