Conversation
init_drm() located the CRTC for the chosen connector by looking for an
encoder whose crtc_id already pointed at a CRTC, i.e. it required that a
modeset had already been performed by some other DRM client or fbdev. On a
freshly booted device where nothing has driven the pipeline yet, every
encoder reports crtc_id == 0, so the search failed with
no crtc for encoder found!
and cog aborted ("Failed to initialize DRM"). cog could only start once
an unrelated client (e.g. a display manager) had performed the first
modeset and populated encoder->crtc_id.
Prefer the CRTC bound to the connector's currently active encoder, when
there is one (avoids re-routing a CRTC another client drives). Otherwise
pick the first CRTC allowed by the possible_crtcs bitmask of any of the
connector's encoders (which should work even before the first modeset).
While at that, iterate the connector's own encoder list instead of every
encoder in the device.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
init_drm() located the CRTC for the chosen connector by looking for an encoder whose crtc_id already pointed at a CRTC, i.e. it required that a modeset had already been performed by some other DRM client or fbdev. On a freshly booted device where nothing has driven the pipeline yet, every encoder reports crtc_id == 0, so the search failed with
and cog aborted ("Failed to initialize DRM"). cog could only start once an unrelated client (e.g. a display manager) had performed the first modeset and populated encoder->crtc_id.
Prefer the CRTC bound to the connector's currently active encoder, when there is one (avoids re-routing a CRTC another client drives). Otherwise pick the first CRTC allowed by the possible_crtcs bitmask of any of the connector's encoders (which should work even before the first modeset).
While at that, iterate the connector's own encoder list instead of every encoder in the device.