Skip to contentSkip to conversation

parisc: fbdev/stifb: Align graphics memory size to 4MB

PATCH In review Helge Deller 2 participants 2 messages Oct 14, 2022

Subsystems (2)
lore
Share & tools
lore

Helge Deller

author maintainer
#0 lore raw

PATCH 1/1 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.

drivers/video/fbdev/stifb.c +1 -1
index 38a861e22c33..7753e586e65a 100644
@@ -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;
 
#1 lore raw
Quoted 2 lines · Helge Deller

Independend of the current graphics resolution, adjust the reported

Typo: independent