summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2016-09-14 22:14:22 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2016-09-15 12:49:07 +0100
commit53b52f4bc8fc544346053fd6986e4b3851fd96d4 (patch)
treef55f5f144645d3ae4452e44cff1c479b209d91a7 /lib
parent237cb8913c9741719ca902fd281a0bcf4fa2069f (diff)
lib/kms: Probe connectors from igt_enable_connectors()
This fixes a failure when running kms_flip after booting on a bare system as nothing will have probed the connectors before hand. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'lib')
-rw-r--r--lib/igt_kms.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 7d533603..960ecbd8 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -2708,16 +2708,18 @@ void igt_wait_for_vblank(int drm_fd, enum pipe pipe)
void igt_enable_connectors(void)
{
drmModeRes *res;
- drmModeConnector *c;
int drm_fd;
drm_fd = drm_open_driver(DRIVER_ANY);
res = drmModeGetResources(drm_fd);
+ igt_assert(res != NULL);
for (int i = 0; i < res->count_connectors; i++) {
+ drmModeConnector *c;
- c = drmModeGetConnectorCurrent(drm_fd, res->connectors[i]);
+ /* Do a probe. This may be the first action after booting */
+ c = drmModeGetConnector(drm_fd, res->connectors[i]);
/* don't attempt to force connectors that are already connected
*/
@@ -2734,6 +2736,7 @@ void igt_enable_connectors(void)
drmModeFreeConnector(c);
}
+
close(drm_fd);
}