commit cb0ac57a4163fba7a3e73ff613670dc5792fb5b6 Author: schmitz Date: Sat Jul 14 15:26:25 2012 +1200 [m68k] Atari: experimental truecolor support for atafb (ARAnyM only!) diff --git a/drivers/video/atafb.c b/drivers/video/atafb.c index 64e41f5..71f9279 100644 --- a/drivers/video/atafb.c +++ b/drivers/video/atafb.c @@ -409,6 +409,7 @@ static char *vga16_names[] = { "vga16", "default3", NULL }; static char *vga256_names[] = { "vga256", NULL }; static char *falh2_names[] = { "falh2", NULL }; static char *falh16_names[] = { "falh16", NULL }; +static char *truecol_names[] = { "truecolor", NULL }; static char **fb_var_names[] = { autodetect_names, @@ -424,6 +425,7 @@ static char **fb_var_names[] = { vga256_names, falh2_names, falh16_names, + truecol_names, NULL }; @@ -483,6 +485,10 @@ static struct fb_var_screeninfo atafb_predefined[] = { 896, 608, 896, 0, 0, 0, 4, 0, {0, 6, 0}, {0, 6, 0}, {0, 6, 0}, {0, 0, 0}, 0, 0, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0 }, + { /* truecolor */ + 640, 480, 640, 0, 0, 0, 16, 0, + {0, 5, 0}, {0, 6, 0}, {0, 5, 0}, {0, 0, 0}, + 0, 0, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0 }, }; static int num_atafb_predefined = ARRAY_SIZE(atafb_predefined); @@ -547,6 +553,14 @@ static struct fb_videomode atafb_modedb[] __initdata = { "falh", 60, 896, 608, 32000, 18, 42, 31, 1, 96,3, 0, FB_VMODE_NONINTERLACED | FB_VMODE_YWRAP }, + + { + /* 640x400, 31 kHz, 70 Hz (VGA) */ + "truecolor", 70, 640, 400, 32000, 18, 42, 31, 11, 96, 3, + FB_SYNC_VERT_HIGH_ACT | FB_SYNC_COMP_HIGH_ACT, FB_VMODE_NONINTERLACED | FB_VMODE_YWRAP + }, + + }; #define NUM_TOTAL_MODES ARRAY_SIZE(atafb_modedb) @@ -1181,8 +1195,13 @@ static int falcon_decode_var(struct fb_var_screeninfo *var, } /* Is video bus bandwidth (32MB/s) too low for this resolution? */ /* this is definitely wrong if bus clock != 32MHz */ - if (pclock->f / plen / 8 * bpp > 32000000L) - return -EINVAL; + if (bpp == 16) { + if (pclock->f / plen / 16 * bpp > 32000000L) + return -EINVAL; + } else { + if (pclock->f / plen / 8 * bpp > 32000000L) + return -EINVAL; + } if (vsync_len < 1) vsync_len = 1; @@ -3147,7 +3166,7 @@ int __init atafb_init(void) /* Multisync monitor capabilities */ /* Atari-TOS defaults if no boot option present */ if (fb_info.monspecs.hfmin == 0) { - fb_info.monspecs.hfmin = 31000; + fb_info.monspecs.hfmin = 16000; fb_info.monspecs.hfmax = 32000; fb_info.monspecs.vfmin = 58; fb_info.monspecs.vfmax = 62;