forked from enlightenment/efl
ecore_drm2: Fix a condition where no outputs are enabled
If the first output we test is disconnected but has the crtc of the primary display assigned then we'll fail to assign the crtc to the connector it's really connected to later. This is a quick hack as trying to sort this out properly may be too invasive for the upcoming 1.18 and isn't really important until 1.19 supports multihead anyway.
This commit is contained in:
parent
a43fda4ddc
commit
871a9cff03
|
@ -234,6 +234,15 @@ _output_crtc_find(const drmModeRes *res, const drmModeConnector *conn, Ecore_Drm
|
|||
uint32_t crtc;
|
||||
int i = 0, j = 0;
|
||||
|
||||
/* Skip all disconnected connectors...
|
||||
*
|
||||
* When a connector is disconnected it still has an encoder id
|
||||
* which messes up our output selection code later. When we support
|
||||
* multi-head properly and hotplug becomes a real thing we'll
|
||||
* need to revisit this hack (and the crtc assignment code as well)
|
||||
*/
|
||||
if (conn->connection != DRM_MODE_CONNECTED) return -1;
|
||||
|
||||
for (j = 0; j < conn->count_encoders; j++)
|
||||
{
|
||||
enc = drmModeGetEncoder(dev->fd, conn->encoders[j]);
|
||||
|
|
Loading…
Reference in New Issue