From: Helge Deller Date: Fri, 14 Oct 2022 08:13:55 +0000 (+0200) Subject: parisc: fbdev/stifb: Align graphics memory size to 4MB X-Git-Tag: baikal/aarch64/sdk6.1~2831^2~2 X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=931b76fcccbb6086003143d4d8942c7e621e59c4;p=kernel.git parisc: fbdev/stifb: Align graphics memory size to 4MB Independend of the current graphics resolution, adjust the reported graphics card memory size to the next 4MB boundary. This fixes the fbtest program which expects a naturally aligned size. Signed-off-by: Helge Deller Cc: --- diff --git a/drivers/video/fbdev/stifb.c b/drivers/video/fbdev/stifb.c index 38a861e22c339..7753e586e65a0 100644 --- a/drivers/video/fbdev/stifb.c +++ b/drivers/video/fbdev/stifb.c @@ -1298,7 +1298,7 @@ static int __init stifb_init_fb(struct sti_struct *sti, int bpp_pref) /* limit fbsize to max visible screen size */ if (fix->smem_len > yres*fix->line_length) - fix->smem_len = yres*fix->line_length; + fix->smem_len = ALIGN(yres*fix->line_length, 4*1024*1024); fix->accel = FB_ACCEL_NONE;