]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/nova: Align GEM memory allocation to system page size
authorBrendan Shephard <bshephar@bne-home.net>
Mon, 15 Dec 2025 08:34:16 +0000 (18:34 +1000)
committerDanilo Krummrich <dakr@kernel.org>
Mon, 29 Dec 2025 14:43:20 +0000 (15:43 +0100)
commit255153afbcfdcf30d20048fb76a6d9418537b5d9
tree9b1fffaa9a90c7d77fd1714694228ff0c5a77b9a
parentf91ffed95c06e94c835cd7deaea666d69948cde9
drm/nova: Align GEM memory allocation to system page size

Use page::page_align for GEM object memory allocation to ensure the
allocation is page aligned. This is important on systems where the
default page size is not 4k. Such as 16k or 64k aarch64 systems.

This change uses the updated page_align() function which returns
Option<usize> for overflow safety. (See "rust: Return Option from
page_align and ensure no usize overflow").

Signed-off-by: Brendan Shephard <bshephar@bne-home.net>
Link: https://patch.msgid.link/20251215083416.266469-1-bshephar@bne-home.net
[ Import page module only. - Danilo ]
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
drivers/gpu/drm/nova/gem.rs