commit | 6230703e2a00b79e551460b958d2496934726e9e | [log] [tgz] |
---|---|---|
author | John Stultz <john.stultz@linaro.org> | Wed Feb 27 21:35:03 2019 -0800 |
committer | John Stultz <john.stultz@linaro.org> | Thu Feb 28 09:22:05 2019 -0800 |
tree | 5b134952e60530dc632d74493577d15eafb1abfb | |
parent | 65c988de054ffa494ffcfebc71c41044ed7a2a25 [diff] |
drm_hwcomposer: Initialize buffer_ pointer to NULL In some cases, we've seen drm_hwcomposer start to try to compose frames before anything has called SetClientTarget(). This seems to be some sort of a race, which for some reason we only see with certain dummy HDMI dongles (which provide fake EDID data) which allow our lab machines to run headless. I'm still trying to understand more about why this happens only in this case. The net of the issue is we see CreateComposition() being called, which adds the client_layer_ to the zmap. Then it creates the DrmHwcLayers copying the non-initialized buffer_ value as the sf_handle. This then later causes a crash in ImportBuffer() when we traverse the non-null (but invalid) hnd value. Thus, this patch simply initilizes the buffer_ pointer to NULL so that we error out properly in the case of the race. Reported-by: YongQin Liu <yongqin.liu@linaro.org> Signed-off-by: John Stultz <john.stultz@linaro.org> Change-Id: I5fde3fccde86519edb04e61cbc2842eda395ade4
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!