Age | Commit message (Collapse) | Author |
|
PL111[1] is the color LCD controller available on the Armv-A Base
Platform RevC FVP and the Versatile Express LogicTile FPGA board. The
8MB video memory of PL111 is barely enough for the two fullscreen
buffers always requested by SurfaceFlinger for client composition, and
there is no video memory left for any device composition buffers.
Therefore we add PL111 to the list of devices that uses the client-only
composition backend.
[1]: https://developer.arm.com/Processors/PL111
Change-Id: Ib64ccf5e030b623d5c920eb998c6b22ead89b4c9
Signed-off-by: Lingkai Dong <lingkai.dong@arm.com>
|
|
Using vsync means consume some CPU time every frame for
IRQ -> Kernel_Thread -> UserSpace_listener thread transitions.
Framework tries to reduce vsync usage to the minimum, by using timelines
instead.
New flattening controller thread wakes-up only once per second.
This commit also removes flattening info from dumpsys. Practice shows
that it is almost useless. Instead debugging can be done using ALOGV
dumps.
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
|
|
1. Add and wire-up CRTC CTM property support.
2. Add custom Android property to select behavior for cases
where DRM can't handle color transform matrix.
The "vendor.hwc.drm.ctm" property can be set to:
- DRM_OR_GPU (default) - Use GPU if CTM is not supported by DRM.
- DRM_OR_IGNORE - Ignore CTM if DRM doesn't support it.
The last option is useful for Android 13 and later where default
color transformation matrix is not an identity matrix.
At the moment I do not have any devices with CTM support, therefore
I can test only DRM_OR_IGNORE option.
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
|
|
Some of existing include guards were copy-pasted without modification,
therefore have incorrect name. Switch to 'pragma once' in order to fix
it and avoid such copy-paste issues in the future.
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>
|
|
1. Move BlendMode, ColorSpace, SampleRange fields to the struct BufferInfo,
allowing extraction of the data from native_handle using Metadata@4 API.
Use it when data from HWC2 API can't be used (Currently it's a BlendMode
case for CLIENT layer)
2. Rename DrmHwcLayer to LayerData and move it to compositor/ directory.
(I was confused in the past because of similarity of names DrmHwcLayer
vs HwcLayer, so this step should meke it easier for newcomers to
understand the code)
3. Allow clonning of the LayerData to propagate it through the composition
pipeline. Thus LayerData can be used by both HwcLayer to track state
and by the compositor.
Signed-off-by: Roman Stratiienko <roman.o.stratiienko@globallogic.com>
|
|
We are not testing it for more than year, therefore it's better
to use generic logic for 'rcar-du' instead.
Signed-off-by: Roman Stratiienko <roman.o.stratiienko@globallogic.com>
|
|
Rewrite Layer-to-Plane planner. Get rid of ~200 redundant lines of code
+ added plane sharing functionality.
Closes: https://gitlab.freedesktop.org/drm-hwcomposer/drm-hwcomposer/-/issues/11
Signed-off-by: Roman Stratiienko <roman.o.stratiienko@globallogic.com>
|
|
The following use scenarios are now possible:
1. When no display connected, primary HwcDisplay is created in headless
mode.
2. When user connects first display, it binds to primary slot, replacing
headless HwcDisplay.
3. When user connects another display it binds to the new HwcDisplay
slot, creating new display for the framework.
4. When user disconnects first (Primary) display, drm_hwc detaches
second display and attaches it to the Primary slot. In this case
framework is notified as Primary display resolution updated
(Plugged->Plugged transition). And second display is disconnected
(Plugged->Unplugged transition).
DrmDisplayPipeline is now created on demand (after hotplug event).
HwcDisplay class is now destructed on connector unplug, which will give
us ability to destroy any resource caches (will be required for FB
caching logic).
Signed-off-by: Roman Stratiienko <roman.o.stratiienko@globallogic.com>
|
|
HwcDisplay can now take all necessary objects from DrmDisplayPipeline.
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>
|
|
To keep all frontend-related files in a single directory.
Signed-off-by: Roman Stratiienko <roman.o.stratiienko@globallogic.com>
|
|
Reduces code complexity.
Closes: https://gitlab.freedesktop.org/drm-hwcomposer/drm-hwcomposer/-/issues/35
Signed-off-by: Roman Stratiienko <roman.o.stratiienko@globallogic.com>
|
|
... to reduce complexity of DrmHwcTwo.* files.
Bump-up tidy level of new files to NORMAL (fix function naming,
add NOLINT, etc.)
Signed-off-by: Roman Stratiienko <roman.o.stratiienko@globallogic.com>
|
|
Signed-off-by: Roman Stratiienko <roman.o.stratiienko@globallogic.com>
|
|
Some of files require small adjustments to move into NORMAL checks list.
Signed-off-by: Roman Stratiienko <roman.o.stratiienko@globallogic.com>
|
|
Android-9 has -Wsign-compare enabled by default and it causes build issues.
Enable -Wsign-compare option in CI, so we won't introduce such issues anymore.
Signed-off-by: Roman Stratiienko <roman.o.stratiienko@globallogic.com>
|
|
Current release_fence merging logic doesn't make much sence, cleanup it.
Signed-off-by: Roman Stratiienko <roman.o.stratiienko@globallogic.com>
|
|
Remove unnecessary code from DrmCompositor.
Drops ~100 LoC.
Signed-off-by: Roman Stratiienko <roman.o.stratiienko@globallogic.com>
|
|
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>
|
|
The GetOrderLayersByZPos copies an ordered list of layer pointers.
Signed-off-by: Matvii Zorin <matvii.zorin@globallogic.com>
|
|
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>
|
|
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>
|
|
Separate the correction of client range into the separate method.
Signed-off-by: Matvii Zorin <matvii.zorin@globallogic.com>
|
|
The CalcPixOps is used only for display validation which is implemented
in the generic backend.
Signed-off-by: Matvii Zorin <matvii.zorin@globallogic.com>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Motivation:
Platform term meaning used in drm_hwcomposer does not correspond to the
content of the platform directory. Platform directory consists of:
1. Buffer information getters for different gralloc (currently called platform).
2. Composition planner logic (which has flaws and should be reworked into
layer->plane mapping during validation stage logic).
3. DrmGenericImpoter with reference counting logic.
Android-11 IMapper@4 metadata API offers a generic way to access buffer
information which makes other gralloc buffer information getters obsolete.
Legacy getters should be maintained for some time until all known users
will migrate to Mapper@4 API.
Implementation:
1. Split 'PlatformImporter' logic to 'Importer' only and 'Buffer Getter' logic.
a. Remove buffer_handle_t parameter from ImportBuffer(). Instead user should
get BufferInfo using ConvertBoInfo to struct hwc_drm_bo_t, then use it for
ImportBuffer().
b. Move DrmGenericImporter.{cpp/h} into the drm directory.
2. Isolate planner code in single file and move it to compositor directory as
compositor/Planner.{cpp/h}
3. Rename platform definition
a. Rename platform directory to bufferinfo.
b. Rename/move bufferinfo/platorm*.{cpp,h} getters to
bufferinfo/legacy/BufferInfo*.{cpp,h}. Align class names/includes.
4. Split legacy/metadata getters logic.
a. Apply existing bufferinfogetter base class only for legacy getters.
b. Combine legacy/generic gettera under new base class.
c. Create a placeholder for generic(metadata) getter.
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
|
|
Since mediatek-drm has no support for premultiplied alpha buffers, we
can have issues with transparency.
Disable off-loading by adding "mediatek-drm" to the
client-backend list.
Change-Id: I12b034ecd5ae961264d01b6effaa4f4010036ac9
Suggested-by: Roman Stratiienko <r.stratiienko@gmail.com>
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
|
|
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
|
|
... to improve navigation between source/header file.
Unnecessary dependencies also removed.
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
Change-Id: I2c3bf993b8c5f356490433fd94e90011487a1276
|
|
ABGR8888 pixel format and layer scaling are unsupported for rcar-du
platform.
Handle and filter out the layers by overriding the IsClientLayer method
for additional checks. That will force layers that require scaling or have
the unsupported pixel format to be merged by GPU, and allow other layers
to be merged by DRM.
Signed-off-by: Matvii Zorin <matvii.zorin@globallogic.com>
|
|
This display backend may be chosen by setting the hwc.backend_override
system property to the "client" value.
Suggested-by: Andrii Chepurnyi <andrii_chepurnyi@epam.com>
Signed-off-by: Matvii Zorin <matvii.zorin@globallogic.com>
|
|
Different DRM/KMS backends have a variable set of limitations, which is
not always exposed via DRM ioctls.
This implementation of backend-dependent validation provides a register
of platform-specific inherited backend class to the map by BackendManager
class. ValidateDisplay function is moved to generic backend
implementantion and separated into 2 additional methods.
The map key is a string that contains the corresponding DRM driver name.
During DrmHwcTwo class initialization the vendor.hwc.backend_override
system property and driver name will be checked and a backend will be set
for the appropriate display. If the map does not have any backend for the
named driver, the generic backend will be used.
Signed-off-by: Matvii Zorin <matvii.zorin@globallogic.com>
|