From: M. R. B. <mr...@us...> - 2001-03-04 23:15:43
|
Update of /cvsroot/linuxdc/linux/drivers/video In directory usw-pr-cvs1:/tmp/cvs-serv11126/drivers/video Modified Files: pvr2dcfb.c Log Message: VGA interlace fix Index: pvr2dcfb.c =================================================================== RCS file: /cvsroot/linuxdc/linux/drivers/video/pvr2dcfb.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** pvr2dcfb.c 2001/03/01 11:00:27 1.1 --- pvr2dcfb.c 2001/03/04 23:17:14 1.2 *************** *** 277,284 **** --- 277,295 ---- }, + { + /* 640x480 @ 60hz (VGA) */ + "vga_640x480", 60, 640, 480, 38, 33, 0, 18, 146, 26, + 0, FB_VMODE_YWRAP + }, + }; #define NUM_TOTAL_MODES ARRAY_SIZE(pvr2dc_modedb) + #define DEFMODE_NTSC 0 + #define DEFMODE_PAL 0 + #define DEFMODE_VGA 2 + + static int defmode = DEFMODE_NTSC; static const char *mode_option __initdata = NULL; *************** *** 673,677 **** par->vmode = var->vmode & FB_VMODE_MASK; ! if (par->vmode & FB_VMODE_INTERLACED) par->is_interlaced = 1; /* --- 684,688 ---- par->vmode = var->vmode & FB_VMODE_MASK; ! if (par->vmode & FB_VMODE_INTERLACED && video_output != VO_VGA) par->is_interlaced = 1; /* *************** *** 1011,1018 **** /* XXX: This needs to pull default video output via BIOS or other means */ ! if (video_output < 0 && cable_type == CT_VGA) ! video_output = VO_VGA; ! else ! video_output = VO_NTSC; strcpy(fb_info.modename, pvr2dcfb_name); --- 1022,1031 ---- /* XXX: This needs to pull default video output via BIOS or other means */ ! if (video_output < 0) { ! if (cable_type == CT_VGA) ! video_output = VO_VGA; ! else ! video_output = VO_NTSC; ! } strcpy(fb_info.modename, pvr2dcfb_name); *************** *** 1027,1032 **** memset(&var, 0, sizeof(var)); if (!fb_find_mode(&var, &fb_info, mode_option, pvr2dc_modedb, ! NUM_TOTAL_MODES, &pvr2dc_modedb[0], 16)) { return -EINVAL; } --- 1040,1048 ---- memset(&var, 0, sizeof(var)); + if (video_output == VO_VGA) + defmode = DEFMODE_VGA; + if (!fb_find_mode(&var, &fb_info, mode_option, pvr2dc_modedb, ! NUM_TOTAL_MODES, &pvr2dc_modedb[defmode], 16)) { return -EINVAL; } |