Don't fetch connector modes in .get_property()

This change replaces the drmModeGetConnector() call in the
get_property hook with a slightly modified version that will
not invoke get_modes() in the kernel. This is desirable since
get_modes() can take seconds to complete and is unnecessary in
get_property().

We accomplish this by requesting 1 mode from kernel space in
the GETCONNECTOR ioctl. In the case where the connector has
one or more modes, we'll receive the first mode back. In the
case where the connector doesn't have any modes, we just won't
get any back.

BUG=chromium:374465
TEST=Tested on spring, xrandr properly updates property values

Change-Id: Idf498f4a23e6d006962ead18eb2a1d716772b99b
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/214210
Reviewed-by: Timothy Drews <tdrews@google.com>
Tested-by: Timothy Drews <tdrews@google.com>
Reviewed-by: St├ęphane Marchesin <marcheu@chromium.org>
1 file changed