modedb: fb_find_nearest_mode compare interlaced versus progressive

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
sunxi-disp: ParseEDID: make BlockCount reflect number of blocks

Signed-off-by: Michal Suchanek <hramrach@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
sunxi-disp: Pass all edid blocks in one go to disp

Signed-off-by: Michal Suchanek <hramrach@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
sunxi-disp: Split out the cycle of ParseEDID into ParseEDID_CEA861_extension_block

Changes by HdG:
1) Renamed function from ParseEDID_DataBlock to
   ParseEDID_CEA861_extension_block
2) Removed the "if (BlockCount > 1)" checks since the
   "for (i = 1; i < BlockCount; i++) {" ... "}" is a nop then anyways

Signed-off-by: Michal Suchanek <hramrach@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
sunxi-disp: Initialize modeinfo list when it is allocated

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
sunxi-disp: Save modelist until notification is sent that modelist has changed

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
sunxi-disp: Remove modes we cannot do from the modelist

There is no use in advertising mode which we don't support due to an
unsupported pixelclock.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
sunxi-disp: Fix BSP_disp_set_videomode() not working when not in EDID mode

If the user requested EDID, but no monitor was connected on startup, then
when the monitor gets plugged-in hdmi_edid_received calls the fbcon
new_modelist notifier, which in turn tries to adjust the resolution to
one from the new modelist, but fails because BSP_disp_set_videomode() only
works if the initial EDID detection was successful, this patch fixes this.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
sunxi-disp: Unify early and normal suspend paths

Note that 3.4 does not have EARLY_SUSPEND at all, but doing things this way
allows us to keep the same code between 3.0 and 3.4

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
sunxi-disp: Only wait for EDID from Fb_init

This fixes a deadlock (until the 10s timeout hits) from disp_resume()

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
sunxi-disp: Add proper poweroff / dpms support

Signed-off-by: Hans de Goede <hdegoede@redhat.com>