diff options
-rw-r--r-- | drivers/video/fbmon.c | 10 | ||||
-rw-r--r-- | drivers/video/modedb.c | 66 | ||||
-rw-r--r-- | include/linux/fb.h | 4 |
3 files changed, 79 insertions, 1 deletions
diff --git a/drivers/video/fbmon.c b/drivers/video/fbmon.c index b9f4781..d103919 100644 --- a/drivers/video/fbmon.c +++ b/drivers/video/fbmon.c @@ -546,6 +546,9 @@ static int get_dst_timing(unsigned char *block, static void get_detailed_timing(unsigned char *block, struct fb_videomode *mode) { + int v_size = V_SIZE; + int h_size = H_SIZE; + mode->xres = H_ACTIVE; mode->yres = V_ACTIVE; mode->pixclock = PIXEL_CLOCK; @@ -574,11 +577,18 @@ static void get_detailed_timing(unsigned char *block, } mode->flag = FB_MODE_IS_DETAILED; + /* get aspect ratio */ + if (h_size * 18 > v_size * 31 && h_size * 18 < v_size * 33) + mode->flag |= FB_FLAG_RATIO_16_9; + if (h_size * 18 > v_size * 23 && h_size * 18 < v_size * 25) + mode->flag |= FB_FLAG_RATIO_4_3; + DPRINTK(" %d MHz ", PIXEL_CLOCK/1000000); DPRINTK("%d %d %d %d ", H_ACTIVE, H_ACTIVE + H_SYNC_OFFSET, H_ACTIVE + H_SYNC_OFFSET + H_SYNC_WIDTH, H_ACTIVE + H_BLANKING); DPRINTK("%d %d %d %d ", V_ACTIVE, V_ACTIVE + V_SYNC_OFFSET, V_ACTIVE + V_SYNC_OFFSET + V_SYNC_WIDTH, V_ACTIVE + V_BLANKING); + DPRINTK("%dmm %dmm ", H_SIZE, V_SIZE); DPRINTK("%sHSync %sVSync\n\n", (HSYNC_POSITIVE) ? "+" : "-", (VSYNC_POSITIVE) ? "+" : "-"); } diff --git a/drivers/video/modedb.c b/drivers/video/modedb.c index b21b37b..0d686a4 100644 --- a/drivers/video/modedb.c +++ b/drivers/video/modedb.c @@ -300,6 +300,7 @@ const struct fb_videomode cea_modes[CEA_MODEDB_SIZE] = { .upper_margin = 33, .lower_margin = 1, .hsync_len = 96, .vsync_len = 2, .sync = 0, + .flag = FB_FLAG_RATIO_4_3, .vmode = FB_VMODE_NONINTERLACED}, /* 2: 720x480p @ 59.94Hz/60Hz */ {.refresh = 59, .xres = 720, .yres = 480, .pixclock = 37037, @@ -307,6 +308,7 @@ const struct fb_videomode cea_modes[CEA_MODEDB_SIZE] = { .upper_margin = 30, .lower_margin = 9, .hsync_len = 62, .vsync_len = 6, .sync = 0, + .flag = FB_FLAG_RATIO_4_3, .vmode = FB_VMODE_NONINTERLACED}, /* 3: 720x480p @ 59.94Hz/60Hz */ {.refresh = 59, .xres = 720, .yres = 480, .pixclock = 37037, @@ -314,6 +316,7 @@ const struct fb_videomode cea_modes[CEA_MODEDB_SIZE] = { .upper_margin = 30, .lower_margin = 9, .hsync_len = 62, .vsync_len = 6, .sync = 0, + .flag = FB_FLAG_RATIO_16_9, .vmode = FB_VMODE_NONINTERLACED}, /* 4: 1280x720p @ 59.94Hz/60Hz */ {.refresh = 60, .xres = 1280, .yres = 720, .pixclock = 13468, @@ -321,6 +324,7 @@ const struct fb_videomode cea_modes[CEA_MODEDB_SIZE] = { .upper_margin = 20, .lower_margin = 5, .hsync_len = 40, .vsync_len = 5, .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, + .flag = FB_FLAG_RATIO_16_9, .vmode = FB_VMODE_NONINTERLACED}, /* 5: 1920x1080i @ 59.94Hz/60Hz */ {.refresh = 60, .xres = 1920, .yres = 1080, .pixclock = 13468, @@ -328,6 +332,7 @@ const struct fb_videomode cea_modes[CEA_MODEDB_SIZE] = { .upper_margin = 15, .lower_margin = 2, .hsync_len = 44, .vsync_len = 5, .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, + .flag = FB_FLAG_RATIO_16_9, .vmode = FB_VMODE_INTERLACED}, /* 6: 720(1440)x480i @ 59.94Hz/60Hz */ {.refresh = 59, .xres = 1440, .yres = 480, .pixclock = 37037, @@ -335,6 +340,7 @@ const struct fb_videomode cea_modes[CEA_MODEDB_SIZE] = { .upper_margin = 15, .lower_margin = 4, .hsync_len = 124, .vsync_len = 3, .sync = 0, + .flag = FB_FLAG_RATIO_4_3 | FB_FLAG_PIXEL_REPEAT, .vmode = FB_VMODE_INTERLACED}, /* 7: 720(1440)x480i @ 59.94Hz/60Hz */ {.refresh = 59, .xres = 1440, .yres = 480, .pixclock = 37037, @@ -342,6 +348,7 @@ const struct fb_videomode cea_modes[CEA_MODEDB_SIZE] = { .upper_margin = 15, .lower_margin = 4, .hsync_len = 124, .vsync_len = 3, .sync = 0, + .flag = FB_FLAG_RATIO_16_9 | FB_FLAG_PIXEL_REPEAT, .vmode = FB_VMODE_INTERLACED}, /* 8: 720(1440)x240p @ 59.94Hz/60Hz */ {.refresh = 59, .xres = 1440, .yres = 240, .pixclock = 37037, @@ -349,6 +356,7 @@ const struct fb_videomode cea_modes[CEA_MODEDB_SIZE] = { .upper_margin = 15, .lower_margin = 5, .hsync_len = 124, .vsync_len = 3, .sync = 0, + .flag = FB_FLAG_RATIO_4_3 | FB_FLAG_PIXEL_REPEAT, .vmode = FB_VMODE_NONINTERLACED}, /* 9: 720(1440)x240p @ 59.94Hz/60Hz */ {.refresh = 59, .xres = 1440, .yres = 240, .pixclock = 37037, @@ -356,6 +364,7 @@ const struct fb_videomode cea_modes[CEA_MODEDB_SIZE] = { .upper_margin = 15, .lower_margin = 5, .hsync_len = 124, .vsync_len = 3, .sync = 0, + .flag = FB_FLAG_RATIO_16_9 | FB_FLAG_PIXEL_REPEAT, .vmode = FB_VMODE_NONINTERLACED}, /* 10: 2880x480i @ 59.94Hz/60Hz */ {.refresh = 59, .xres = 2880, .yres = 480, .pixclock = 18518, @@ -363,6 +372,7 @@ const struct fb_videomode cea_modes[CEA_MODEDB_SIZE] = { .upper_margin = 15, .lower_margin = 4, .hsync_len = 248, .vsync_len = 3, .sync = 0, + .flag = FB_FLAG_RATIO_4_3 | FB_FLAG_PIXEL_REPEAT, .vmode = FB_VMODE_INTERLACED}, /* 11: 2880x480i @ 59.94Hz/60Hz */ {.refresh = 59, .xres = 2880, .yres = 480, .pixclock = 18518, @@ -370,6 +380,7 @@ const struct fb_videomode cea_modes[CEA_MODEDB_SIZE] = { .upper_margin = 15, .lower_margin = 4, .hsync_len = 248, .vsync_len = 3, .sync = 0, + .flag = FB_FLAG_RATIO_16_9 | FB_FLAG_PIXEL_REPEAT, .vmode = FB_VMODE_INTERLACED}, /* 12: 2880x240p @ 59.94Hz/60Hz */ {.refresh = 59, .xres = 2880, .yres = 240, .pixclock = 18518, @@ -377,6 +388,7 @@ const struct fb_videomode cea_modes[CEA_MODEDB_SIZE] = { .upper_margin = 15, .lower_margin = 5, .hsync_len = 248, .vsync_len = 3, .sync = 0, + .flag = FB_FLAG_RATIO_4_3 | FB_FLAG_PIXEL_REPEAT, .vmode = FB_VMODE_NONINTERLACED}, /* 13: 2880x240p @ 59.94Hz/60Hz */ {.refresh = 59, .xres = 2880, .yres = 240, .pixclock = 18518, @@ -384,6 +396,7 @@ const struct fb_videomode cea_modes[CEA_MODEDB_SIZE] = { .upper_margin = 15, .lower_margin = 5, .hsync_len = 248, .vsync_len = 3, .sync = 0, + .flag = FB_FLAG_RATIO_16_9 | FB_FLAG_PIXEL_REPEAT, .vmode = FB_VMODE_NONINTERLACED}, /* 14: 1440x480p @ 59.94Hz/60Hz */ {.refresh = 59, .xres = 1440, .yres = 480, .pixclock = 18518, @@ -391,6 +404,7 @@ const struct fb_videomode cea_modes[CEA_MODEDB_SIZE] = { .upper_margin = 30, .lower_margin = 9, .hsync_len = 124, .vsync_len = 6, .sync = 0, + .flag = FB_FLAG_RATIO_4_3 | FB_FLAG_PIXEL_REPEAT, .vmode = FB_VMODE_NONINTERLACED}, /* 15: 1440x480p @ 59.94Hz/60Hz */ {.refresh = 59, .xres = 1440, .yres = 480, .pixclock = 18518, @@ -398,6 +412,7 @@ const struct fb_videomode cea_modes[CEA_MODEDB_SIZE] = { .upper_margin = 30, .lower_margin = 9, .hsync_len = 124, .vsync_len = 6, .sync = 0, + .flag = FB_FLAG_RATIO_16_9 | FB_FLAG_PIXEL_REPEAT, .vmode = FB_VMODE_NONINTERLACED}, /* 16: 1920x1080p @ 59.94Hz/60Hz */ {.refresh = 60, .xres = 1920, .yres = 1080, .pixclock = 6734, @@ -405,6 +420,7 @@ const struct fb_videomode cea_modes[CEA_MODEDB_SIZE] = { .upper_margin = 36, .lower_margin = 4, .hsync_len = 44, .vsync_len = 5, .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, + .flag = FB_FLAG_RATIO_16_9, .vmode = FB_VMODE_NONINTERLACED}, /* 17: 720x576p @ 50Hz */ {.refresh = 50, .xres = 720, .yres = 576, .pixclock = 37037, @@ -412,6 +428,7 @@ const struct fb_videomode cea_modes[CEA_MODEDB_SIZE] = { .upper_margin = 39, .lower_margin = 5, .hsync_len = 64, .vsync_len = 5, .sync = 0, + .flag = FB_FLAG_RATIO_4_3, .vmode = FB_VMODE_NONINTERLACED}, /* 18: 720x576p @ 50Hz */ {.refresh = 50, .xres = 720, .yres = 576, .pixclock = 37037, @@ -419,6 +436,7 @@ const struct fb_videomode cea_modes[CEA_MODEDB_SIZE] = { .upper_margin = 39, .lower_margin = 5, .hsync_len = 64, .vsync_len = 5, .sync = 0, + .flag = FB_FLAG_RATIO_16_9, .vmode = FB_VMODE_NONINTERLACED}, /* 19: 1280x720p @ 50Hz */ {.refresh = 50, .xres = 1280, .yres = 720, .pixclock = 13468, @@ -426,6 +444,7 @@ const struct fb_videomode cea_modes[CEA_MODEDB_SIZE] = { .upper_margin = 20, .lower_margin = 5, .hsync_len = 40, .vsync_len = 5, .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, + .flag = FB_FLAG_RATIO_16_9, .vmode = FB_VMODE_NONINTERLACED}, /* 20: 1920x1080i @ 50Hz */ {.refresh = 50, .xres = 1920, .yres = 1080, .pixclock = 13468, @@ -433,6 +452,7 @@ const struct fb_videomode cea_modes[CEA_MODEDB_SIZE] = { .upper_margin = 15, .lower_margin = 2, .hsync_len = 44, .vsync_len = 5, .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, + .flag = FB_FLAG_RATIO_16_9, .vmode = FB_VMODE_INTERLACED}, /* 21: 720(1440)x576i @ 50Hz */ {.refresh = 50, .xres = 1440, .yres = 576, .pixclock = 37037, @@ -440,6 +460,7 @@ const struct fb_videomode cea_modes[CEA_MODEDB_SIZE] = { .upper_margin = 19, .lower_margin = 2, .hsync_len = 126, .vsync_len = 3, .sync = 0, + .flag = FB_FLAG_RATIO_4_3 | FB_FLAG_PIXEL_REPEAT, .vmode = FB_VMODE_INTERLACED}, /* 22: 720(1440)x576i @ 50Hz */ {.refresh = 50, .xres = 1440, .yres = 576, .pixclock = 37037, @@ -447,6 +468,7 @@ const struct fb_videomode cea_modes[CEA_MODEDB_SIZE] = { .upper_margin = 19, .lower_margin = 2, .hsync_len = 126, .vsync_len = 3, .sync = 0, + .flag = FB_FLAG_RATIO_16_9 | FB_FLAG_PIXEL_REPEAT, .vmode = FB_VMODE_INTERLACED}, /* 23: 720(1440)x288p @ 50Hz */ {.refresh = 49, .xres = 1440, .yres = 288, .pixclock = 37037, @@ -454,6 +476,7 @@ const struct fb_videomode cea_modes[CEA_MODEDB_SIZE] = { .upper_margin = 19, .lower_margin = 4, .hsync_len = 126, .vsync_len = 3, .sync = 0, + .flag = FB_FLAG_RATIO_4_3 | FB_FLAG_PIXEL_REPEAT, .vmode = FB_VMODE_NONINTERLACED}, /* 24: 720(1440)x288p @ 50Hz */ {.refresh = 49, .xres = 1440, .yres = 288, .pixclock = 37037, @@ -461,6 +484,7 @@ const struct fb_videomode cea_modes[CEA_MODEDB_SIZE] = { .upper_margin = 19, .lower_margin = 4, .hsync_len = 126, .vsync_len = 3, .sync = 0, + .flag = FB_FLAG_RATIO_16_9 | FB_FLAG_PIXEL_REPEAT, .vmode = FB_VMODE_NONINTERLACED}, /* 25: 2880x576i @ 50Hz */ {.refresh = 50, .xres = 2880, .yres = 576, .pixclock = 18518, @@ -468,6 +492,7 @@ const struct fb_videomode cea_modes[CEA_MODEDB_SIZE] = { .upper_margin = 19, .lower_margin = 2, .hsync_len = 252, .vsync_len = 3, .sync = 0, + .flag = FB_FLAG_RATIO_4_3 | FB_FLAG_PIXEL_REPEAT, .vmode = FB_VMODE_INTERLACED}, /* 26: 2880x576i @ 50Hz */ {.refresh = 50, .xres = 2880, .yres = 576, .pixclock = 18518, @@ -475,6 +500,7 @@ const struct fb_videomode cea_modes[CEA_MODEDB_SIZE] = { .upper_margin = 19, .lower_margin = 2, .hsync_len = 252, .vsync_len = 3, .sync = 0, + .flag = FB_FLAG_RATIO_16_9 | FB_FLAG_PIXEL_REPEAT, .vmode = FB_VMODE_INTERLACED}, /* 27: 2880x288p @ 50Hz */ {.refresh = 49, .xres = 2880, .yres = 288, .pixclock = 18518, @@ -482,6 +508,7 @@ const struct fb_videomode cea_modes[CEA_MODEDB_SIZE] = { .upper_margin = 19, .lower_margin = 4, .hsync_len = 252, .vsync_len = 3, .sync = 0, + .flag = FB_FLAG_RATIO_4_3 | FB_FLAG_PIXEL_REPEAT, .vmode = FB_VMODE_NONINTERLACED}, /* 28: 2880x288p @ 50Hz */ {.refresh = 49, .xres = 2880, .yres = 288, .pixclock = 18518, @@ -489,6 +516,7 @@ const struct fb_videomode cea_modes[CEA_MODEDB_SIZE] = { .upper_margin = 19, .lower_margin = 4, .hsync_len = 252, .vsync_len = 3, .sync = 0, + .flag = FB_FLAG_RATIO_16_9 | FB_FLAG_PIXEL_REPEAT, .vmode = FB_VMODE_NONINTERLACED}, /* 29: 1440x576p @ 50Hz */ {.refresh = 50, .xres = 1440, .yres = 576, .pixclock = 18518, @@ -496,6 +524,7 @@ const struct fb_videomode cea_modes[CEA_MODEDB_SIZE] = { .upper_margin = 39, .lower_margin = 5, .hsync_len = 128, .vsync_len = 5, .sync = 0, + .flag = FB_FLAG_RATIO_4_3 | FB_FLAG_PIXEL_REPEAT, .vmode = FB_VMODE_NONINTERLACED}, /* 30: 1440x576p @ 50Hz */ {.refresh = 50, .xres = 1440, .yres = 576, .pixclock = 18518, @@ -503,6 +532,7 @@ const struct fb_videomode cea_modes[CEA_MODEDB_SIZE] = { .upper_margin = 39, .lower_margin = 5, .hsync_len = 128, .vsync_len = 5, .sync = 0, + .flag = FB_FLAG_RATIO_16_9 | FB_FLAG_PIXEL_REPEAT, .vmode = FB_VMODE_NONINTERLACED}, /* 31: 1920x1080p @ 50Hz */ {.refresh = 50, .xres = 1920, .yres = 1080, .pixclock = 6734, @@ -510,6 +540,7 @@ const struct fb_videomode cea_modes[CEA_MODEDB_SIZE] = { .upper_margin = 36, .lower_margin = 4, .hsync_len = 44, .vsync_len = 5, .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, + .flag = FB_FLAG_RATIO_16_9, .vmode = FB_VMODE_NONINTERLACED}, /* 32: 1920x1080p @ 23.97Hz/24Hz */ {.refresh = 24, .xres = 1920, .yres = 1080, .pixclock = 13468, @@ -517,6 +548,7 @@ const struct fb_videomode cea_modes[CEA_MODEDB_SIZE] = { .upper_margin = 36, .lower_margin = 4, .hsync_len = 44, .vsync_len = 5, .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, + .flag = FB_FLAG_RATIO_16_9, .vmode = FB_VMODE_NONINTERLACED}, /* 33: 1920x1080p @ 25Hz */ {.refresh = 25, .xres = 1920, .yres = 1080, .pixclock = 13468, @@ -524,6 +556,7 @@ const struct fb_videomode cea_modes[CEA_MODEDB_SIZE] = { .upper_margin = 36, .lower_margin = 4, .hsync_len = 44, .vsync_len = 5, .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, + .flag = FB_FLAG_RATIO_16_9, .vmode = FB_VMODE_NONINTERLACED}, /* 34: 1920x1080p @ 29.97Hz/30Hz */ {.refresh = 30, .xres = 1920, .yres = 1080, .pixclock = 13468, @@ -531,6 +564,7 @@ const struct fb_videomode cea_modes[CEA_MODEDB_SIZE] = { .upper_margin = 36, .lower_margin = 4, .hsync_len = 44, .vsync_len = 5, .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, + .flag = FB_FLAG_RATIO_16_9, .vmode = FB_VMODE_NONINTERLACED}, /* 35: 2880x480p @ 59.94Hz/60Hz */ {.refresh = 59, .xres = 2880, .yres = 480, .pixclock = 9259, @@ -538,6 +572,7 @@ const struct fb_videomode cea_modes[CEA_MODEDB_SIZE] = { .upper_margin = 30, .lower_margin = 9, .hsync_len = 248, .vsync_len = 6, .sync = 0, + .flag = FB_FLAG_RATIO_4_3 | FB_FLAG_PIXEL_REPEAT, .vmode = FB_VMODE_NONINTERLACED}, /* 36: 2880x480p @ 59.94Hz/60Hz */ {.refresh = 59, .xres = 2880, .yres = 480, .pixclock = 9259, @@ -545,6 +580,7 @@ const struct fb_videomode cea_modes[CEA_MODEDB_SIZE] = { .upper_margin = 30, .lower_margin = 9, .hsync_len = 248, .vsync_len = 6, .sync = 0, + .flag = FB_FLAG_RATIO_16_9 | FB_FLAG_PIXEL_REPEAT, .vmode = FB_VMODE_NONINTERLACED}, /* 37: 2880x576p @ 50Hz */ {.refresh = 50, .xres = 2880, .yres = 576, .pixclock = 9259, @@ -552,6 +588,7 @@ const struct fb_videomode cea_modes[CEA_MODEDB_SIZE] = { .upper_margin = 39, .lower_margin = 5, .hsync_len = 256, .vsync_len = 5, .sync = 0, + .flag = FB_FLAG_RATIO_4_3 | FB_FLAG_PIXEL_REPEAT, .vmode = FB_VMODE_NONINTERLACED}, /* 38: 2880x576p @ 50Hz */ {.refresh = 50, .xres = 2880, .yres = 576, .pixclock = 9259, @@ -559,6 +596,7 @@ const struct fb_videomode cea_modes[CEA_MODEDB_SIZE] = { .upper_margin = 39, .lower_margin = 5, .hsync_len = 256, .vsync_len = 5, .sync = 0, + .flag = FB_FLAG_RATIO_16_9 | FB_FLAG_PIXEL_REPEAT, .vmode = FB_VMODE_NONINTERLACED}, /* 39: 1920x1080i @ 50Hz */ {.refresh = 50, .xres = 1920, .yres = 1080, .pixclock = 13888, @@ -566,6 +604,7 @@ const struct fb_videomode cea_modes[CEA_MODEDB_SIZE] = { .upper_margin = 57, .lower_margin = 2, .hsync_len = 168, .vsync_len = 5, .sync = FB_SYNC_HOR_HIGH_ACT, + .flag = FB_FLAG_RATIO_16_9, .vmode = FB_VMODE_INTERLACED}, /* 40: 1920x1080i @ 100Hz */ {.refresh = 100, .xres = 1920, .yres = 1080, .pixclock = 6734, @@ -573,6 +612,7 @@ const struct fb_videomode cea_modes[CEA_MODEDB_SIZE] = { .upper_margin = 15, .lower_margin = 2, .hsync_len = 44, .vsync_len = 5, .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, + .flag = FB_FLAG_RATIO_16_9, .vmode = FB_VMODE_INTERLACED}, /* 41: 1280x720p @ 100Hz */ {.refresh = 100, .xres = 1280, .yres = 720, .pixclock = 6734, @@ -580,6 +620,7 @@ const struct fb_videomode cea_modes[CEA_MODEDB_SIZE] = { .upper_margin = 20, .lower_margin = 5, .hsync_len = 40, .vsync_len = 5, .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, + .flag = FB_FLAG_RATIO_16_9, .vmode = FB_VMODE_NONINTERLACED}, /* 42: 720x576p @ 100Hz */ {.refresh = 100, .xres = 720, .yres = 576, .pixclock = 18518, @@ -587,6 +628,7 @@ const struct fb_videomode cea_modes[CEA_MODEDB_SIZE] = { .upper_margin = 39, .lower_margin = 5, .hsync_len = 64, .vsync_len = 5, .sync = 0, + .flag = FB_FLAG_RATIO_4_3, .vmode = FB_VMODE_NONINTERLACED}, /* 43: 720x576p @ 100Hz */ {.refresh = 100, .xres = 720, .yres = 576, .pixclock = 18518, @@ -594,6 +636,7 @@ const struct fb_videomode cea_modes[CEA_MODEDB_SIZE] = { .upper_margin = 39, .lower_margin = 5, .hsync_len = 64, .vsync_len = 5, .sync = 0, + .flag = FB_FLAG_RATIO_16_9, .vmode = FB_VMODE_NONINTERLACED}, /* 44: 720(1440)x576i @ 100Hz */ {.refresh = 100, .xres = 1440, .yres = 576, .pixclock = 18518, @@ -601,6 +644,7 @@ const struct fb_videomode cea_modes[CEA_MODEDB_SIZE] = { .upper_margin = 19, .lower_margin = 2, .hsync_len = 126, .vsync_len = 3, .sync = 0, + .flag = FB_FLAG_RATIO_4_3 | FB_FLAG_PIXEL_REPEAT, .vmode = FB_VMODE_INTERLACED}, /* 45: 720(1440)x576i @ 100Hz */ {.refresh = 100, .xres = 1440, .yres = 576, .pixclock = 18518, @@ -608,6 +652,7 @@ const struct fb_videomode cea_modes[CEA_MODEDB_SIZE] = { .upper_margin = 19, .lower_margin = 2, .hsync_len = 126, .vsync_len = 3, .sync = 0, + .flag = FB_FLAG_RATIO_16_9 | FB_FLAG_PIXEL_REPEAT, .vmode = FB_VMODE_INTERLACED}, /* 46: 1920x1080i @ 119.88/120Hz */ {.refresh = 120, .xres = 1920, .yres = 1080, .pixclock = 6734, @@ -615,6 +660,7 @@ const struct fb_videomode cea_modes[CEA_MODEDB_SIZE] = { .upper_margin = 15, .lower_margin = 2, .hsync_len = 44, .vsync_len = 5, .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, + .flag = FB_FLAG_RATIO_16_9, .vmode = FB_VMODE_INTERLACED}, /* 47: 1280x720p @ 119.88/120Hz */ {.refresh = 120, .xres = 1280, .yres = 720, .pixclock = 6734, @@ -622,6 +668,7 @@ const struct fb_videomode cea_modes[CEA_MODEDB_SIZE] = { .upper_margin = 20, .lower_margin = 5, .hsync_len = 40, .vsync_len = 5, .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, + .flag = FB_FLAG_RATIO_16_9, .vmode = FB_VMODE_NONINTERLACED}, /* 48: 720x480p @ 119.88/120Hz */ {.refresh = 119, .xres = 720, .yres = 480, .pixclock = 18518, @@ -629,6 +676,7 @@ const struct fb_videomode cea_modes[CEA_MODEDB_SIZE] = { .upper_margin = 30, .lower_margin = 9, .hsync_len = 62, .vsync_len = 6, .sync = 0, + .flag = FB_FLAG_RATIO_4_3, .vmode = FB_VMODE_NONINTERLACED}, /* 49: 720x480p @ 119.88/120Hz */ {.refresh = 119, .xres = 720, .yres = 480, .pixclock = 18518, @@ -636,6 +684,7 @@ const struct fb_videomode cea_modes[CEA_MODEDB_SIZE] = { .upper_margin = 30, .lower_margin = 9, .hsync_len = 62, .vsync_len = 6, .sync = 0, + .flag = FB_FLAG_RATIO_16_9, .vmode = FB_VMODE_NONINTERLACED}, /* 50: 720(1440)x480i @ 119.88/120Hz */ {.refresh = 119, .xres = 1440, .yres = 480, .pixclock = 18518, @@ -643,6 +692,7 @@ const struct fb_videomode cea_modes[CEA_MODEDB_SIZE] = { .upper_margin = 15, .lower_margin = 4, .hsync_len = 124, .vsync_len = 3, .sync = 0, + .flag = FB_FLAG_RATIO_4_3 | FB_FLAG_PIXEL_REPEAT, .vmode = FB_VMODE_INTERLACED}, /* 51: 720(1440)x480i @ 119.88/120Hz */ {.refresh = 119, .xres = 1440, .yres = 480, .pixclock = 18518, @@ -650,6 +700,7 @@ const struct fb_videomode cea_modes[CEA_MODEDB_SIZE] = { .upper_margin = 15, .lower_margin = 4, .hsync_len = 124, .vsync_len = 3, .sync = 0, + .flag = FB_FLAG_RATIO_16_9 | FB_FLAG_PIXEL_REPEAT, .vmode = FB_VMODE_INTERLACED}, /* 52: 720x576p @ 200Hz */ {.refresh = 200, .xres = 720, .yres = 576, .pixclock = 9259, @@ -657,6 +708,7 @@ const struct fb_videomode cea_modes[CEA_MODEDB_SIZE] = { .upper_margin = 39, .lower_margin = 5, .hsync_len = 64, .vsync_len = 5, .sync = 0, + .flag = FB_FLAG_RATIO_4_3, .vmode = FB_VMODE_NONINTERLACED}, /* 53: 720x576p @ 200Hz */ {.refresh = 200, .xres = 720, .yres = 576, .pixclock = 9259, @@ -664,6 +716,7 @@ const struct fb_videomode cea_modes[CEA_MODEDB_SIZE] = { .upper_margin = 39, .lower_margin = 5, .hsync_len = 64, .vsync_len = 5, .sync = 0, + .flag = FB_FLAG_RATIO_16_9, .vmode = FB_VMODE_NONINTERLACED}, /* 54: 720(1440)x576i @ 200Hz */ {.refresh = 200, .xres = 1440, .yres = 576, .pixclock = 9259, @@ -671,6 +724,7 @@ const struct fb_videomode cea_modes[CEA_MODEDB_SIZE] = { .upper_margin = 19, .lower_margin = 2, .hsync_len = 126, .vsync_len = 3, .sync = 0, + .flag = FB_FLAG_RATIO_4_3 | FB_FLAG_PIXEL_REPEAT, .vmode = FB_VMODE_INTERLACED}, /* 55: 720(1440)x576i @ 200Hz */ {.refresh = 200, .xres = 1440, .yres = 576, .pixclock = 9259, @@ -678,6 +732,7 @@ const struct fb_videomode cea_modes[CEA_MODEDB_SIZE] = { .upper_margin = 19, .lower_margin = 2, .hsync_len = 126, .vsync_len = 3, .sync = 0, + .flag = FB_FLAG_RATIO_16_9 | FB_FLAG_PIXEL_REPEAT, .vmode = FB_VMODE_INTERLACED}, /* 56: 720x480p @ 239.76/240Hz */ {.refresh = 239, .xres = 720, .yres = 480, .pixclock = 9259, @@ -685,6 +740,7 @@ const struct fb_videomode cea_modes[CEA_MODEDB_SIZE] = { .upper_margin = 30, .lower_margin = 9, .hsync_len = 62, .vsync_len = 6, .sync = 0, + .flag = FB_FLAG_RATIO_4_3, .vmode = FB_VMODE_NONINTERLACED}, /* 57: 720x480p @ 239.76/240Hz */ {.refresh = 239, .xres = 720, .yres = 480, .pixclock = 9259, @@ -692,6 +748,7 @@ const struct fb_videomode cea_modes[CEA_MODEDB_SIZE] = { .upper_margin = 30, .lower_margin = 9, .hsync_len = 62, .vsync_len = 6, .sync = 0, + .flag = FB_FLAG_RATIO_16_9, .vmode = FB_VMODE_NONINTERLACED}, /* 58: 720(1440)x480i @ 239.76/240Hz */ {.refresh = 239, .xres = 1440, .yres = 480, .pixclock = 9259, @@ -699,6 +756,7 @@ const struct fb_videomode cea_modes[CEA_MODEDB_SIZE] = { .upper_margin = 15, .lower_margin = 4, .hsync_len = 124, .vsync_len = 3, .sync = 0, + .flag = FB_FLAG_RATIO_4_3 | FB_FLAG_PIXEL_REPEAT, .vmode = FB_VMODE_INTERLACED}, /* 59: 720(1440)x480i @ 239.76/240Hz */ {.refresh = 239, .xres = 1440, .yres = 480, .pixclock = 9259, @@ -706,6 +764,7 @@ const struct fb_videomode cea_modes[CEA_MODEDB_SIZE] = { .upper_margin = 15, .lower_margin = 4, .hsync_len = 124, .vsync_len = 3, .sync = 0, + .flag = FB_FLAG_RATIO_16_9 | FB_FLAG_PIXEL_REPEAT, .vmode = FB_VMODE_INTERLACED}, /* 60: 1280x720p @ 23.97Hz/24Hz */ {.refresh = 24, .xres = 1280, .yres = 720, .pixclock = 16835, @@ -713,6 +772,7 @@ const struct fb_videomode cea_modes[CEA_MODEDB_SIZE] = { .upper_margin = 20, .lower_margin = 5, .hsync_len = 40, .vsync_len = 5, .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, + .flag = FB_FLAG_RATIO_16_9, .vmode = FB_VMODE_NONINTERLACED}, /* 61: 1280x720p @ 25Hz */ {.refresh = 25, .xres = 1280, .yres = 720, .pixclock = 13468, @@ -720,6 +780,7 @@ const struct fb_videomode cea_modes[CEA_MODEDB_SIZE] = { .upper_margin = 20, .lower_margin = 5, .hsync_len = 40, .vsync_len = 5, .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, + .flag = FB_FLAG_RATIO_16_9, .vmode = FB_VMODE_NONINTERLACED}, /* 62: 1280x720p @ 29.97Hz/30Hz */ {.refresh = 30, .xres = 1280, .yres = 720, .pixclock = 13468, @@ -727,6 +788,7 @@ const struct fb_videomode cea_modes[CEA_MODEDB_SIZE] = { .upper_margin = 20, .lower_margin = 5, .hsync_len = 40, .vsync_len = 5, .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, + .flag = FB_FLAG_RATIO_16_9, .vmode = FB_VMODE_NONINTERLACED}, /* 63: 1920x1080p @ 119.88/120Hz */ {.refresh = 120, .xres = 1920, .yres = 1080, .pixclock = 3367, @@ -734,6 +796,7 @@ const struct fb_videomode cea_modes[CEA_MODEDB_SIZE] = { .upper_margin = 36, .lower_margin = 4, .hsync_len = 44, .vsync_len = 5, .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, + .flag = FB_FLAG_RATIO_16_9, .vmode = FB_VMODE_NONINTERLACED}, /* 64: 1920x1080p @ 100Hz */ {.refresh = 100, .xres = 1920, .yres = 1080, .pixclock = 3367, @@ -741,11 +804,12 @@ const struct fb_videomode cea_modes[CEA_MODEDB_SIZE] = { .upper_margin = 36, .lower_margin = 4, .hsync_len = 44, .vsync_len = 5, .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, + .flag = FB_FLAG_RATIO_16_9, .vmode = FB_VMODE_NONINTERLACED}, }; EXPORT_SYMBOL(cea_modes); -const struct fb_videomode vesa_modes[] = { +const struct fb_videomode vesa_modes[VESA_MODEDB_SIZE] = { /* 0 640x350-85 VESA */ { NULL, 85, 640, 350, 31746, 96, 32, 60, 32, 64, 3, FB_SYNC_HOR_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA}, diff --git a/include/linux/fb.h b/include/linux/fb.h index 7ae0451..6de7139 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h @@ -226,6 +226,10 @@ struct fb_bitfield { #define FB_VMODE_SMOOTH_XPAN 512 /* smooth xpan possible (internally used) */ #define FB_VMODE_CONUPDATE 512 /* don't update x/yoffset */ +#define FB_FLAG_RATIO_4_3 64 +#define FB_FLAG_RATIO_16_9 128 +#define FB_FLAG_PIXEL_REPEAT 256 + /* * Display rotation support */ |