summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/drm_buddy.c
diff options
context:
space:
mode:
authorMatthew Auld <matthew.auld@intel.com>2024-02-29 10:51:13 +0000
committerChristian König <christian.koenig@amd.com>2024-05-17 12:56:42 +0200
commit117bbc0e43adc6f76a3fc39a98f75a811a853459 (patch)
tree58fae28cf1ed47b7d61c19364e9f58682a3c723f /drivers/gpu/drm/drm_buddy.c
parentaed9a1a4f7106ff99a882ad06318cebfa71016a2 (diff)
downloadlinux-117bbc0e43adc6f76a3fc39a98f75a811a853459.tar.gz
linux-117bbc0e43adc6f76a3fc39a98f75a811a853459.tar.bz2
linux-117bbc0e43adc6f76a3fc39a98f75a811a853459.zip
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 'drivers/gpu/drm/drm_buddy.c')
-rw-r--r--drivers/gpu/drm/drm_buddy.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_buddy.c b/drivers/gpu/drm/drm_buddy.c
index 5ebdd6f8f36e..f999568d69c1 100644
--- a/drivers/gpu/drm/drm_buddy.c
+++ b/drivers/gpu/drm/drm_buddy.c
@@ -102,7 +102,7 @@ int drm_buddy_init(struct drm_buddy *mm, u64 size, u64 chunk_size)
if (size < chunk_size)
return -EINVAL;
- if (chunk_size < PAGE_SIZE)
+ if (chunk_size < SZ_4K)
return -EINVAL;
if (!is_power_of_2(chunk_size))