Don't try to create leases from any DRM device that doesn't have
at least one connector, CRTC, and encoder. This allows any such
devices to be skipped when looking for a viable device when one
is not provided on the command line.
Bug-AGL: SPEC-4573
Signed-off-by: Damian Hobson-Garcia <dhobsong@igel.co.jp>
Change-Id: Ia8cf27127e4d61c13c6d8dfc633282776da74060
goto err;
}
+ if (lm->drm_resource->count_connectors <= 0 ||
+ lm->drm_resource->count_crtcs <= 0 ||
+ lm->drm_resource->count_encoders <= 0) {
+ DEBUG_LOG("Insufficient DRM resources on device(%s)\n", device);
+ goto err;
+ }
+
lm->drm_plane_resource = drmModeGetPlaneResources(lm->drm_fd);
if (!lm->drm_plane_resource) {
DEBUG_LOG("drmModeGetPlaneResources failed: %s\n",