From 21d8618e0c29274e5c15b5efb2c8b37de9f5db34 Mon Sep 17 00:00:00 2001 From: Dominik Sliwa Date: Wed, 26 Jul 2017 16:45:34 +0200 Subject: 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 Acked-by: Marcel Ziswiler --- drivers/video/tegra/dc/mode.c | 15 ++++++++++++--- 1 file 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); -- cgit v1.2.3