Modetest preferred
This series adds -r (preferred) option to modetest.
Using it is provides a quick and easy check for all the connected devices - by setting their preferred resolution and displaying the SMPTE pattern.
Instead of copying various parts, yet again for this feature, the series starts with a some cleanup and de-duplication.
Originally by @ezequielgarcia but has gone through major rework since then. @shadeslayer who reviewed the original patch.
Edited by Dmitry Baryshkov