MLK-14857: mxc_hdmi: Set default mode a CEA mode
authorRobert Chiras <robert.chiras@nxp.com>
Thu, 11 May 2017 11:34:01 +0000 (14:34 +0300)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 20:22:17 +0000 (15:22 -0500)
commit25e7613b6a2a932d956cb18f6f89e16d974c2a2b
tree44cfe6b05c7ae63048a15000371ade971b8edc79
parentf4d706476b28f87a71966ef9b36bb967964ccdf1
MLK-14857: mxc_hdmi: Set default mode a CEA mode

When using fb_find_mode from fbdev/core with a specified user more,
it will return a screeninfo structure with the pixclock corresponding to
a different refresh rate than the requested one. For example, for
1920x1080@60 it will return pixclock=5780. When we get the videmode for
this screeninfo, it will have a refresh of 59Hz, instead of 60Hz.
If we use this mode as default mode when EDID cannot be read, on a
monitor with fixed refresh rate of 60Hz, it won't work. Therefore, we
should save the default mode, the nearest mode from CEA modes defined by
our own driver (which will have the correct refresh rate and pixclock for
the requested resolution).

Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
drivers/video/fbdev/mxc/mxc_hdmi.c