Skip to content

Commit

Permalink
parisc: fbdev/stifb: Align graphics memory size to 4MB
Browse files Browse the repository at this point in the history
commit aca7c13 upstream.

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>
Cc: <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
hdeller authored and gregkh committed Oct 21, 2022
1 parent 1acee46 commit decdd4d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/video/fbdev/stifb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit decdd4d

Please sign in to comment.