diff options
author | Donghan Ryu <dryu@nvidia.com> | 2011-06-20 00:39:57 +0900 |
---|---|---|
committer | Varun Colbert <vcolbert@nvidia.com> | 2011-07-13 16:45:50 -0700 |
commit | e50086bfeb1c1fd090ddc5f6c4d951bd4f5fdbcd (patch) | |
tree | 135b4f2c97107c2febdcdb8d6f6b816e766bd018 /drivers/video/tegra/fb.c | |
parent | 50edca71f31cd194a7734298dd9314cd6b8c2a79 (diff) |
video: tegra: dc: fix hdmi mode filter
If there are more than one hdmi modes that have same xres,
yres, and vmode, tegra_dc_hdmi_mode_equal can return true even
though pixclocks are way different from each other.
Now, tegra_dc_hdmi_mode_equal will retun false if pixclock has
more than 1Hz of difference. Also, tegra_fb_set_par will use
fb_find_nearest_mode instead of fb_find_best_mode to take
refresh rate into the consideration.
Bug: 815409
(cherry picked from commit 8cf6e47dd3d4efaa3a1f0a15f1bd36ad34d3a951)
Change-Id: I744d3c6dfb553bfab190e7d82a9dc5d8782e45d5
Reviewed-on: http://git-master/r/37419
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>
Diffstat (limited to 'drivers/video/tegra/fb.c')
-rw-r--r-- | drivers/video/tegra/fb.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/video/tegra/fb.c b/drivers/video/tegra/fb.c index 41ea43688700..4b46fdf32c13 100644 --- a/drivers/video/tegra/fb.c +++ b/drivers/video/tegra/fb.c @@ -182,9 +182,13 @@ static int tegra_fb_set_par(struct fb_info *info) if (var->pixclock) { bool stereo; + struct tegra_dc_mode mode; + struct fb_videomode m; + + fb_var_to_videomode(&m, var); info->mode = (struct fb_videomode *) - fb_find_best_mode(var, &info->modelist); + fb_find_nearest_mode(&m, &info->modelist); if (!info->mode) { dev_warn(&tegra_fb->ndev->dev, "can't match video mode\n"); return -EINVAL; |