summaryrefslogtreecommitdiff
path: root/drivers/video
diff options
context:
space:
mode:
authorJason Chen <b02280@freescale.com>2011-12-07 10:22:57 +0800
committerJason Liu <r64343@freescale.com>2012-01-09 21:09:26 +0800
commit9bb76330afa58fc69f71ab08af48814774195af0 (patch)
tree0b11a97b9ab74f496377c897eb50ae81631cec97 /drivers/video
parent76b3e83bf75add7f864ec6842823616282839cda (diff)
ENGR00169657 mxc_edid: no aspect vmode setting for detailed timing block
Add aspect ratio setting into vmode for detailed timing block. Signed-off-by: Jason Chen <b02280@freescale.com>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/mxc/mxc_edid.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/drivers/video/mxc/mxc_edid.c b/drivers/video/mxc/mxc_edid.c
index 48502d05d58b..386df9259971 100644
--- a/drivers/video/mxc/mxc_edid.c
+++ b/drivers/video/mxc/mxc_edid.c
@@ -32,7 +32,6 @@
#include "../edid.h"
#undef DEBUG /* define this for verbose EDID parsing output */
-
#ifdef DEBUG
#define DPRINTK(fmt, args...) printk(fmt, ## args)
#else
@@ -185,6 +184,19 @@ static void get_detailed_timing(unsigned char *block,
}
mode->flag = FB_MODE_IS_DETAILED;
+ if ((H_SIZE / 16) == (V_SIZE / 9))
+ mode->vmode |= FB_VMODE_ASPECT_16_9;
+ else if ((H_SIZE / 4) == (V_SIZE / 3))
+ mode->vmode |= FB_VMODE_ASPECT_4_3;
+ else if ((mode->xres / 16) == (mode->yres / 9))
+ mode->vmode |= FB_VMODE_ASPECT_16_9;
+ else if ((mode->xres / 4) == (mode->yres / 3))
+ mode->vmode |= FB_VMODE_ASPECT_4_3;
+
+ if (mode->vmode & FB_VMODE_ASPECT_16_9)
+ DPRINTK("Aspect ratio: 16:9\n");
+ if (mode->vmode & FB_VMODE_ASPECT_4_3)
+ DPRINTK("Aspect ratio: 4:3\n");
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);