summaryrefslogtreecommitdiff
path: root/drivers/video/fbdev/stifb.c
diff options
context:
space:
mode:
authorHelge Deller <deller@gmx.de>2022-10-14 11:13:55 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-10-26 14:25:10 +0300
commita6dcc6cfa2934afe2133f44241a3a1b4c758cc2b (patch)
tree51b1c10392d7e29c24df4a7a709992afbb4c67b2 /drivers/video/fbdev/stifb.c
parent2ce9fab94b8db61f014e43ddf80dd1524ae6dff4 (diff)
downloadlinux-a6dcc6cfa2934afe2133f44241a3a1b4c758cc2b.tar.xz
parisc: fbdev/stifb: Align graphics memory size to 4MB
commit aca7c13d3bee81a968337a5515411409ae9d095d 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>
Diffstat (limited to 'drivers/video/fbdev/stifb.c')
-rw-r--r--drivers/video/fbdev/stifb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/video/fbdev/stifb.c b/drivers/video/fbdev/stifb.c
index 002f265d8db5..b0470f4f595e 100644
--- a/drivers/video/fbdev/stifb.c
+++ b/drivers/video/fbdev/stifb.c
@@ -1257,7 +1257,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;