sonyxperiadev / vendor-qcom-opensource-media

2 stars 8 forks source link

Making use of missing color format #7

Closed rezaetezal closed 3 years ago

rezaetezal commented 3 years ago

Trying to build for XQ-AS72 (missing device in configs, so eating XQ-AS52's lunch). Getting following error

FAILED: target  C++: libc2dcolorconvert <= vendor/qcom/opensource/media/sm8250/libc2dcolorconvert/C2DColorConverter.cpp
Outputs: out/target/product/pdx206/obj/SHARED_LIBRARIES/libc2dcolorconvert_intermediates/C2DColorConverter.o
Error: exited with code: 1
Command: /bin/bash -c "PWD=/proc/self/cwd  prebuilts/clang/host/linux-x86/clang-r383902b1/bin/clang++ -I out/target/product/pdx206/obj/include/adreno -I out/target/product/pdx206/obj/include/adreno -I vendor/qcom/opensource/commonsys-intf/display/gralloc -I vendor/qcom/opensource/media/sm8250/libc2dcolorconvert -I out/target/product/pdx206/obj/SHARED_LIBRARIES/libc2dcolorconvert_intermediates -I out/target/product/pdx206/gen/SHARED_LIBRARIES/libc2dcolorconvert_intermediates -isystem kernel/sony/msm-4.19/common-headers/kernel-headers -isystem kernel/sony/msm-4.19/common-headers/kernel-headers -Isystem/core/liblog/include_vndk -Iexternal/libcxx/include -Iexternal/libcxxabi/include -isystem out/soong/.intermediates/bionic/libc/libc.llndk/android_vendor.30_arm64_armv8-2a_shared/gen/include -isystem bionic/libc/kernel/android/scsi -isystem bionic/libc/kernel/android/uapi -isystem bionic/libc/kernel/uapi -isystem bionic/libc/kernel/uapi/asm-arm64   -Iexternal/libcxxabi/include  -Isystem/core/libutils/include -Isystem/core/libbacktrace/include -Isystem/core/liblog/include_vndk -Isystem/core/libsystem/include -Isystem/core/libcutils/include_vndk -Isystem/core/libprocessgroup/include -Ihardware/libhardware/include -Isystem/media/audio/include -Isystem/core/libcutils/include_vndk -Isystem/core/libsystem/include -Isystem/bt/types -Ivendor/qcom/opensource/display/include -Ivendor/qcom/opensource/display/libcopybit -Ivendor/qcom/opensource/display/libdrmutils -Ivendor/qcom/opensource/display/libqdutils -Ivendor/qcom/opensource/display/libqservice -Ivendor/qcom/opensource/display/gpu_tonemapper -Ivendor/qcom/opensource/display/sdm/include -Ivendor/qcom/opensource/display/gralloc -Ivendor/qcom/opensource/display/libdebug -Ihardware/libhardware/include -Isystem/media/audio/include -Isystem/core/libcutils/include_vndk -Isystem/core/libsystem/include -Isystem/bt/types -Ivendor/qcom/opensource/display-commonsys-intf/gralloc-next -Ivendor/qcom/opensource/display-commonsys-intf/gralloc -Ivendor/qcom/opensource/display-commonsys-intf/include -Ivendor/qcom/opensource/display-commonsys-intf/libdisplayconfig -Ivendor/qcom/opensource/display-commonsys-intf/libqdmetadata   -isystem out/target/product/pdx206/obj/include -isystem kernel/sony/msm-4.19/common-headers/kernel-headers -c  -Werror=implicit-function-declaration -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -no-canonical-prefixes -DNDEBUG -UDEBUG -fno-exceptions -Wno-multichar -O2 -g -fno-strict-aliasing -Werror=date-time -Werror=pragma-pack -Werror=pragma-pack-suspicious-include -fdebug-prefix-map=/proc/self/cwd= -D__compiler_offsetof=__builtin_offsetof -faddrsig -Werror=int-conversion -fexperimental-new-pass-manager -Wno-reserved-id-macro -Wno-unused-command-line-argument -fcolor-diagnostics -Wno-sign-compare -Wno-defaulted-function-deleted -Wno-inconsistent-missing-override -Wno-c99-designator -ftrivial-auto-var-init=zero -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang -ffunction-sections -fdata-sections -fno-short-enums -funwind-tables -fstack-protector-strong -Wa,--noexecstack -D_FORTIFY_SOURCE=2 -Wstrict-aliasing=2 -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Werror=format-security -nostdlibinc -march=armv8.2a  -Bprebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/bin  -Wsign-promo -Wimplicit-fallthrough -D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS -Wno-gnu-include-next -fvisibility-inlines-hidden  -std=gnu++17   -fno-rtti -Wall -DDO_NOT_CHECK_MANUAL_BINDER_INTERFACES -D__ANDROID_VNDK__ -fPIC -DANDROID_STRICT -target aarch64-linux-android30   -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -Werror=fortify-source -Werror=address-of-temporary -Werror=return-type -Wno-tautological-constant-compare -Wno-tautological-type-limit-compare -Wno-reorder-init-list -Wno-implicit-int-float-conversion -Wno-int-in-bool-context -Wno-sizeof-array-div -Wno-tautological-overlap-compare -Wno-deprecated-copy -Wno-range-loop-construct -Wno-misleading-indentation -Wno-zero-as-null-pointer-constant -Wno-deprecated-anon-enum-enum-conversion -Wno-deprecated-enum-enum-conversion -Wno-string-compare -Wno-enum-enum-conversion -Wno-enum-float-conversion -Wno-pessimizing-move  -MD -MF out/target/product/pdx206/obj/SHARED_LIBRARIES/libc2dcolorconvert_intermediates/C2DColorConverter.d -o out/target/product/pdx206/obj/SHARED_LIBRARIES/libc2dcolorconvert_intermediates/C2DColorConverter.o vendor/qcom/opensource/media/sm8250/libc2dcolorconvert/C2DColorConverter.cpp"
Output:
^[[1mvendor/qcom/opensource/media/sm8250/libc2dcolorconvert/C2DColorConverter.cpp:555:20: ^[[0m^[[0;1;31merror: ^[[0m^[[1muse of undeclared identifier 'C2D_COLOR_FORMAT_420_P010'; did you mean 'C2D_COLOR_FORMAT_420_TP10'?^[[0m
            return C2D_COLOR_FORMAT_420_P010;
^[[0;1;32m                   ^~~~~~~~~~~~~~~~~~~~~~~~~
^[[0m^[[0;32m                   C2D_COLOR_FORMAT_420_TP10
^[[0m^[[1mvendor/qcom/opensource/display/libcopybit/c2d2.h:211:5: ^[[0m^[[0;1;30mnote: ^[[0m'C2D_COLOR_FORMAT_420_TP10' declared here^[[0m
    C2D_COLOR_FORMAT_420_TP10     = 191,
^[[0;1;32m    ^
^[[0m1 error generated.

Adding the missing profile to vendor/qcom/opensource/display/libcopybit/c2d2.h (a la https://github.com/AOSPA/android_hardware_qcom_display/commit/76f606081127e4474e0e4d20741e665e32c17bee) and the missing enums to vendor/qcom/opensource/display-commonsys-intf/libqdmetadata/qdMetaData.h (a la https://review.lineageos.org/c/LineageOS/android_hardware_qcom_display/+/268196/1/display-commonsys-intf/libqdmetadata/qdMetaData.h) "works" in that it gives me a successful build, but my device still gets stuck at the SONY screen when booted.

I am not sure if the "bricked' device is related to this issue (have logcat if interested) but this is preventing a build for EDO devices, it seems.

jerpelea commented 3 years ago

which display and kernel headers branch are you using ?

rezaetezal commented 3 years ago

They're being fetched/pulled using repo sync against https://github.com/sonyxperiadev/local_manifests/tree/android-11.0.0_r32.

This is what's there currently

<project path="vendor/qcom/opensource/display" name="hardware-qcom-display" groups="device" remote="sony" revision="aosp/LA.UM.8.1.r1" />
<project path="vendor/qcom/opensource/display-commonsys-intf" name="vendor-qcom-opensource-commonsys-intf-display" groups="device" remote="sony" revision="aosp/LA.UM.8.1.r1" />

I've attempted a build after bumping the rev to aosp/LA.UM.9.12.r1 on both paths but ended up with other, different errors.

MarijnS95 commented 3 years ago

@rezaetezal For the time being you can check out the entire local_manifests repository on the master branch and resync (don't forget to re-run repo_update.sh too - or even leverage it for doing the sync!).

We should at some point - when active contributors have more time for investigation and review - make sure the remaining display repositories can live together in the same checkout (like we do for media currently) so that all devices are buildable from the same tree without checkouts again. But for now, if you're only building Edo, sync master and it should work OOTB™.

rezaetezal commented 3 years ago

@rezaetezal For the time being you can check out the entire local_manifests repository on the master branch and resync (don't forget to re-run repo_update.sh too - or even leverage it for doing the sync!).

I have been doing the repo_update as the code is not buildable without the cherry-picks. I will use master branch and try again, and report back.

Thank you!

rezaetezal commented 3 years ago

Can confirm that the build succeeds and the resultant images are bootable when switching to the master branch.

Many thanks.