Edid: make a class out of the edid parsing functions
This CL refactors the multiple individual functions of edid_parser.* into a single EdidParser class that parses an EDID blob passed on ctor, populating the necessary/available fields. This simplifies extending this parser (which has happened and is expected to happen again), and simplifies the client APIs and the unittests. The client contract is changed a bit, since EdidParser won't tell if the parsing failed, but this is not really impactful since the current users ignore this booleans anyhow. Erroneous parsing is signalled via error values. Besides that, a notable change is that now we're parsing the whole EDID whereas on ToT this was somewhat on demand. But anyway drm_util always wanted all those parsings, and EDIDParserX11, which only needed one on ToT, is expected to work on Linux, where walking a 128B array should not be very demanding. Also EDIDParserX11 had two unused methods, removed. Change-Id: Id38a02dad1bc4ba55a3f7041034098dac5153020 Bug: 821393 Reviewed-on: https://chromium-review.googlesource.com/970085Reviewed-by:Daniel Nicoara <dnicoara@chromium.org> Commit-Queue: Miguel Casas <mcasas@chromium.org> Cr-Commit-Position: refs/heads/master@{#548858}
Showing
This diff is collapsed.
This diff is collapsed.
Please register or sign in to comment