* [PATCH] parisc: fbdev/stifb: Align graphics memory size to 4MB
@ 2022-10-14 18:53 Helge Deller
2022-10-14 22:55 ` Matt Turner
0 siblings, 1 reply; 2+ messages in thread
From: Helge Deller @ 2022-10-14 18:53 UTC (permalink / raw)
To: linux-parisc, James Bottomley, John David Anglin
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 <deller@gmx.de>
diff --git a/drivers/video/fbdev/stifb.c b/drivers/video/fbdev/stifb.c
index 38a861e22c33..7753e586e65a 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;
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-10-14 22:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-14 18:53 [PATCH] parisc: fbdev/stifb: Align graphics memory size to 4MB Helge Deller
2022-10-14 22:55 ` Matt Turner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox