Skip to content

Commit

Permalink
fbdev/amifb: Correct check for video memory size
Browse files Browse the repository at this point in the history
The check should compare the available memory size with the highest allocation
value (VIDEOMEMSIZE_*_2M), not with the lowest value (VIDEOMEMSIZE_*_1M).

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
  • Loading branch information
Geert Uytterhoeven authored and Paul Mundt committed May 24, 2011
1 parent b9b52cf commit e3e4e9c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/video/amifb.c
Original file line number Diff line number Diff line change
Expand Up @@ -2295,7 +2295,7 @@ static int __init amifb_probe(struct platform_device *pdev)
defmode = amiga_vblank == 50 ? DEFMODE_PAL
: DEFMODE_NTSC;
if (amiga_chip_avail()-CHIPRAM_SAFETY_LIMIT >
VIDEOMEMSIZE_ECS_1M)
VIDEOMEMSIZE_ECS_2M)
fb_info.fix.smem_len = VIDEOMEMSIZE_ECS_2M;
else
fb_info.fix.smem_len = VIDEOMEMSIZE_ECS_1M;
Expand All @@ -2312,7 +2312,7 @@ static int __init amifb_probe(struct platform_device *pdev)
maxfmode = TAG_FMODE_4;
defmode = DEFMODE_AGA;
if (amiga_chip_avail()-CHIPRAM_SAFETY_LIMIT >
VIDEOMEMSIZE_AGA_1M)
VIDEOMEMSIZE_AGA_2M)
fb_info.fix.smem_len = VIDEOMEMSIZE_AGA_2M;
else
fb_info.fix.smem_len = VIDEOMEMSIZE_AGA_1M;
Expand Down

0 comments on commit e3e4e9c

Please sign in to comment.