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

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.

TEST=Tested on spring, xrandr properly updates property values

Change-Id: Idf498f4a23e6d006962ead18eb2a1d716772b99b
Signed-off-by: Sean Paul <>
Reviewed-by: Timothy Drews <>
Tested-by: Timothy Drews <>
Reviewed-by: St├ęphane Marchesin <>
1 file changed