Why:
The aospless file from Android-15 contains compiler flags that
clang-15 does not understand.
Additionally, new tidy findings were suppressed.
It would be nice to fix them in the future instead.
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
Remove misc-const-correctness from clang-tidy. This check detects local
variables which could be declared as const. See
https://clang.llvm.org/extra/clang-tidy/checks/misc/const-correctness.html
Change-Id: Ibbce8d8c6fa4cb1631776b5dde5c33ca73b6510d
Signed-off-by: Drew Davenport <ddavenport@google.com>
TODOs in the project are of the form TODO(nobody). It seems pointless to
enforce Google TODO format if the TODOs are not actually assigned to a
person or issue
Change-Id: Ie6c7299ea463aaac98442843cb02485a3bcc49cd
Signed-off-by: Drew Davenport <ddavenport@google.com>
The freedesktop instance provides a docker container registry with
ubuntu 23.04 based images ready to be used for building drm_hwcomposer.
Migrate to using that container image in order to:
- Avoid apt-get installing all dependencies for each job
- Remove duplication between the Dockerfile and the .gitlab-ci.yml
Since the container image provides aospless, we no longer need to download it
for each pipeline stage.
Also, this updates the folder structure:
Before:
/builds/drm-hwcomposer/drm-hwcomposer/
/builds/drm-hwcomposer/aospless
After:
/builds/drm-hwcomposer/drm-hwcomposer/
/home/user/aospless
For "tidy", this new structure requires to override the BASE_DIR variable.
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Since we're now using aospless archive for meson.build, we can use
headers from there and remove .ci/android_headers/ directory completely.
Adding aospless cflags also raised some new tidy checks fails,
which were fixed by this commit.
Since clang-tidy now relies on aospless files, running CI on the host
can't be supported and removed. Running CI within the docker container
is the only option left.
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
We use too much dup() system calls for present fence propagating.
Also when propagating acquire fence we use additional logic for
skipping such propagation for the validate/test cycle.
Both issues can be solved by introducing SharedFd, which will track
reference count of fd object.
After that the UniqueFd is used very rarely and can be simplified by
wrapping it into std::unique_ptr without caring too much of adding
an extra malloc/free operation.
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
utils/worker is no longer used and can be removed.
Change-Id: I5fc9bd2b3b8b0375622ee2446044d3b893756b30
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
utils/worker just complicates the logic without providing any benefit.
Change-Id: I7b3c91aee9c0507d9ca35792d24ba6c8c3870033
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
__ANDROID_API__ definition is available by default in AOSP and NDK.
It also exported by standard system clang when the user sets
the '-target <ARCH>-linux-android<LEVEL>' compiler flag.
Reason for this change is integration of meson build script, where
otherwise the user has to provide the API level manually.
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
Address new clang-tidy findings, in most cases 'misc-const-correctness'
check was addressed by adding 'const' modifier, or in some cases changed
to 'auto' (where it's better for formatting).
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
Additionally:
1. Fix new clang-tidy findings
2. Disable readability-identifier-length check for all tidy levels
Signed-off-by: Roman Stratiienko <roman.o.stratiienko@globallogic.com>
Dumping uevents is useful for debugging purposes.
1. Extract logic related to uevent socket into utils/UEvent.h class.
2. Use it by both UEventListener.cpp and tests/uevent_print.cpp.
Bump clang-tidy level of UEventListener.cpp to normal.
Signed-off-by: Roman Stratiienko <roman.o.stratiienko@globallogic.com>
Primary responsibilities of this class are:
1. Send composition/mode/active state over DRM atomic commit IOCTL
to the kernel
2. Track commit state and keep planes owned by the Pipeline while they
are either displayed or staged for displaying.
3. Keep framebuffers alive while they are in use or staged.
Not much related to composition itself, therefore rename it to
DrmAtomicStateManager and move it to drm folder.
Bump clang-tidy level of DrmAtomicStateManager.c to normal by fixing
minor clang-tidy findings.
Signed-off-by: Roman Stratiienko <roman.o.stratiienko@globallogic.com>
1. Move drm/DrmConnector.h to Normal clang-tidy checks list by fixing
clang-tidy findings.
2. Remove DrmDevice self-reference.
3. Replace shared_ptr reference to DrmDevice in DrmFbImporter with a
pointer, making ResourceManager only owner of DrmDevice and its
chilren.
Signed-off-by: Roman Stratiienko <roman.o.stratiienko@globallogic.com>
Implement DrmConnector instantiation through CreateInstance() static method,
which helps to reduce complexity of DrmDevice::Init() function.
Move Connector-to-CRTC binding information to the DrmDevice class.
Move drm/DrmConnector.h to Normal clang-tidy checks list by fixing
clang-tidy findings.
Signed-off-by: Roman Stratiienko <roman.o.stratiienko@globallogic.com>
Implement DrmEncoder instantiation through CreateInstance() static method,
which helps to reduce complexity of DrmDevice::Init() function.
Move Encoder-to-CRTC binding information to the DrmDevice class.
Move drm/DrmEncoder.h to Normal clang-tidy checks list by fixing
clang-tidy findings.
Signed-off-by: Roman Stratiienko <roman.o.stratiienko@globallogic.com>
Implement DrmCrtc instantiation through CreateInstance() static method,
which helps to reduce complexity of DrmDevice::Init() function.
Move CRTC-to-Display binding information to the DrmDevice class.
Move drm/DrmCrtc.h to Normal clang-tidy checks list by fixing
clang-tidy findings.
Signed-off-by: Roman Stratiienko <roman.o.stratiienko@globallogic.com>
We have single fail case of -readability-use-anyofallof.
Use NOLINTNEXTLINE comment instead.
Signed-off-by: Roman Stratiienko <roman.o.stratiienko@globallogic.com>
This improves visibility and helps to distinguish which
particular checks are disabled at every level.
Signed-off-by: Roman Stratiienko <roman.o.stratiienko@globallogic.com>
Goals:
1. Follow clang-tidy rules to maintain project clean.
2. Do not allow new code to break goal #1.
Requirements for CI:
1. In case new file appears in the project, it should be picked-up by CI
automatically and CI should assign NORMAL clang-tidy check level.
2. CI makefile should have SKIP list to define files for which build
by CI is impossible for some reason.
3. CI makefile should have ability to override clang-tidy check level for
every file.
Signed-off-by: Roman Stratiienko <roman.o.stratiienko@globallogic.com>
Previous dependencies relations was triggering FULL 'clang-tidy'
re-validation, even in case single source file has changed.
Signed-off-by: Roman Stratiienko <roman.o.stratiienko@globallogic.com>
This won't make much benefits for CI, but for local native builds will
significantly speed-up build cycle by allowing parallel build and by
using dependency tracking logic.
Signed-off-by: Roman Stratiienko <roman.o.stratiienko@globallogic.com>