1
0
Fork 0
Commit graph

22 commits

Author SHA1 Message Date
Andrew Wolfers
e76c0c751d Cleanup includes in backend/ per IWYU style
Change-Id: I2a0d38bc92b3d9544b3954d4047d5ea8a34ef0bf
2025-11-11 19:14:29 +00:00
Drew Davenport
9a89ceff02 Rename PipelineCreator interface to Backend
With the legacy Backend class renamed to CompositionPlanner, rename the
PipelineCreator interface to Backend. This interface maps most closely
to the concept of the "Backend".

Add some documentation to various Backend related classes.

Change-Id: I5d6a7afcebb9d0015c3d7629bf8c10324c8f07df
2025-10-31 12:37:30 -06:00
Drew Davenport
645d83d8eb Log an error for a Backend name conflict
Log an error and early-out if a backend with the same name is registered
multiple times.

Change-Id: Iec27c2987a3bb15702291870230d0bcac4a0704b
2025-10-30 09:27:28 -06:00
Drew Davenport
3c2106f064 Allow Backend to create DrmDisplayPipeline
Define a PipelineCreator interface which allows Backends to use
Backend-specific heuristics in creating the DrmDisplayPipeline.

Change-Id: I1f929213ce403267b539635ec9d5853cf1a7f18a
2025-10-30 09:27:28 -06:00
Drew Davenport
0f5244ef78 Create DrmDisplayPipeline through BackendManager
Additionally, move the creation of the Backend into BackendManager so
that it the Backend is created along with the DrmDisplayPipeline

Change-Id: I24dc19cadb324429f229fe7751b60b70ab512265
2025-10-30 09:27:28 -06:00
Drew Davenport
b112216f38 Use new BackendManager::CreateBackendForConnector
Remove the old CreateBackendForDisplay and related functions that are
now obsolete.

Change-Id: Ic41c065b65a50e6a68ccc1e40b210e5aed6d009e
2025-10-30 09:27:28 -06:00
Drew Davenport
fbd684e3e0 Add BackendManager::CreateBackendForPipeline
Create a Backend for the given DrmDisplayPipeline using the same logic
in CreateBackendForDisplay.

A subsequent change will use this function and deprecate
CreateBackendForDisplay.

Change-Id: I72365f5c689f6643e2f6da11f76dde1ac68f3e2d
2025-10-30 09:27:28 -06:00
Andrew Wolfers
9255d0d10b drm_hwcomposer: Migrate to android::drm_hwcomposer namespace
Change-Id: I2859aa8f55532d88231389724956fc77b0625339
2025-09-08 18:53:00 +00:00
Drew Davenport
b29c974d70 drm_hwcomposer: Return composition decision from backend
Rather than setting the ValidatedType on the layers directly from the
Backend, return the per-layer composition type decisions from the
Backend and let the HwcDisplay set it.

This is a step towards the goal of not setting HwcLayer state directly
from the Backend.

Change-Id: I8e2d1e7c6fb0d9071d5dca101ddb455b95535bd0
2025-08-19 09:16:22 -06:00
Drew Davenport
cb4e848c3b drm_hwcomposer: Move GetBackendOverride to Properties
Add Properties::GetBackendOverride to query the sysprop, and handle the
default in BackendManager.

Change-Id: Ifc01a23d64a5406ba5c9f065b7d5967b42b1b5d5
2025-06-12 01:51:29 +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
Lingkai Dong
1d7ddabafe drm_hwcomposer: Add pl111 to the client backend device list
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>
2024-01-30 09:49:45 +00:00
Roman Stratiienko
a7913de518 drm_hwcomposer: CI: Bump-up clang toolchain to v15
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>
2022-10-20 14:14:33 +03:00
Roman Stratiienko
19c162fe79 drm_hwcomposer: Initialize HwcDisplay using DrmDisplayPIpeline
HwcDisplay can now take all necessary objects from DrmDisplayPipeline.

Signed-off-by: Roman Stratiienko <roman.o.stratiienko@globallogic.com>
2022-02-02 12:57:32 +02:00
Roman Stratiienko
650299a235 drm_hwcomposer: Tidy-up DrmConnector class
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>
2022-01-31 21:48:40 +02:00
Roman Stratiienko
3627bebf7b drm_hwcomposer: Move HwcDisplay out of DrmHwcTwo class
Reduces code complexity.

Closes: https://gitlab.freedesktop.org/drm-hwcomposer/drm-hwcomposer/-/issues/35
Signed-off-by: Roman Stratiienko <roman.o.stratiienko@globallogic.com>
2022-01-12 11:27:07 +02:00
Roman Stratiienko
f815d38c2a drm_hwcomposer: Raise clang-tidy level of some files to NORMAL
Signed-off-by: Roman Stratiienko <roman.o.stratiienko@globallogic.com>
2022-01-12 10:47:23 +02:00
Roman Stratiienko
fc014f5792 drm_hwcomposer: CI: Set clang-tidy level to NORMAL for some files
Some of files require small adjustments to move into NORMAL checks list.

Signed-off-by: Roman Stratiienko <roman.o.stratiienko@globallogic.com>
2022-01-12 10:33:55 +02:00
Roman Stratiienko
d21071f7d5 drm_hwcomposer: CI: Increase coverage
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-06 12:12:17 +03: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
Mattijs Korpershoek
bbf28bb8d1 drm_hwcomposer: add drm-mediatek to client-backend list
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>
2020-09-24 08:07:42 +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 backend/backendmanager.cpp (Browse further)