[PATCH v2 7/7] drm/ast: cursor: Drop page alignment

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx>
---
 drivers/gpu/drm/ast/ast_cursor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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)
-- 
2.48.1




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux