drm-hwcomposer merge requestshttps://gitlab.freedesktop.org/drm-hwcomposer/drm-hwcomposer/-/merge_requests2022-11-28T12:38:45Zhttps://gitlab.freedesktop.org/drm-hwcomposer/drm-hwcomposer/-/merge_requests/213drm_hwcomposer: Do not invoke ActivateDisplayUsingDPMS when power off2022-11-28T12:38:45ZJia Rendrm_hwcomposer: Do not invoke ActivateDisplayUsingDPMS when power offWhen 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>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>https://gitlab.freedesktop.org/drm-hwcomposer/drm-hwcomposer/-/merge_requests/214drm_hwcomposer: Add meson.build file2023-01-04T18:14:42ZRoman Stratiienkodrm_hwcomposer: Add meson.build fileDepends on https://gitlab.freedesktop.org/drm-hwcomposer/drm-hwcomposer/-/merge_requests/215 and !217 :
This allows building without an AOSP tree, which significantly reduces system requirements.
## CI changes:
Now CI is building drm_...Depends on https://gitlab.freedesktop.org/drm-hwcomposer/drm-hwcomposer/-/merge_requests/215 and !217 :
This allows building without an AOSP tree, which significantly reduces system requirements.
## CI changes:
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 bd
Only arm64 platform is supported at this moment.
Other platforms will be added later.
[1]: https://github.com/GloDroid/aospexthttps://gitlab.freedesktop.org/drm-hwcomposer/drm-hwcomposer/-/merge_requests/215Various fixes 2022 week 492022-12-12T20:05:35ZRoman StratiienkoVarious fixes 2022 week 49https://gitlab.freedesktop.org/drm-hwcomposer/drm-hwcomposer/-/merge_requests/217drm_hwcomposer: Add support for running CI locally using docker2022-12-19T23:54:58ZRoman Stratiienkodrm_hwcomposer: Add support for running CI locally using dockerPrior to this commit running local CI script required 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 ...Prior to this commit running local CI script required 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.https://gitlab.freedesktop.org/drm-hwcomposer/drm-hwcomposer/-/merge_requests/219Remove utils/worker2023-01-04T09:48:29ZRoman StratiienkoRemove utils/workerhttps://gitlab.freedesktop.org/drm-hwcomposer/drm-hwcomposer/-/merge_requests/220Improve multithread handling2023-01-04T14:57:58ZRoman StratiienkoImprove multithread handlingDepends on !219Depends on !219https://gitlab.freedesktop.org/drm-hwcomposer/drm-hwcomposer/-/merge_requests/221Improve fences propagation2023-01-18T20:22:02ZRoman StratiienkoImprove fences propagationhttps://gitlab.freedesktop.org/drm-hwcomposer/drm-hwcomposer/-/merge_requests/222drm_hwcomposer: Add support for color transform matrix2023-01-28T04:52:11ZRoman Stratiienkodrm_hwcomposer: Add support for color transform matrixDepends on !221
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 (de...Depends on !221
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.https://gitlab.freedesktop.org/drm-hwcomposer/drm-hwcomposer/-/merge_requests/223drm_hwcomposer: Make flattening thread-based instead of vsync-based2023-01-19T08:42:09ZRoman Stratiienkodrm_hwcomposer: Make flattening thread-based instead of vsync-basedDepends on !222 !221
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 flatten...Depends on !222 !221
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.https://gitlab.freedesktop.org/drm-hwcomposer/drm-hwcomposer/-/merge_requests/225drm_hwcomposer: fix shift compiling error with AOSP2023-01-28T23:06:46ZYongqin Liudrm_hwcomposer: fix shift compiling error with AOSPwhich 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; /* ...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
Issue: #75
Change-Id: Ia9dfcd842a186dfbe279da1793363c6a25df0e2f
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>https://gitlab.freedesktop.org/drm-hwcomposer/drm-hwcomposer/-/merge_requests/226drm_hwcomposer: Fix crash in headless mode2023-02-01T19:12:51ZRoman Stratiienkodrm_hwcomposer: Fix crash in headless modeSetColorTransform() 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>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>https://gitlab.freedesktop.org/drm-hwcomposer/drm-hwcomposer/-/merge_requests/227drm_hwcomposer: Fix missing dependency in hwc-drm-uevent-print2023-06-27T19:01:47ZRoman Stratiienkodrm_hwcomposer: Fix missing dependency in hwc-drm-uevent-printError:
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/-/iss...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>https://gitlab.freedesktop.org/drm-hwcomposer/drm-hwcomposer/-/merge_requests/228drm_hwcomposer: Virtual display acceleration support2023-10-02T21:55:01ZRoman Stratiienkodrm_hwcomposer: Virtual display acceleration supportSome 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.).
T...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.https://gitlab.freedesktop.org/drm-hwcomposer/drm-hwcomposer/-/merge_requests/229Fix the CI2023-09-19T22:29:45ZRoman StratiienkoFix the CIhttps://gitlab.freedesktop.org/drm-hwcomposer/drm-hwcomposer/-/merge_requests/230drm_hwcomposer: Fix dockerfile2023-10-14T23:04:13ZRoman Stratiienkodrm_hwcomposer: Fix dockerfileHost and container user IDs must be the same to avoid permission issues.
Fixes: 87b716c07097 ("drm_hwcomposer: CI: Update runner os to ubuntu 23.04")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")https://gitlab.freedesktop.org/drm-hwcomposer/drm-hwcomposer/-/merge_requests/231drm_hwcomposer: Fix DRM and HWC rotation direction misalignment2023-10-18T19:27:28ZRoman Stratiienkodrm_hwcomposer: Fix DRM and HWC rotation direction misalignmentDRM API uses a counter-clockwise direction, while HWC API uses a clockwise.
Closes: https://gitlab.freedesktop.org/drm-hwcomposer/drm-hwcomposer/-/issues/78
I have no HW to test this. Therefore, we need confirmation from users.DRM API uses a counter-clockwise direction, while HWC API uses a clockwise.
Closes: https://gitlab.freedesktop.org/drm-hwcomposer/drm-hwcomposer/-/issues/78
I have no HW to test this. Therefore, we need confirmation from users.https://gitlab.freedesktop.org/drm-hwcomposer/drm-hwcomposer/-/merge_requests/232drm_hwcomposer: CI: Use aospext to provide headers for clang-tidy2023-12-06T09:18:00ZRoman Stratiienkodrm_hwcomposer: CI: Use aospext to provide headers for clang-tidySince 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 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.https://gitlab.freedesktop.org/drm-hwcomposer/drm-hwcomposer/-/merge_requests/234drm_hwcomposer: Make changes needed for AEMv8-A Base Platform RevC FVP2024-01-31T11:02:31ZLingkai Donglingkai.dong@arm.comdrm_hwcomposer: Make changes needed for AEMv8-A Base Platform RevC FVP# Background
[AEMv8-A Base Platform RevC FVP](https://developer.arm.com/documentation/100966/1111-00/Introduction/About-FVPs?lang=en) (Fixed Virtual Platform), aka FVP Base RevC, has the [PL111 color LCD controller](https://developer.ar...# Background
[AEMv8-A Base Platform RevC FVP](https://developer.arm.com/documentation/100966/1111-00/Introduction/About-FVPs?lang=en) (Fixed Virtual Platform), aka FVP Base RevC, has the [PL111 color LCD controller](https://developer.arm.com/Processors/PL111) for display. This platform has been available in Android Open Source Project (AOSP) for several years, in https://android.googlesource.com/device/generic/goldfish/+/main/fvpbase
In the past, this platform used fbdev for display. Now with the deprecation of fbdev, the Android GKI (generic kernel image) is not shipped with fbdev or drm-fbdev emulation. This merge request is part of the effort to switch to DRM.
# Changes
This merge requests consists of two changes to make drm_hwcomposer work with the PL111 controller:
* Treat unknown connector as internal display - FVP Base RevC does not simulate any display connectors
* Add pl111 to the client backend device list - PL111 has a very small video memory that is only enough for client layer buffers
# Testing
I fetched the latest AOSP main branch, navigated to `external/drm_hwcomposer` (Android's fork), did `git merge fvp-base-revc-support` to locally bring in my patches and the latest patches from freedesktop's repository, and built and ran Android.https://gitlab.freedesktop.org/drm-hwcomposer/drm-hwcomposer/-/merge_requests/235drm_hwcomposer: Fix build warning in HwcLayer::SetLayerBlendMode2024-02-14T18:11:48ZJohn Stultzdrm_hwcomposer: Fix build warning in HwcLayer::SetLayerBlendMode```
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("Unknow...```
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
```https://gitlab.freedesktop.org/drm-hwcomposer/drm-hwcomposer/-/merge_requests/236drm_hwcomposer: Fix another build warning in HwcDisplay::SetPowerMode()2024-02-14T20:49:36ZJohn Stultzdrm_hwcomposer: Fix another build warning in HwcDisplay::SetPowerMode()```
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"...```
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>
```