sunxi: video: Add extra modes and allow selecting the mode via hdmi_mode env

Add the following extra modes:

1280x720@50
1920x1080@60
1920x1200@60

And allow selecting them by setting (and then saving and rebooting) a
hdmi_mode env variable to the name of the mode.

Also make the reserved fb mem slightly larger to allow 1920x1200 to work.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
sunxi: display: Remove unused HDMI register addr defines

All hdmi code uses struct sunxi_hdmi_reg, so these are not needed.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
sunxi: display: Do not use eprintf in early boot

stderr is not hooked up yet as this point, so use a regular printf.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
edid: Add an edid_dtd_to_fbmode() helper function

Various u-boot video drivers use fb_videomode structs to store timing info,
add a helper function to convert an EDID detailed timing into a fb_videomode
struct.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
edid: Add an edid_check_checksum() helper function

Add a helper function to check the checksum of an EDID data block.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
sunxi: display: Add DDC & EDID support

Add DDC & EDID support and use it to automatically select the native mode of
the attached monitor. This can be overriden through the hdmi_mode env.
variable.

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