[PATCH xserver 11/11] modesetting: Get current connector infos in drmmode_output_init()

Daniel Martin consume.noise at gmail.com
Tue Nov 7 09:38:42 UTC 2017


No need for modes and connector status probing here.

Signed-off-by: Daniel Martin <consume.noise at gmail.com>
---
 hw/xfree86/drivers/modesetting/drmmode_display.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c
index 320ccc118..63ec7112e 100644
--- a/hw/xfree86/drivers/modesetting/drmmode_display.c
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
@@ -1696,8 +1696,11 @@ drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, drmModeResPtr mode_r
     int i;
     drmModePropertyBlobPtr path_blob = NULL;
     const char *s;
-    koutput =
-        drmModeGetConnector(drmmode->fd, mode_res->connectors[num]);
+
+    /* We need encoders and properties, no mode list and no probing of the
+     * connector status. drmModeGetConnectorCurrent() is sufficient. */
+    koutput = drmModeGetConnectorCurrent(drmmode->fd,
+            mode_res->connectors[num]);
     if (!koutput)
         return 0;
 
-- 
2.13.6



More information about the xorg-devel mailing list