This iterates over all DRM devices under /dev/dri (card* and renderD*) and returns the first device that works Change-Id: I4a4aea565122abf81786b0ccc69539631f10b5f8 Tuleap: #1082 (cherry picked from commit d6a90bf9)