libplatsch: handle possible clones #9
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.
At the moment we miss the support to drive multiple connectors which are connected to the same CRTC, also called a hardware clone mode.
libplatsch is not using the DRM atomic API due to it limited scope therefore using properties values isn't sufficient. Instead all possible connector ids need to be passed during the drmModeSetCrtc().
To find all connectors which belong to the same CRTC, the encoder behind each connector must be validated by making use of the encoders '.possible_clones' array.
If a connector shall be added which belongs to an already used CRTC, a check is performed to see if this connector can be driven by the CRTC. In that case the connector id is added to the 'struct modeset_dev::conn_id' array and -EEXIST is returned.
Because of this error, no new 'struct modeset_dev' is added and certain error() messages aren't printed because this can be a valid use-case.