1
0
Fork 0
Commit graph

10 commits

Author SHA1 Message Date
Andrew Wolfers
5a9cc2cba3 Cleanup includes in drm/ per IWYU style
Change-Id: I613cb6656d887aab5221be3d3b2923f1f4ba9ab9
2025-11-11 19:14:37 +00:00
Andrew Wolfers
1e0e2ca0a5 Move implementations out of headers
This change moves some non-trivial implementations out of header
files in drm/. This will enable some includes to be converted to
forward declarations in future changes.

Change-Id: I7b1248657e0fa27e3c0c0157abe4f6b918e13a29
2025-11-11 17:01:13 +00:00
Andrew Wolfers
9255d0d10b drm_hwcomposer: Migrate to android::drm_hwcomposer namespace
Change-Id: I2859aa8f55532d88231389724956fc77b0625339
2025-09-08 18:53:00 +00:00
Sean Paul
468a7548bf drm_hwcomposer: Replace LOG_TAG with drmhwc
It's a pain to use logcat filters for drm_hwcomposer since each file has a different tag necessitating one to specify each tag for the logcat filter or use a regex.

Use one tag for all of drm_hwcomposer to simplify this.

Signed-off-by: Sean Paul <seanpaul@chromium.org>
2024-07-19 17:42:41 +00:00
Roman Stratiienko
76892784ac drm_hwcomposer: Introduce SharedFd, use standard c++ RAII for UniqueFd
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>
2023-01-16 20:13:58 +02:00
Roman Stratiienko
7d89911c32 drm_hwcomposer: Tidy-up DrmDevice class
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>
2022-01-31 21:48:40 +02:00
Roman Stratiienko
027987b1fe drm_hwcomposer: Tidy-up DrmEncoder class
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>
2022-01-31 21:31:32 +02:00
Roman Stratiienko
10be875de0 drm_hwcomposer: Tidy-up DrmCrtc class
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>
2022-01-31 21:31:32 +02:00
Roman Stratiienko
e2f2c92924 drm_hwcomposer: enable code analysis using clang-tidy
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-03 16:07:25 +02:00
Roman Stratiienko
13cc3666c6 drm_hwcomposer: use CamelCase in source/header files related to class
Main goal is to increase readability of file names.
AOSP uses camelcase for files in many projects.
Lets do the same for drm_hwcomposer.

Keep platform/ directory as is, since class names is different from file names.

Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
Change-Id: I7e992357851c2a86711f4da1241c4d507359e56b
2020-09-08 22:34:52 +03:00
Renamed from drm/drmencoder.cpp (Browse further)