summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Zimmermann <tzimmermann@suse.de>2025-03-05 17:30:46 +0100
committerThomas Zimmermann <tzimmermann@suse.de>2025-03-12 08:38:13 +0100
commitc6a84bc9690afc40b103c5df3cdfb357439cb563 (patch)
tree2cb8977fd6a8ac0c95ac38c9e772369b33b7d12e
parente5f953b8eae7249bf50f86d79f80327621edc2d5 (diff)
drm/ast: cursor: Drop page alignment
The cursor scanout address requires alignment to a multiple of 8, but does not require page alignment. Change the offset calculation accordingly. Frees up a few more bytes for the primary framebuffer. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250305163207.267650-8-tzimmermann@suse.de
-rw-r--r--drivers/gpu/drm/ast/ast_cursor.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/ast/ast_cursor.c b/drivers/gpu/drm/ast/ast_cursor.c
index cb0c48d47207..5ee724bfd682 100644
--- a/drivers/gpu/drm/ast/ast_cursor.c
+++ b/drivers/gpu/drm/ast/ast_cursor.c
@@ -58,7 +58,7 @@ long ast_cursor_vram_offset(struct ast_device *ast)
if (size > ast->vram_size)
return -EINVAL;
- return PAGE_ALIGN_DOWN(ast->vram_size - size);
+ return ALIGN_DOWN(ast->vram_size - size, SZ_8);
}
static u32 ast_cursor_calculate_checksum(const void *src, unsigned int width, unsigned int height)