]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ENGR00139755 mxc edid: work around no support interlaced mode
authorJason Chen <b02280@freescale.com>
Fri, 25 Feb 2011 08:00:17 +0000 (16:00 +0800)
committerLothar Waßmann <LW@KARO-electronics.de>
Fri, 24 May 2013 06:32:47 +0000 (08:32 +0200)
Remove interlaced mode from fb modelist before it can be supported.
Should revert this patch after interlaced mode support on normal display port.

Signed-off-by: Jason Chen <b02280@freescale.com>
(cherry picked from commit 079a6024a7369117b8f2ca8f3a905702a0175394)

drivers/video/mxc/mxc_edid.c
drivers/video/mxc/mxc_ipuv3_fb.c
drivers/video/mxc/mxcfb_sii902x.c

index d5f4ebeb10d81de6440bb23977fb7b52d64f97b1..3a171c726864609651e969c4bcfe8130dd8c6f0e 100644 (file)
@@ -217,8 +217,10 @@ static void det_worker(struct work_struct *work)
                                fb_destroy_modelist(&mxc_ddc.fbi->modelist);
 
                                for (i = 0; i < mxc_ddc.fbi->monspecs.modedb_len; i++)
-                                       fb_add_videomode(&mxc_ddc.fbi->monspecs.modedb[i],
-                                                       &mxc_ddc.fbi->modelist);
+                                       /*FIXME now we do not support interlaced mode */
+                                       if (!(mxc_ddc.fbi->monspecs.modedb[i].vmode & FB_VMODE_INTERLACED))
+                                               fb_add_videomode(&mxc_ddc.fbi->monspecs.modedb[i],
+                                                               &mxc_ddc.fbi->modelist);
 
                                fb_var_to_videomode(&m, &mxc_ddc.fbi->var);
                                mode = fb_find_nearest_mode(&m,
index 7631445d65d29027364f582363cbf323be74a851..03c07b98496126ce256bc854a39f31923c72ec68 100644 (file)
@@ -1693,9 +1693,22 @@ static int mxcfb_setup(struct fb_info *fbi, struct platform_device *pdev)
                        INIT_LIST_HEAD(&fbi->modelist);
 
                        if (mxc_disp_mode[mxcfbi->ipu_di].num_modes) {
+                               int i;
                                mode = mxc_disp_mode[mxcfbi->ipu_di].mode;
                                num = mxc_disp_mode[mxcfbi->ipu_di].num_modes;
-                               fb_videomode_to_modelist(mode, num, &fbi->modelist);
+
+                               for (i = 0; i < num; i++) {
+                                       /*
+                                        * FIXME now we do not support interlaced
+                                        * mode for ddc mode
+                                        */
+                                       if ((mxc_disp_mode[mxcfbi->ipu_di].dev_mode
+                                               & MXC_DISP_DDC_DEV) &&
+                                               (mode[i].vmode & FB_VMODE_INTERLACED))
+                                               continue;
+                                       else
+                                               fb_add_videomode(&mode[i], &fbi->modelist);
+                               }
                        }
 
                        if ((mxc_disp_mode[mxcfbi->ipu_di].dev_mode
index 9749aead27608859c751ca8f9cd990cc6fa7c3fc..7e1080ffee0baaa3ce62c442eec5f969220b3455 100644 (file)
@@ -233,9 +233,12 @@ static void det_worker(struct work_struct *work)
 
                                        fb_destroy_modelist(&sii902x.fbi->modelist);
 
-                                       for (i = 0; i < sii902x.fbi->monspecs.modedb_len; i++)
-                                               fb_add_videomode(&sii902x.fbi->monspecs.modedb[i],
-                                                               &sii902x.fbi->modelist);
+                                       for (i = 0; i < sii902x.fbi->monspecs.modedb_len; i++) {
+                                               /*FIXME now we do not support interlaced mode */
+                                               if (!(sii902x.fbi->monspecs.modedb[i].vmode & FB_VMODE_INTERLACED))
+                                                       fb_add_videomode(&sii902x.fbi->monspecs.modedb[i],
+                                                                       &sii902x.fbi->modelist);
+                                       }
 
                                        fb_var_to_videomode(&m, &sii902x.fbi->var);
                                        mode = fb_find_nearest_mode(&m,