aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-10-13Snap for 7821078 from 4c333dd763f7c1b9f619ab3f1b3c8a817b9a3917 to sc-v2-releaseandroid-vts-12.1_r9android-vts-12.1_r8android-vts-12.1_r7android-vts-12.1_r6android-vts-12.1_r5android-vts-12.1_r4android-vts-12.1_r3android-vts-12.1_r2android-vts-12.1_r10android-vts-12.1_r1android-platform-12.1.0_r9android-platform-12.1.0_r8android-platform-12.1.0_r7android-platform-12.1.0_r6android-platform-12.1.0_r5android-platform-12.1.0_r4android-platform-12.1.0_r3android-platform-12.1.0_r28android-platform-12.1.0_r27android-platform-12.1.0_r26android-platform-12.1.0_r25android-platform-12.1.0_r24android-platform-12.1.0_r23android-platform-12.1.0_r22android-platform-12.1.0_r21android-platform-12.1.0_r20android-platform-12.1.0_r2android-platform-12.1.0_r19android-platform-12.1.0_r18android-platform-12.1.0_r17android-platform-12.1.0_r16android-platform-12.1.0_r15android-platform-12.1.0_r14android-platform-12.1.0_r13android-platform-12.1.0_r12android-platform-12.1.0_r11android-platform-12.1.0_r10android-platform-12.1.0_r1android-cts-12.1_r9android-cts-12.1_r8android-cts-12.1_r7android-cts-12.1_r6android-cts-12.1_r5android-cts-12.1_r4android-cts-12.1_r3android-cts-12.1_r2android-cts-12.1_r10android-cts-12.1_r1android-12.1.0_r6android-12.1.0_r5android-12.1.0_r4android-12.1.0_r3android-12.1.0_r27android-12.1.0_r2android-12.1.0_r1android12L-tests-releaseandroid12L-s1-releaseandroid12L-releaseandroid12L-platform-releaseAndroid Build Coastguard Worker
Change-Id: I20f9bb1906a073b9d7cf680f0f9d160347beaed4
2021-10-12Merge remote-tracking branch 'goog/mirror-aosp-master' into mergeandroid-12.1.0_r9android-12.1.0_r8android-12.1.0_r7android-12.1.0_r22android-12.1.0_r21android-12.1.0_r20android-12.1.0_r19android-12.1.0_r11android-12.1.0_r10android12L-devandroid12-qpr3-s7-releaseandroid12-qpr3-s6-releaseandroid12-qpr3-s5-releaseandroid12-qpr3-s4-releaseandroid12-qpr3-s3-releaseandroid12-qpr3-s2-releaseandroid12-qpr3-s1-releaseandroid12-qpr3-releaseEnrico Granata
The trout virtual device was broken by the recent move to HWC 2.4 as it was not able to execute the new calls in HWC 2.4; bring in AOSP drm_hwc in order to support HWC 2.4 on trout Bug: 202850907 Test: build and boot trout Change-Id: I418234d51a8674ed348774a02f7b28ed6495e7ac
2021-09-03drm_hwcomposer: Merge remote-tracking branch 'aosp/upstream-main' into HEAD ↵android-s-v2-preview-2android-s-v2-preview-1android-s-v2-beta-2android-s-v2-preview-1John Stultz
am: 38163fdedc Original change: https://android-review.googlesource.com/c/platform/external/drm_hwcomposer/+/1809159 Change-Id: I97b4652389ac4dd30b56e7992431a1cf831e73c7
2021-08-25drm_hwcomposer: Merge remote-tracking branch 'aosp/upstream-main' into HEADandroid-s-beta-5android-s-beta-5John Stultz
Just updates the branch to match upstream. This merge contains a number of cleanups as well as some follow-on fixups. * aosp/upstream-main: drm_hwcomposer: Don't close same handle several times. drm_hwcomposer: Quiet noisy errors when planes don't support various attributes drm_hwcomposer: Fix sync_file fd leak from "Rework audofd" drm_hwcomposer: Add links to the HWC2 API description drm_hwcomposer: Rework autofd drm_hwcomposer: cleanup hwcutils drm_hwcomposer: Stop importing native_handle_t into the mapper drm_hwcomposer: Tracking of the DRM FB objects using RAII Signed-off-by: John Stultz <john.stultz@linaro.org> Change-Id: I9f733a6d9adb71b6c8b24d764e881904f66de146
2021-08-25drm_hwcomposer: Don't close same handle several times.Roman Stratiienko
Video (YUV) frames can have several planes in the same buffer, in this case all the planes will be represented by the same gem_handle, which must be closed only once. Fixes logcat noise during video playback. Reported-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
2021-08-24drm_hwcomposer: Quiet noisy errors when planes don't support various attributesJohn Stultz
If a plane doesn't support alpha or rotation, and IsValidForLayer() fails, we see lots of logcat noise to the effect of: 08-24 04:45:42.957 453 453 E hwc-platform: Failed to emplace layer 0, dropping it 08-24 04:45:42.957 453 453 E hwc-platform: Failed provision stage with ret -22 08-24 04:45:42.957 453 453 E hwc-drm-display-composition: Planner failed provisioning planes ret=-22 08-24 04:45:42.957 453 453 E hwc-drm-two: Failed to plan the composition ret=-22 This noise is unneccessarily worrisome, as they don't really help explain why things fail, and we still fall back to client composing and frames are correctly composited. Thus, this patch switches the errors to verbose-level warnings, which match the level in IsValidForLayer() which explain what actually is going wrong. Change-Id: I7ed06906b8d9e02e6ec0ac50a94346e9f9c05ac6 Signed-off-by: John Stultz <john.stultz@linaro.org>
2021-07-31drm_hwcomposer: Fix sync_file fd leak from "Rework audofd"John Stultz
In commit 0fade37afd60 ("drm_hwcomposer: Rework autofd"), a change to some very subtle existing code caused a resource leak such that after 10 minutes or so of active display output, we would start seeing: android.hardware.graphics.composer@2.3-service: failed to dup fence 10 over and over in logcat. Moving the mouse would cause black frame to flicker and eventually Surfaceflinger would crash and restart. The problem was subtle change in the following hunk: @@ -1047,10 +1049,9 @@ HWC2::Error DrmHwcTwo::HwcLayer::SetLayerBlendMode(int32_t mode) { HWC2::Error DrmHwcTwo::HwcLayer::SetLayerBuffer(buffer_handle_t buffer, int32_t acquire_fence) { supported(__func__); - UniqueFd uf(acquire_fence); set_buffer(buffer); - set_acquire_fence(uf.get()); + acquire_fence_ = UniqueFd(fcntl(acquire_fence, F_DUPFD_CLOEXEC)); return HWC2::Error::None; } The core of the problem being, that the UniqueFd class calls close(fd_) in its descructor. So while the change using fcntl(...,F_DUPFD_CLOEXEC) matches what was burried in set_acquire_fence(), dropping the creation (and more importantly the destruction when it goes out of scope) of uf changes the logic so we don't end up calling close on the aquire_fence fd argument passed in. One can confirm this resource leak by doing: adb shell lsof | grep composer And noticing the number of sync_file fds growing over time. Thus, this patch fixes the logic, so instead of dup()'ing the passed in fd, (and then closing it as done before Roman's patch), we can just set aquire_fence_ to a new UniqueFd directly using the aquire_fence fd passed in. This pattern actually occured twice, so I've fixed it in both places. Fixes: 0fade37afd60 ("drm_hwcomposer: Rework autofd") Signed-off-by: John Stultz <john.stultz@linaro.org> Change-Id: Iff2ca1c0b6701abbdc10c6ee92edb21a4b84a841
2021-07-24drm_hwcomposer: Add links to the HWC2 API descriptionRoman Stratiienko
Some part of the API is not streightforward and wrong implementation may cause leaks and other hard-to-debug runtime issues. Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
2021-07-24drm_hwcomposer: Rework autofdRoman Stratiienko
Motivation: Current implementation of UniqueFd can be used in a different ways, making analytical tracking of FD lifecycle much harder than it may be. Keep this part clean is very important, since any wrong code may open a hard-to-detect runtime bugs and fd leaks, which may accidentally slip into the production. Implementation: 1. Combine UniqueFd anf OutputFd into single class. 2. Reduce the API to be minimal and sufficient. 3. Document the API and use cases. 4. Move to utils/UniqueFd.h. 5. dup(fd) was replaced with fcntl(fd, F_DUPFD_CLOEXEC)) to address clang-tidy findings. Find more information at [1] [1]: https://clang.llvm.org/extra/clang-tidy/checks/android-cloexec-dup.html Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
2021-06-02Merge remote-tracking branch 'gitlab/main' into HEAD am: 84fa73c0d4 am: ↵John Stultz
82288efb3a Original change: https://android-review.googlesource.com/c/platform/external/drm_hwcomposer/+/1714669 Change-Id: If18723bda10941e12869cd0d586bfc7f6acaa69a
2021-06-02Merge remote-tracking branch 'gitlab/main' into HEAD am: 84fa73c0d4android-s-beta-4android-s-beta-3android-s-beta-4John Stultz
Original change: https://android-review.googlesource.com/c/platform/external/drm_hwcomposer/+/1714669 Change-Id: I2f79b8d88dd378050c41cd982153e290445c0fa1
2021-05-20Merge remote-tracking branch 'gitlab/main' into HEADJohn Stultz
This updates the AOSP/master branch to include the current upstream gitlab/main branch, which includes a fair amount of updates. Most are connected to the gitlab CI improvements, but there are also a fair amount of code cleanups and new functionality like composer@2.4 support. * gitlab/main: drm_hwcomposer: update README for clang-format-diff-11 and touch up formatting drm_hwcomposer: remove unused variable blend drm_hwcomposer: reject rotations reported as unsupported by hardware drm_hwcomposer: add DRM_PROPERTY_TYPE_BITMASK drm_hwcomposer: Fix regression after composition creation cleanup drm_hwcomposer: Move ValidatePlane method into DrmPlane drm_hwcomposer: Remove useless setters from DrmHwcLayer drm_hwcomposer: Add GetOrderLayersByZPos method drm_hwcomposer: Move HardwareSupportsLayerType into Backend drm_hwcomposer: Move MarkValidated into Backend drm_hwcomposer: Add GetExtraClientRange method drm_hwcomposer: Move CalcPixOps into Backend drm_hwcomposer: Remove ctrc from DrmCompositionPlane drm_hwcomposer: Remove SquashState class declaration drm_hwcomposer: Remove DrmCompositionDisplayLayersMap drm_hwcomposer: Remove DrmCompositionRegion struct drm_hwcomposer: Cleanup DrmDisplayComposition initialization drm_hwcomposer: CI: Increase coverage drm_hwcomposer: CI: Pull headers from the AOSPv11 drm_hwcomposer: Fix client range selection logic drm_hwcomposer: Remove writeback-based flattening logic drm_hwcomposer: add missing HAL pixel format drm_hwcomposer: CI: Add more source files to the build drm_hwcomposer: clang-tidy: enable cppcoreguidelines-* checks drm_hwcomposer: clang-tidy: enable clang-analyzer-* checks drm_hwcomposer: enable code analysis using clang-tidy drm_hwcomposer: CI: Use bpfmt to check Android.bp files style drm_hwcomposer: CI: Initial build and clang-tidy checks drm_hwcomposer: CI: Use clang-11 for the CI drm_hwcomposer: Create make target to test filegroups drm_hwcomposer: Fix drmSetMaster() usage drm_hwcomposer: Initial composer@2.4 HAL support drm_hwcomposer: Add support for color encoding and range properties drm_hwcomposer: Add minigbm video and format_modifier support drm_hwcomposer: Support unique fd for every YUV plane drm_hwcomposer: Ensure composer has master access to DRM/KMS drm_hwcomposer: Reorganize modifiers handling logic drm_hwcomposer: libdrmgetter: fix RGB565 format translation Change-Id: I3a9801bd858bc869844ac5d2d81383767029b09e Signed-off-by: John Stultz <john.stultz@linaro.org>
2021-05-19drm_hwcomposer: cleanup hwcutilsRoman Stratiienko
Remove DrmHwcBuffer class. Wrap remaining logic into DrmHwcLayer class. Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
2021-05-19drm_hwcomposer: Stop importing native_handle_t into the mapperRoman Stratiienko
Composer service is already importing buffers from binder pipe into the mapper and caches them making native handles valid for a whole composition processing cycle. Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
2021-05-19drm_hwcomposer: Tracking of the DRM FB objects using RAIIRoman Stratiienko
DRM framebuffer objects must be kept registered in DRM/KMS while used for scanning-out (After atomic commit applied for processing by display controller and until next atomic commit is applied for processing). Existing logic for tracking current state is overcomplicated and needs to be redesigned. Also further developing of drm_hwc will require migration to asynchronous atomic commit, so additional asynchronous FB cleanup logic must be created. Buffer caching logic will also benefit from this. With the RAII all further changes will be less painful and more robust. By this commit I also renamed DrmGenericImporter to DrmFbImporter: 'Fb' word is present in most of existing composers (android and linux) so it will be easier to compare different implementations. Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
2021-05-09drm_hwcomposer: update README for clang-format-diff-11 and touch up formattingBenjamin Li
The README.md is out of date -- clang-format-diff-5.0 is not what runs on CI anymore. To help contributors better test their changes locally before submitting a merge request, update to the actual linting command being run in CI. Signed-off-by: Benjamin Li <benl@squareup.com>
2021-05-09drm_hwcomposer: remove unused variable blendBenjamin Li
The first tuple element returned by GetEnumValueWithName is just the index of that enum, which is not useful. Signed-off-by: Benjamin Li <benl@squareup.com>
2021-05-09drm_hwcomposer: reject rotations reported as unsupported by hardwareBenjamin Li
Currently we only check for the presence of any rotation support -- but hardware may choose to, say, only support 180 degree rotation. Respect the specific rotation capabilities reported through DRM properties. Signed-off-by: Benjamin Li <benl@squareup.com>
2021-05-07drm_hwcomposer: add DRM_PROPERTY_TYPE_BITMASKBenjamin Li
Bitmask properties are integers that additionally have strings associated with each bit. For example, the "rotation" property's bits are described as "rotate-90", "reflect-x", and so on. The bitmask integer is not actually passed to us -- instead, the interface for enums is used, except that more than one value can be set. This means we must query using the associated strings, rather than use bit index mappings provided as constants in the public kernel header drm_mode.h. Signed-off-by: Benjamin Li <benl@squareup.com>
2021-04-27drm_hwcomposer: Fix regression after composition creation cleanupMatvii Zorin
During rebasing of the local integration branch, one code chunk was not updated accidentally and the client range was not selected properly which leads to jank frames appearance. The issue has been already fixed by the commit 3f89182bb9df ("drm_hwcomposer: Fix client range selection logic"). Issue: https://gitlab.freedesktop.org/drm-hwcomposer/drm-hwcomposer/-/issues/53 Fixes: b3b15166f9da ("drm_hwcomposer: Add GetExtraClientRange method") Suggested-by: Roman Stratiienko <r.stratiienko@gmail.com> Signed-off-by: Matvii Zorin <matvii.zorin@globallogic.com>
2021-04-06drm_hwcomposer: Move ValidatePlane method into DrmPlaneMatvii Zorin
It is more common to validate the layer for the proper object. Signed-off-by: Matvii Zorin <matvii.zorin@globallogic.com>
2021-04-06drm_hwcomposer: Remove useless setters from DrmHwcLayerRoman Kovalivskyi
SetDisplayFrame and SetSourceCrop methods are unnecessary in the DrmHwcLayer structure without any private members. Signed-off-by: Roman Kovalivskyi <roman.kovalivskyi@globallogic.com> Signed-off-by: Matvii Zorin <matvii.zorin@globallogic.com>
2021-04-06drm_hwcomposer: Add GetOrderLayersByZPos methodMatvii Zorin
The GetOrderLayersByZPos copies an ordered list of layer pointers. Signed-off-by: Matvii Zorin <matvii.zorin@globallogic.com>
2021-04-06drm_hwcomposer: Move HardwareSupportsLayerType into BackendMatvii Zorin
The HardwareSupportsLayerType function is used only for display validation which is implemented in the generic backend. Signed-off-by: Matvii Zorin <matvii.zorin@globallogic.com>
2021-04-06drm_hwcomposer: Move MarkValidated into BackendMatvii Zorin
The MarkValidated function is used only for display validation which is implemented in the generic backend. Signed-off-by: Matvii Zorin <matvii.zorin@globallogic.com>
2021-04-06drm_hwcomposer: Add GetExtraClientRange methodMatvii Zorin
Separate the correction of client range into the separate method. Signed-off-by: Matvii Zorin <matvii.zorin@globallogic.com>
2021-04-06drm_hwcomposer: Move CalcPixOps into BackendMatvii Zorin
The CalcPixOps is used only for display validation which is implemented in the generic backend. Signed-off-by: Matvii Zorin <matvii.zorin@globallogic.com>
2021-04-06drm_hwcomposer: Remove ctrc from DrmCompositionPlaneMatvii Zorin
CRTC is set at CreateComposition function and it matches the current display. Signed-off-by: Matvii Zorin <matvii.zorin@globallogic.com>
2021-04-06drm_hwcomposer: Remove SquashState class declarationMatvii Zorin
There is no use of SquashState class, so the declaration could be removed in the scope of cleanup. Signed-off-by: Matvii Zorin <matvii.zorin@globallogic.com>
2021-04-06drm_hwcomposer: Remove DrmCompositionDisplayLayersMapMatvii Zorin
The structure is used only at the CreateComposition function. Data consolidation is unnecessary in this case. Signed-off-by: Matvii Zorin <matvii.zorin@globallogic.com>
2021-04-06drm_hwcomposer: Remove DrmCompositionRegion structMatvii Zorin
The structure is currently unused. Signed-off-by: Matvii Zorin <matvii.zorin@globallogic.com>
2021-04-06drm_hwcomposer: Cleanup DrmDisplayComposition initializationMatvii Zorin
Remove unused members (drm, importer, frame_no). Move initialization from the proper function to the constructor. Signed-off-by: Matvii Zorin <matvii.zorin@globallogic.com>
2021-04-06drm_hwcomposer: CI: Increase coverageRoman Stratiienko
Add the following files to the build: backend/BackendClient.cpp backend/Backend.cpp backend/BackendManager.cpp backend/BackendRCarDu.cpp bufferinfo/legacy/BufferInfoImagination.cpp bufferinfo/legacy/BufferInfoLibdrm.cpp bufferinfo/legacy/BufferInfoMaliHisi.cpp bufferinfo/legacy/BufferInfoMaliMediatek.cpp bufferinfo/legacy/BufferInfoMaliMeson.cpp bufferinfo/legacy/BufferInfoMinigbm.cpp compositor/DrmDisplayComposition.cpp compositor/DrmDisplayCompositor.cpp compositor/Planner.cpp drm/DrmGenericImporter.cpp DrmHwcTwo.cpp drm/ResourceManager.cpp drm/VSyncWorker.cpp tests/worker_test.cpp utils/autolock.cpp Files 'bufferinfo/BufferInfoMapperMetadata.cpp' and 'utils/hwcutils.cpp' require a lot of additional headers, therefore move them out of the scope of this commit. 'utils/gralloc.h' isn't planned to use in pure-linux builds, therefore remove it from 'utils' and put it into '.ci/android_headers/hardware/' Fix minor tidy fails. Fix linux build fails (missing includes) due to differences between libc and bionic. Comment-out some sections in 'tests/test_include' which aren't used by drm_hwc but causing build failures for CI due to missing dependencies. Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com> Reviewed-by: Matvii Zorin <matvii.zorin@globallogic.com>
2021-04-06drm_hwcomposer: CI: Pull headers from the AOSPv11Roman Stratiienko
The goal is to check compilation and clang-tidy at CI stage. For both compile and tidy all dependent headers are required. Compilation and tidy-check enabled by the next commit. Done by invoking the following bash commands: cp system/core/libcutils/include/cutils/native_handle.h \ system/core/libcutils/include/cutils/compiler.h \ system/core/libcutils/include/cutils/trace.h \ external/drm_hwcomposer/.ci/android_headers/cutils/ cp external/libdrm/android/gralloc_handle.h \ external/drm_hwcomposer/.ci/android_headers/gralloc_handle.h cp hardware/libhardware/include/hardware/gralloc.h \ hardware/libhardware/include/hardware/hardware.h \ hardware/libhardware/include/hardware/hwcomposer.h \ hardware/libhardware/include/hardware/hwcomposer2.h \ hardware/libhardware/include/hardware/hwcomposer_defs.h \ external/drm_hwcomposer/.ci/android_headers/hardware/ cp system/core/libsync/include/sync/sync.h \ external/drm_hwcomposer/.ci/android_headers/sync/sync.h cp system/core/libsync/include/ndk/sync.h \ external/drm_hwcomposer/.ci/android_headers/ndk/sync.h cp system/core/libsystem/include/system/graphics-base-v1.0.h \ system/core/libsystem/include/system/graphics-base-v1.1.h \ system/core/libsystem/include/system/graphics-base-v1.2.h \ system/core/libsystem/include/system/graphics-base.h \ system/core/libsystem/include/system/graphics-sw.h \ system/core/libsystem/include/system/graphics.h \ external/drm_hwcomposer/.ci/android_headers/system/ cp frameworks/native/libs/ui/include/ui/GraphicBuffer.h \ external/drm_hwcomposer/.ci/android_headers/ui/GraphicBuffer.h cp system/core/libutils/include/utils/Trace.h \ external/drm_hwcomposer/.ci/android_headers/utils/Trace.h Turn off clang-format check for these files. Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com> Reviewed-by: Matvii Zorin <matvii.zorin@globallogic.com>
2021-04-02drm_hwcomposer: Fix client range selection logicRoman Stratiienko
Original change aimed to fix clang-tidy checks, but accidentally it caused wrong client range selection. Closes: https://gitlab.freedesktop.org/drm-hwcomposer/drm-hwcomposer/-/issues/53 Fixes: e2f2c929243f ("drm_hwcomposer: enable code analysis using clang-tidy") Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
2021-03-19drm_hwcomposer: Remove writeback-based flattening logicRoman Stratiienko
Writeback Pros: a. Very tiny reduction in power consumption required for rendering the composition compared to CLIENT-based flattening. Writeback Cons: a. A lot of extra code. High maintenance cost(effort). Nobody tests it as for now. b. Writeback isn't implemented by the set of KMS drivers c. Require separate memory buffer to be allocated Part of: https://gitlab.freedesktop.org/drm-hwcomposer/drm-hwcomposer/-/issues/47 Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
2021-03-16drm_hwcomposer: add missing HAL pixel formatRiadh Ghaddab
using Android-11 (android-11.0.0_r27 )on i500 MediaTek SoC we can see some log floods with the following trace: E hwc-platform-drm-generic: Cannot convert hal format to drm format 43 Adding the conversion of this format : HAL_PIXEL_FORMAT_RGBA_1010102 resolves the log flood Signed-off-by: Riadh Ghaddab <rghaddab@baylibre.com>
2021-03-03drm_hwcomposer: CI: Add more source files to the buildRoman Stratiienko
Build bufferinfo/BufferInfoGetter.cpp and drm/DrmPlane.cpp Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
2021-03-03drm_hwcomposer: clang-tidy: enable cppcoreguidelines-* checksRoman Stratiienko
Our code isn't ready for the following checks therefore keep disabled -cppcoreguidelines-pro-bounds-array-to-pointer-decay -cppcoreguidelines-pro-bounds-constant-array-index -cppcoreguidelines-pro-bounds-pointer-arithmetic -cppcoreguidelines-pro-type-cstyle-cast -cppcoreguidelines-pro-type-vararg -cppcoreguidelines-avoid-magic-numbers -cppcoreguidelines-macro-usage -cppcoreguidelines-avoid-c-arrays + fixed existing tidy warnings for these checks. Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
2021-03-03drm_hwcomposer: clang-tidy: enable clang-analyzer-* checksRoman Stratiienko
+ fixed existing tidy warnings for these checks. Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
2021-03-03drm_hwcomposer: enable code analysis using clang-tidyRoman Stratiienko
Drm hwcomposer project has some code-style inconsistencies. This is the initial step to unify code-style of the code. Clang-tidy is a great tool which can not only suggest correct styling, but also allow predicting the errors in the code and suggest correct coding approaches to avoid potential weaknesses. CI was tuned to check clang-tidy recommendation for some part of the code which is ready ATM (can be built outside AOSP tree). For this part a limited set of clang-tidy checks has applied (coarse check). Header files aren't checked at all. Starting from now new code files must be included into the list that is checked by almost all clang-tidy checks (fine checklist). New header files should be also included into this list. See '.gitlab-ci-clang-tidy-fine.sh'. Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
2021-03-03drm_hwcomposer: CI: Use bpfmt to check Android.bp files styleRoman Stratiienko
Fix available errors by executing: $ find -name "*.bp" -exec bpfmt -d -s -w {} \; Suggested-by: Marijn Suijten <marijn.suijten@somainline.org> Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
2021-03-03drm_hwcomposer: CI: Initial build and clang-tidy checksRoman Stratiienko
Build android-agnostic code in linux environment. Enable static code analysis using clang-tidy. Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
2021-03-03drm_hwcomposer: CI: Use clang-11 for the CIRoman Stratiienko
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
2021-03-01drm_hwcomposer: Create make target to test filegroupsRoman Stratiienko
Android.bp contains filegroups that are not built by default (e.g. using $ mmma external/drm_hwcomposer) Fix it. To ensure build will work on wide range of Android versions, pull depended headers from AOSP-11 tree: 1. Mali: "device/linaro/hikey/gralloc960" 2. Imagination: "hardware/ti/am57x/libhwcomposer" and put it into ./tests/test_include directory. Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
2021-02-21Snap for 7160059 from 42b90536d6d39b96b0417e19214dcdb727b80368 to sc-v2-releaseandroid-build-team Robot
Change-Id: I6ba37e70fabcb29a7bec07d0048c7ab68c6e8769
2021-02-20[automerger skipped] Mark ab/7061308 as merged in stage. am: aaaaca8aaa -s ↵android-mainline-12.0.0_r4android-mainline-12.0.0_r36android-12.0.0_r32android-12.0.0_r29android-12.0.0_r28android-12.0.0_r27android-12.0.0_r26android-12.0.0_r21android-12.0.0_r20android-12.0.0_r19android-12.0.0_r18android-12.0.0_r16android12-qpr1-releaseandroid12-qpr1-d-s3-releaseandroid12-qpr1-d-s2-releaseandroid12-qpr1-d-s1-releaseandroid12-qpr1-d-releaseandroid12-devandroid12--mainline-releaseXin Li
ours am: 1b4a72f29e -s ours am skip reason: Change-Id Ia13ce2304a0527f626ceeb9fee3331b0b3178661 with SHA-1 d92b471251 is in history Original change: undetermined MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I454fb72e5d01ee217c012f7ba803f89c88fd299b
2021-02-20[automerger skipped] Mark ab/7061308 as merged in stage. am: aaaaca8aaa -s oursXin Li
am skip reason: Change-Id Ia13ce2304a0527f626ceeb9fee3331b0b3178661 with SHA-1 d92b471251 is in history Original change: undetermined MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I534bef112deb4e48b33a8c22fdc25ddebf0dd92e
2021-02-20Mark ab/7061308 as merged in stage.android-s-beta-2android-s-beta-1Xin Li
Bug: 180401296 Merged-In: Ia13ce2304a0527f626ceeb9fee3331b0b3178661 Change-Id: Id847c813c51f4d578dea4e497303a4520c0309e3
2021-02-17Snap for 7149879 from b6a7c285a660ae4966e4c41ccbaab61919ec2d4a to sc-v2-releaseandroid-build-team Robot
Change-Id: I2ebd5bfdc418d28dc5c6f767c5eb4aad6cea81c2