Age | Commit message (Collapse) | Author |
|
Use getpagesize() to make drm_hwcomposer work with multiple page sizes.
This benefits Android as AOSP no longer relies on bionic's PAGE_SIZE
macro.
Bug: 310232825
Test: Presubmit
Signed-off-by: Vilas Bhat <vilasbhat@google.com>
Change-Id: I9af7436ac9ca6c052f67cdd296a960b51b8ba67a
|
|
|
|
Original change: https://android-review.googlesource.com/c/platform/external/drm_hwcomposer/+/2971287
Change-Id: I7a2e6a8ea868d678d4e467d20a99cc1c4e2c30c8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
|
Remove Xoogler dimitrysh
Test: TreeHugger
Change-Id: I5d963da516e5bd908ece5ab2dd9424d302e1303a
|
|
Sync with upstream project
* aosp/upstream-main:
drm_hwcomposer: Fix another build warning in HwcDisplay::SetPowerMode()
drm_hwcomposer: Fix build warning in HwcLayer::SetLayerBlendMode
drm_hwcomposer: Add pl111 to the client backend device list
drm_hwcomposer: Treat unknown connector as internal display
drm_hwcomposer: CI: Use aospext to provide headers for clang-tidy
drm_hwcomposer: Fix DRM and HWC rotation direction misalignment
drm_hwcomposer: Fix dockerfile
drm_hwcomposer: Virtual display acceleration support
drm_hwcomposer: Use shared pointer type for the pipeline_ variable
drm_hwcomposer: CI: Enable merge request pipelines
drm_hwcomposer: CI: Update runner os to ubuntu 23.04
Change-Id: I439fd80721e349f2e57c9937775eda1d5fe73b6d
Signed-off-by: John Stultz <jstultz@google.com>
|
|
Building with AOSP I see:
external/drm_hwcomposer/hwc2_device/HwcDisplay.cpp:768:50: warning: format specifies type 'int' but the argument has type 'HWC2::PowerMode' [-Wformat]
768 | ALOGE("Incorrect power mode value (%d)\n", mode);
| ~~ ^~~~
| static_cast<int>(
So this patch tweaks the message to use integer mode_in argument
to the function.
Change-Id: I9211733137ad194d5040a1d497b008b4c2c491dd
Signed-off-by: John Stultz <jstultz@google.com>
|
|
In building with AOSP, I ran into the following warning:
external/drm_hwcomposer/hwc2_device/HwcLayer.cpp:44:43: warning: format specifies type 'int' but the argument has type 'BufferBlendMode' [-Wformat]
44 | ALOGE("Unknown blending mode b=%d", blend_mode_);
| ~~ ^~~~~~~~~~~
| static_cast<int>(
It seems odd to print the old blend_mode_ value here instead of the
passed-in mode argument. So switch it so we are printing the invalid
value given
Signed-off-by: John Stultz <jstultz@google.com>
Change-Id: Id0fc0a4a5ba093db5c4b6ac99255344fa5112879
|
|
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>
|
|
The code determines if a display is internal or external based on the
display connector type, and at least one internal display must exist
which is used as the primary display. Because the FVP Base RevC does
not model any connector hardware, the reported connector type is none/
unknown, so we need to treat unknown as an internal connector.
Change-Id: Ifa603f903d74ccad6c7e9da13042994a5fdffe32
Signed-off-by: Lingkai Dong <lingkai.dong@arm.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>
|
|
[DRM API][1] uses a counter-clockwise direction, while [HWC API][2] uses
a clockwise.
[1]: https://elixir.bootlin.com/linux/v6.5.7/source/include/uapi/drm/drm_mode.h#L172
[2]: https://cs.android.com/android/platform/superproject/main/+/main:hardware/libhardware/include_all/hardware/hwcomposer_defs.h;l=96;drc=e9d7337d9d1edc0d8e3ece246ecde747e345e876
Closes: https://gitlab.freedesktop.org/drm-hwcomposer/drm-hwcomposer/-/issues/78
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
|
|
Host and container user IDs must be the same to avoid permission issues.
Fixes: 87b716c07097 ("drm_hwcomposer: CI: Update runner os to ubuntu 23.04")
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
|
|
Some platforms like RaspberryPI-4 can benefit from Display Blender IP Core's
ability to write back the composition into RAM, offloading the GPU in cases
where the display content needs to be used (screen record, remote display,
etc.).
To enable this feature the following system property must be enabled:
PRODUCT_VENDOR_PROPERTIES += debug.sf.enable_hwc_vds=1
The feature was requested by the Tesla Android project to improve UI
performance.
Closes: https://gitlab.freedesktop.org/drm-hwcomposer/drm-hwcomposer/-/issues/4
Change-Id: I643f94551408bf218a0b889f1a031598646242f1
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
|
|
The change will help with resource management in further patches.
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
|
|
Now, freedesktop forbids running user pipelines to avoid hacker attacks.
This change will ensure that only the drm_hwcomposer project runs the
pipeline.
Change-Id: I87b58c87b41cfd31fb41c49c0faf399950b95022
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
|
|
Ubuntu 22.10 is no longer supported and can't be used as a runner OS.
Change-Id: Ib52c3849442dfcedb6a94c5e7c7bbff948e5060c
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
|
|
ours am: 2f3ecaac4c -s ours am: 817aee8441 -s ours am: 3588950de2 -s ours
am skip reason: Merged-In I5b2714e1962e441dabcd7ee396d28a5ebde85730 with SHA-1 39e9dc65f3 is already in history
Original change: https://googleplex-android-review.googlesource.com/c/platform/external/drm_hwcomposer/+/24087501
Change-Id: If6db150be56694e86b5c1b92f65a7ca72bceedba
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
|
ours am: 2f3ecaac4c -s ours am: 817aee8441 -s ours
am skip reason: Merged-In I5b2714e1962e441dabcd7ee396d28a5ebde85730 with SHA-1 39e9dc65f3 is already in history
Original change: https://googleplex-android-review.googlesource.com/c/platform/external/drm_hwcomposer/+/24087501
Change-Id: I5fdfafe7e69c3fb721933fce074194f027d48b0e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
|
ours am: 2f3ecaac4c -s ours
am skip reason: Merged-In I5b2714e1962e441dabcd7ee396d28a5ebde85730 with SHA-1 39e9dc65f3 is already in history
Original change: https://googleplex-android-review.googlesource.com/c/platform/external/drm_hwcomposer/+/24087501
Change-Id: I1123654652006eb61abd8ed00dd8a5dd875167a6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
|
am skip reason: Merged-In I5b2714e1962e441dabcd7ee396d28a5ebde85730 with SHA-1 39e9dc65f3 is already in history
Original change: https://googleplex-android-review.googlesource.com/c/platform/external/drm_hwcomposer/+/24087501
Change-Id: I5953c5a329f83b0706bccb9597f6568f2acbc747
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
|
Bug: 291102124
Merged-In: I5b2714e1962e441dabcd7ee396d28a5ebde85730
Change-Id: I0b4abe356974dad7899c737544719e217f028c91
|
|
am: 5365831dfb am: edf83fea0f am: f3da2cd345 am: 41eb3601a7 am: 69821c43e2
Original change: https://android-review.googlesource.com/c/platform/external/drm_hwcomposer/+/2641990
Change-Id: I5c9eeac840564b210646658d1301e42374dce6b6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
|
am: 5365831dfb am: edf83fea0f am: f3da2cd345 am: 41eb3601a7
Original change: https://android-review.googlesource.com/c/platform/external/drm_hwcomposer/+/2641990
Change-Id: I52ec762c67d9cd89249809ec21e086f4dd94547f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
|
am: 5365831dfb am: edf83fea0f am: f3da2cd345
Original change: https://android-review.googlesource.com/c/platform/external/drm_hwcomposer/+/2641990
Change-Id: Id4f36a4612caf82eae2394df025780f09eae3f21
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
|
am: 5365831dfb am: edf83fea0f
Original change: https://android-review.googlesource.com/c/platform/external/drm_hwcomposer/+/2641990
Change-Id: I049077900c4b2c30aa5af21d3be1ebdea15e3342
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
|
am: 5365831dfb
Original change: https://android-review.googlesource.com/c/platform/external/drm_hwcomposer/+/2641990
Change-Id: Iaeada460435c5eefce51afe3866928b6e680c571
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
|
Original change: https://android-review.googlesource.com/c/platform/external/drm_hwcomposer/+/2641990
Change-Id: I19726e1cd7ba3c191e8f0ab484fcce5f94511190
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
|
* aosp/upstream-main:
drm_hwcomposer: Fix missing dependency in hwc-drm-uevent-print
drm_hwcomposer: Fix crash in headless mode
drm_hwcomposer: fix shift compiling error with AOSP
drm_hwcomposer: Make flattening thread-based instead of vsync-based
drm_hwcomposer: Add support for color transform matrix
drm_hwcomposer: Propagate acquire fence for test/validate cycle as well
drm_hwcomposer: Introduce SharedFd, use standard c++ RAII for UniqueFd
drm_hwcomposer: Add meson build to CI
drm_hwcomposer: Add meson.build file
drm_hwcomposer: Make main mutex recursive
drm_hwcomposer: Simplify DrmAtomicStateManager thread usage
drm_hwcomposer: Remove utils/worker from the project
drm_hwcomposer: Rework VSyncWorker to work without utils/worker
drm_hwcomposer: Rework UEventListener to work without utils/worker
drm_hwcomposer: Add support for running CI locally using docker
drm_hwcomposer: Use __ANDROID_API__ instead of PLATFORM_SDK_VERSION
drm_hwcomposer: Rework DrmMode class
drm_hwcomposer: Rework DrmProperty class
drm_hwcomposer: Use pragma once instead of include guards
drm_hwcomposer: Do not invoke ActivateDisplayUsingDPMS when power off
drm_hwcomposer: Use header library instead of hardcoded path
drm_hwcomposer: CI: Bump-up clang toolchain to v15
Change-Id: I437211ffb7ac4d21a823f4cfbbd7be90cb2144e3
Signed-off-by: John Stultz <jstultz@google.com>
|
|
Error:
ld.lld: error: undefined symbol: android::MakeUniqueFd(int)
Fixes: 76892784ac7c ("drm_hwcomposer: Introduce SharedFd, use standard c++ RAII for UniqueFd")
Closes: https://gitlab.freedesktop.org/drm-hwcomposer/drm-hwcomposer/-/issues/77
Change-Id: I6d37ff15b002cc49159a239393e18a8ca5b3cb27
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
|
|
SetColorTransform() should be skipped when HwcDisplay is in
headless mode.
Fixes: 0da91bf5bb72 ("drm_hwcomposer: Add support for color transform matrix")
Reported-by: Michał Gapiński <mike@gapinski.eu>
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
|
|
which reported like this:
08:58:21 external/drm_hwcomposer/hwc2_device/HwcDisplay.cpp:76:26: error: constexpr variable 'kOne' must be initialized by a constant expression
08:58:21 constexpr uint64_t kOne = 1L << 32; /* 1.0 in s31.32 format */
08:58:21 ^ ~~~~~~~~
08:58:21 external/drm_hwcomposer/hwc2_device/HwcDisplay.cpp:76:36: note: shift count 32 >= width of type 'long' (32 bits)
08:58:21 constexpr uint64_t kOne = 1L << 32; /* 1.0 in s31.32 format */
08:58:21 ^
08:58:21 external/drm_hwcomposer/hwc2_device/HwcDisplay.cpp:76:36: error: shift count >= width of type [-Werror,-Wshift-count-overflow]
08:58:21 constexpr uint64_t kOne = 1L << 32; /* 1.0 in s31.32 format */
08:58:21 ^ ~~
08:58:21 external/drm_hwcomposer/hwc2_device/HwcDisplay.cpp:697:71: error: shift count >= width of type [-Werror,-Wshift-count-overflow]
08:58:21 auto value = uint64_t(matrix[i * kInCtmRows + j] * float(1L << 32));
08:58:21 ^ ~~
08:58:21 3 errors generated.
Test: build passes and could boot to home screen
Change-Id: Ia9dfcd842a186dfbe279da1793363c6a25df0e2f
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
|
|
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>
|
|
Since acquire_fence is now std::shared_ptr, struct LayerData has default
copy constructor and LayerData::Clone() function is no longer required.
Also we can now remove 'test' argument from HwcLayer::PopulateLayerData
function, since copy operation for acquire_fence is now available.
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>
|
|
Now CI is building drm_hwcomposer for arm64 arch and generates
ready-to-deploy artifacts.
Dependencies for meson cross build were extracted from Android-13
using GloDroid/aospext project [1].
./build_deploy.sh script was migrated into Makefile and no longer
require AOSP to work. Usage example:
make build_deploy
Only arm64 platform is supported at this moment.
Other platforms will be added later.
[1]: https://github.com/GloDroid/aospext
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
|
|
This allows building without an AOSP tree, which significantly reduces
system requirements.
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
|
|
It allows to remove redundant unlock/lock pair from the code,
and should make it a little bit more race-proof.
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
|
|
1. Remove PresentTracker class.
2. Use separate mutex for thread synchronization. Before, we have always
experienced rescheduling due to calling condvar::notify inside the
mutex, which consumes some number of CPU cycles.
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>
|
|
utils/worker just complicates the logic without providing any benefit.
Change-Id: I0e6427492b8298c6c327c1edb660c8a9789f706f
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
|
|
Prior to this commit running local CI script required the latest non-LTS
ubuntu installed.
To run CI on host run:
make local_presubmit
To run CI within docker container run:
make ci
With this commit we're also setting the stage for meson build.
Change-Id: I759c35ef8da306de8759f290c11c39c4b237bb8c
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>
|
|
Simplify code and raise-up clang-tidy level of DrmMode class
to 'normal'.
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
|
|
Simplify code and raise-up clang-tidy level of DrmProperty class
to 'normal'.
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>
|
|
When set power mode to off, should not invoke ActivateDisplayUsingDPMS,
but invoke ExecuteAtomicCommit to commit crtc ACTIVE property change.
Signed-off-by: Jia Ren <jiaren@asrmicro.com>
|
|
This allows to put drm_hwcomposer in any directory.
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>
|