diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2015-12-07 20:06:22 +0200 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2016-01-12 14:52:37 +0200 |
commit | 7eb69193974e771788e7dbce60f15693413cf2bb (patch) | |
tree | a8fd56b779aa7a1c0b443ed08c39897982eb6e85 /tests | |
parent | c47f147de78d4005ea1117e01a8bcc2d9f4c6d1e (diff) |
testpat: support interlace
Diffstat (limited to 'tests')
-rw-r--r-- | tests/testpat.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/testpat.cpp b/tests/testpat.cpp index c51d3ec..56ad7a5 100644 --- a/tests/testpat.cpp +++ b/tests/testpat.cpp @@ -120,7 +120,7 @@ static void get_default_crtc(Card& card, OutputInfo& output) static void parse_crtc(Card& card, const string& crtc_str, OutputInfo& output) { // @12:1920x1200-60 - const regex mode_re("(?:(@?)(\\d+):)?(?:(\\d+)x(\\d+))(?:-(\\d+))?"); + const regex mode_re("(?:(@?)(\\d+):)?(?:(\\d+)x(\\d+)(i)?)(?:-(\\d+))?"); smatch sm; if (!regex_match(crtc_str, sm, mode_re)) @@ -150,11 +150,10 @@ static void parse_crtc(Card& card, const string& crtc_str, OutputInfo& output) unsigned w = stoul(sm[3]); unsigned h = stoul(sm[4]); - unsigned refresh = 0; - if (sm[5].matched) - refresh = stoul(sm[5]); + bool ilace = sm[5].matched ? true : false; + unsigned refresh = sm[6].matched ? stoul(sm[6]) : 0; - output.mode = output.connector->get_mode(w, h, refresh); + output.mode = output.connector->get_mode(w, h, refresh, ilace); } static void parse_plane(Card& card, const string& plane_str, const OutputInfo& output, PlaneInfo& pinfo) |