commit | 907a51ab1b0f26b691ae3c6050bfdc904b9ee11a | [log] [tgz] |
---|---|---|
author | Gil Dekel <gildekel@google.com> | Fri Feb 14 22:44:01 2025 -0500 |
committer | Gil Dekel <gildekel@google.com> | Sat Feb 15 23:23:52 2025 -0500 |
tree | 77ed7b5e61777709f1dda0b6d352e1a51d911e49 | |
parent | c88294c89db5bdc96f2e465b9f5325667861d11d [diff] |
drm_hwcomposer: Produce stable port IDs Currently, port IDs are generated by returning a monotonically increasing value (uint64_t hwc2_display_t). This is problematic for two reasons: hwc2_display_t is a 64bit value, and the returned port is 8bit. clients of drm-hwc cannot rely on port ID consistency between re-plugs to the same connector. This patch provides a more stable approach to producing port IDs. We combine the index of the DRM device in the device list, with the index of the connector within a DRM device in a 3/5 bit split. This will allow us to support up to 8 DRM devices, each with 32 independent connectors (ports). If more support is required in the future, we will have to extend the API to return uint16_t port values instead. Signed-off-by: Gil Dekel <gildekel@google.com>
Patches to drm_hwcomposer are very much welcome, we really want this to be the universal HW composer implementation for Android and similar platforms. So please bring on porting patches, bugfixes, improvements for documentation and new features.
A short list of contribution guidelines:
Submit changes via gitlab merge requests on gitlab.freedesktop.org.
drm_hwcomposer is Apache 2.0 Licensed and we require contributions to follow the developer's certificate of origin: http://developercertificate.org/.
When submitting new code please follow the naming conventions documented in the generated documentation. Also please make full use of all the helpers and convenience macros provided by drm_hwcomposer. The below command can help you with formatting of your patches:
git diff | clang-format-diff-19 -p 1 -style=file
Hardware specific changes should be tested on relevant platforms before committing.
If you need inspiration, please checkout our TODO issues.
Happy hacking!