diff options
author | Lajos Molnar <molnar@ti.com> | 2011-09-09 16:44:13 -0500 |
---|---|---|
committer | Erik Gilling <konkers@android.com> | 2011-09-14 11:28:39 -0700 |
commit | 612feafbd84fc1b9ad6bbd2d1ec65f394f2e3a2f (patch) | |
tree | b04cda242d5a9eba2edadbe62f907ab88d2e6868 /drivers/video/fbmon.c | |
parent | 825b424987f7ca8f7cdd3996e2d1c5d77674e528 (diff) | |
download | kernel_samsung_tuna-612feafbd84fc1b9ad6bbd2d1ec65f394f2e3a2f.zip kernel_samsung_tuna-612feafbd84fc1b9ad6bbd2d1ec65f394f2e3a2f.tar.gz kernel_samsung_tuna-612feafbd84fc1b9ad6bbd2d1ec65f394f2e3a2f.tar.bz2 |
video: fbmon: Add support for CEA pixel ratios.
CEA defines multiple timings with dual timing ratios that cannot
be distinguished from timings parameters. Added 2 new fb flags
to specify 4:3 or 16:9 display ratios.
Also added a flag that denotes CEA formats that require repeating
pixels.
Change-Id: I75d413babdcb4048a0ccce6548ed386ad0e52318
Signed-off-by: Lajos Molnar <molnar@ti.com>
Diffstat (limited to 'drivers/video/fbmon.c')
-rw-r--r-- | drivers/video/fbmon.c | 10 |
1 files changed, 10 insertions, 0 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) ? "+" : "-"); } |