- Jul 12, 2024
-
-
Mattijs Korpershoek authored
The freedesktop instance provides a docker container registry with ubuntu 23.04 based images ready to be used for building drm_hwcomposer. Migrate to using that container image in order to: - Avoid apt-get installing all dependencies for each job - Remove duplication between the Dockerfile and the .gitlab-ci.yml Since the container image provides aospless, we no longer need to download it for each pipeline stage. Also, this updates the folder structure: Before: /builds/drm-hwcomposer/drm-hwcomposer/ /builds/drm-hwcomposer/aospless After: /builds/drm-hwcomposer/drm-hwcomposer/ /home/user/aospless For "tidy", this new structure requires to override the BASE_DIR variable. Signed-off-by:
Mattijs Korpershoek <mkorpershoek@baylibre.com>
-
Mattijs Korpershoek authored
drm_hwcomposer provides a .ci/Dockerfile which can be used as a base image to rebuild drm_hwcomposer. Unfortunetly, the CI stages (build, tidy, style) do not use this container image. Instead, it re-installs all the dependencies for each stage. To use this container image, we should also build it via the CI. Add a new build stage to build the container and publish it to the local (gitlab-provided) docker registry. This way, it can be reused by the other build stages. Note: as documented in [1], this requires that the configured Gitlab runner can run docker in privileged mode. [1] https://docs.gitlab.com/ee/ci/docker/using_docker_build.html#use-docker-in-docker Signed-off-by:
Mattijs Korpershoek <mkorpershoek@baylibre.com>
-
- Jun 28, 2024
-
-
Issues can arise when shared libraries with c++17 and c++20 loaded into the same process refer to the same global symbol (usually std::string). So avoid overriding the default cpp_std. Bug: http://b/344590580 Signed-off-by:
Elliott Hughes <enh@google.com> [jstultz: Tweaked & expanded commit message] Signed-off-by:
John Stultz <jstultz@google.com> Change-Id: I6bde2ab4d208c990103e6d303ec96a4969fa06ef
-
- Mar 27, 2024
-
-
Vilas Bhat authored
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. Change-Id: I9af7436ac9ca6c052f67cdd296a960b51b8ba67a Signed-off-by:
Vilas Bhat <vilasbhat@google.com>
-
- Feb 14, 2024
-
-
John Stultz authored
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>
-
John Stultz authored
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
-
- Jan 30, 2024
-
-
Lingkai Dong authored
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>
-
Lingkai Dong authored
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>
-
- Nov 21, 2023
-
-
Roman Stratiienko authored
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>
-
- Oct 14, 2023
-
-
Roman Stratiienko authored
[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: drm-hwcomposer/drm-hwcomposer#78 Signed-off-by:
Roman Stratiienko <r.stratiienko@gmail.com>
-
Roman Stratiienko authored
Host and container user IDs must be the same to avoid permission issues. Fixes: 87b716c0 ("drm_hwcomposer: CI: Update runner os to ubuntu 23.04") Signed-off-by:
Roman Stratiienko <r.stratiienko@gmail.com>
-
- Oct 01, 2023
-
-
Roman Stratiienko authored
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: #4 Change-Id: I643f94551408bf218a0b889f1a031598646242f1 Signed-off-by:
Roman Stratiienko <r.stratiienko@gmail.com>
-
Roman Stratiienko authored
The change will help with resource management in further patches. Signed-off-by:
Roman Stratiienko <r.stratiienko@gmail.com>
-
- Sep 19, 2023
-
-
Roman Stratiienko authored
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>
-
Roman Stratiienko authored
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>
-
- Jun 27, 2023
-
-
Roman Stratiienko authored
Error: ld.lld: error: undefined symbol: android::MakeUniqueFd(int) Fixes: 76892784 ("drm_hwcomposer: Introduce SharedFd, use standard c++ RAII for UniqueFd") Closes: drm-hwcomposer/drm-hwcomposer#77 Change-Id: I6d37ff15b002cc49159a239393e18a8ca5b3cb27 Signed-off-by:
Roman Stratiienko <r.stratiienko@gmail.com>
-
- Feb 01, 2023
-
-
Roman Stratiienko authored
SetColorTransform() should be skipped when HwcDisplay is in headless mode. Fixes: 0da91bf5 ("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>
-
- Jan 28, 2023
-
-
Yongqin Liu authored
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>
-
- Jan 18, 2023
-
-
Roman Stratiienko authored
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>
-
Roman Stratiienko authored
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>
-
Roman Stratiienko authored
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>
-
- Jan 16, 2023
-
-
Roman Stratiienko authored
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>
-
- Jan 04, 2023
-
-
Roman Stratiienko authored
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>
-
Roman Stratiienko authored
This allows building without an AOSP tree, which significantly reduces system requirements. Signed-off-by:
Roman Stratiienko <r.stratiienko@gmail.com>
-
Roman Stratiienko authored
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>
-
Roman Stratiienko authored
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>
-
- Dec 28, 2022
-
-
Roman Stratiienko authored
utils/worker is no longer used and can be removed. Change-Id: I5fc9bd2b3b8b0375622ee2446044d3b893756b30 Signed-off-by:
Roman Stratiienko <r.stratiienko@gmail.com>
-
Roman Stratiienko authored
utils/worker just complicates the logic without providing any benefit. Change-Id: I7b3c91aee9c0507d9ca35792d24ba6c8c3870033 Signed-off-by:
Roman Stratiienko <r.stratiienko@gmail.com>
-
Roman Stratiienko authored
utils/worker just complicates the logic without providing any benefit. Change-Id: I0e6427492b8298c6c327c1edb660c8a9789f706f Signed-off-by:
Roman Stratiienko <r.stratiienko@gmail.com>
-
- Dec 19, 2022
-
-
Roman Stratiienko authored
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>
-
- Dec 11, 2022
-
-
Roman Stratiienko authored
__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>
-
Roman Stratiienko authored
Simplify code and raise-up clang-tidy level of DrmMode class to 'normal'. Signed-off-by:
Roman Stratiienko <r.stratiienko@gmail.com>
-
Roman Stratiienko authored
Simplify code and raise-up clang-tidy level of DrmProperty class to 'normal'. Signed-off-by:
Roman Stratiienko <r.stratiienko@gmail.com>
-
- Dec 10, 2022
-
-
Roman Stratiienko authored
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>
-
- Nov 17, 2022
-
-
Jia Ren authored
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>
-
- Nov 16, 2022
-
-
Roman Stratiienko authored
This allows to put drm_hwcomposer in any directory. Signed-off-by:
Roman Stratiienko <r.stratiienko@gmail.com>
-
- Oct 20, 2022
-
-
Roman Stratiienko authored
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>
-
- Sep 29, 2022
-
-
Roman Stratiienko authored
For now just bind the first suitable primary plane to the pipeline on creation. Closes: drm-hwcomposer/drm-hwcomposer#68 Change-Id: Idc4a7a5ac9d768d2614e1cd8a460d742f406a1cc Signed-off-by:
Roman Stratiienko <r.stratiienko@gmail.com>
-
- Sep 08, 2022
-
-
Yongqin Liu authored
Some DRM driver such as omap_drm allow sharing primary plane between CRTCs. drm_hwcomposer isn't ready for such a scenarios and fails with an error: Found more than 1 primary plane for CRTC Don't report multiple primary planes for single CRTC to satisfy the drm_hwc. Signed-off-by:
Yongqin Liu <yongqin.liu@linaro.org>
-
- Aug 25, 2022
-
-
Andrii Chepurnyi authored
Commit e9fbd8d6 ("drm_hwcomposer: Set return type to std::optional for BufferInfoGetters") changed the BufferInfo variable name, but missed the case defined under HAL_PIXEL_FORMAT_BGRX_8888. This results in build failures. This patch fixes the build issue by completing the variable renaming. Fixes: e9fbd8d6 ("drm_hwcomposer: Set return type to std::optional for BufferInfoGetters") Signed-off-by:
Andrii Chepurnyi <andrii_chepurnyi@epam.com>
-