commit | fa0023394b883cf77dc26365041e9f3d95a21157 | [log] [tgz] |
---|---|---|
author | John Stultz <john.stultz@linaro.org> | Tue Feb 02 01:34:45 2021 +0000 |
committer | John Stultz <john.stultz@linaro.org> | Thu Feb 11 20:52:13 2021 +0000 |
tree | 2ac7db9a591270cb90b7982a6b9102f0ea8b8dd3 | |
parent | 6f5df1717d110eac642b9157ec092b4f276a83d3 [diff] |
drm_hwcomposer: Fix drmSetMaster() usage After commit 3b24cd911ebf ("drm_hwcomposer: Ensure composer has master access to DRM/KMS") was merged I started seeing failures on 5.4 based kernels. Diggin into it, it seemed on those kernels drmSetMaster() was always returning -EACCES, due to the following upstream kernel change not being present: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=45bc3d26c95a8fc63a7d8668ca9e57ef0883351c That change landed around 5.6, so for older kernels we need to make sure older kernels without this patch still work. So this patch, as suggested by Roman Stratiienko, reworks the logic so we call drmSetMaster() and then check drmIsMaster(), rather then failing due to the return value. With this patch, things are back to working on both hikey960 and db845c with 5.4 based kernels. Signed-off-by: John Stultz <john.stultz@linaro.org> Change-Id: I7f2adba3ddbd36169b6d26baf49299046efcf906
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-5.0 -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!