Don't call CreateDisplayPipe until the display is actually needed
[seanpaul] Changed title from "DrmResources::CreateDisplayPipe throws meaningless error for DRM_MODE_DISCONNECTED"
Hi, the issue has been communicated but not tracked in gitlab nor resolved. Here it is as a kind reminder, because amdgpu, nouveau and all discrete gpus are affected.
... 2245 2245 E hwc-drm-resources: Could not find a suitable encoder/crtc for display 2 ... 2245 2245 E hwc-drm-resources: Failed CreateDisplayPipe 56 with -19 ... 2245 2245 E hwcomposer-drm: Can't initialize Drm object -19
Updated proposed commit to solve this problem is  as it is assessed that either the drm_hwcomposer code is flawed to return error for DRM_MODE_DISCONNECTED, or, in any case, it is necessary to identify E2E root cause of the problem.