commit | b67d049c870c2b82c2883b0c10a07bc29c4cd598 | [log] [tgz] |
---|---|---|
author | Neil Armstrong <narmstrong@baylibre.com> | Thu Jun 20 09:00:21 2019 +0000 |
committer | Neil Armstrong <narmstrong@baylibre.com> | Fri Jun 21 07:17:06 2019 +0000 |
tree | 1cb0077617acc634bfc9866833227247c4e30178 | |
parent | 27cd4805010184f0e9faf712dd0980e8700c26b9 [diff] |
drm_hwcomposer: pre-filter modes provided to HWC2 Currently LocalDisplayAdapter in AOSP filters out similar modes based on their currently limited supported attributes: width/height/refresh. This leads to a situation where important modes are discarded, like the preferred mode and/or the active mode, leading SurfaceFlinger to select an unwanted and potentially invalid mode in the list provided by drm-hwcomposer to HWC2. Let's pre-filter the modes provided to HWC2 by : - systematically adding the preferred mode - systematically adding the current active mode, if different from preferred mode - keeping the interlaced modes filtering-out if no other non-interlace modes with same widthXheight exists (for HD-Ready 1080i TVs or CVBS) - discarding modes if a similar mode with same widthXheight@refresh was already selected for HWC2 This mimics the behavior of LocalDisplayAdapter filtering algorithm, but keeps the important modes from the DRM Point Of View and drops the duplicate modes while keeping the mode ordering from DRM in account. This local filtering should ultimately go out when HWC2 can actually handle mode Attributes to describe Preferred mode, Interlaced, 3D... and LocalDisplayAdapter uses these Attributes for filtering duplicate modes. Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Tested-by: John Stultz <john.stultz@linaro.org>
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!