Check for valid hsync to declare sync detected for VGA

Checking for the sync bits of the sync detect register does not always
work reliably, as the bit is sometimes set before a mode is detected.
Subsequently detecting the mode will fail.

This adds a check for a valid hsync to declare sync as detected, which
ensures that the following mode detection will not fail.

While at it, this moves the modes data to a tuples array so that it can
be used without duplication for all mode-detection-related methods.

Bug=None
Test=Apply various mode and check that mode detection works every time

Change-Id: Id0d8c5ae88a08237d0da6d420baa00ee2ada615c
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@linux.intel.com>
Reviewed-on: https://chromium-review.googlesource.com/558094
Reviewed-by: Hsu Wei-Cheng <mojahsu@chromium.org>
1 file changed