]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
video: tegra: dc: update VIC identification
authorNaveen Kumar S <nkumars@nvidia.com>
Thu, 26 Nov 2015 09:55:39 +0000 (15:25 +0530)
committermobile promotions <svcmobile_promotions@nvidia.com>
Wed, 23 Dec 2015 10:01:39 +0000 (02:01 -0800)
Adding few more checks to help VIC identification.
Comparing 1001/1000 value of pixclock to take care of
pclk rounding-off issue. Also, comparing mode->flag value
helps in choosing the CEA mode with matching aspect ratio.

bug 200148145
bug 200145631
bug 1689283
bug 200154490

Change-Id: Ia80ba4dd3337772b24b74ee355a1032d59b31d9d
Signed-off-by: Naveen Kumar S <nkumars@nvidia.com>
Reviewed-on: http://git-master/r/838452
(cherry picked from commit 1ee939ea33c893a5b98652cef4d0fae5c7f25c32)
Reviewed-on: http://git-master/r/839223
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Mitch Luban <mluban@nvidia.com>
GVS: Gerrit_Virtual_Submit

drivers/video/tegra/dc/hdmi2.0.c

index 7c0f41a72c09abd8c3ca1214dd3f6afb3ec03a03..471f2f46a0c973c5843541d1cf70970bb8aeea8d 100644 (file)
@@ -1289,7 +1289,8 @@ static int tegra_hdmi_find_cea_vic(struct tegra_hdmi *hdmi)
                       m.refresh == curr->refresh + 1) &&
                      m.xres         == curr->xres &&
                      m.yres         == curr->yres &&
-                     m.pixclock     == curr->pixclock &&
+                     (m.pixclock    == curr->pixclock ||
+                     (m.pixclock * 1001 / 1000) == curr->pixclock) &&
                      m.hsync_len    == curr->hsync_len &&
                      m.vsync_len    == curr->vsync_len &&
                      m.left_margin  == curr->left_margin &&
@@ -1297,6 +1298,7 @@ static int tegra_hdmi_find_cea_vic(struct tegra_hdmi *hdmi)
                      m.upper_margin == curr->upper_margin &&
                      m.lower_margin == curr->lower_margin &&
                      m.sync         == curr->sync &&
+                     m.flag         == curr->flag &&
                      m.vmode        == curr->vmode))
                        continue;