summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorDominik Sliwa <dominik.sliwa@toradex.com>2017-07-26 16:45:34 +0200
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2017-09-20 16:54:28 +0200
commit21d8618e0c29274e5c15b5efb2c8b37de9f5db34 (patch)
treeda99878195a29c5b5bbcd5104702d7ea7645a2c2 /drivers
parenta92fc5fd4b28c3f51551b182c227559e565c1803 (diff)
video: tegra: make tegra_fb_find_mode check default modes
We were only looking in tegra, VESA and CEA tables. Let's also check standard video mode definitions table Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/video/tegra/dc/mode.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/drivers/video/tegra/dc/mode.c b/drivers/video/tegra/dc/mode.c
index f5cd4fb0cdea..a28df8a77a51 100644
--- a/drivers/video/tegra/dc/mode.c
+++ b/drivers/video/tegra/dc/mode.c
@@ -171,8 +171,8 @@ const struct fb_videomode tegra_modes[] = {
},
};
-/* try to find best matching mode using our modes, VESA and CEA modes from
- * modedb
+/* try to find best matching mode using our modes, VESA, CEA and default modes
+ * from modedb
*/
int tegra_fb_find_mode(struct fb_var_screeninfo *var, struct fb_info *info,
const char* option, unsigned int default_bpp)
@@ -193,8 +193,17 @@ int tegra_fb_find_mode(struct fb_var_screeninfo *var, struct fb_info *info,
if (out == 1 || out == 2)
return out;
- return fb_find_mode(&info->var, info, option,
+ out = fb_find_mode(&info->var, info, option,
vesa_modes, VESA_MODEDB_SIZE, NULL, default_bpp);
+
+ /* Check if we found a full match */
+ if (out == 1 || out == 2)
+ return out;
+
+ /* Try default mode table */
+
+ return fb_find_mode(&info->var, info, option,
+ NULL, 0, NULL, default_bpp);
}
EXPORT_SYMBOL(tegra_fb_find_mode);