Merge remote-tracking branch 'aosp/upstream-main' into main

Pull in the latest from upstream. The first two patches are CI no-ops
while the third changes the logging tags to drmhwc for easier filtering.

* aosp/upstream-main
468a754 drm_hwcomposer: Replace LOG_TAG with drmhwc
ca89ea5 drm_hwcomposer: CI: use local container image for building
a999307 drm_hwcomposer: CI: publish docker image to local container registry

Test: Verified logcat drmhwc:D *:S shows all drm_hwc logs
Bug: None

Change-Id: I3c3df17f7779af3e6955741b33cc9b5e2052bbc2
Signed-off-by: Sean Paul <seanpaul@chromium.org>
diff --git a/.ci/Makefile b/.ci/Makefile
index a30414c..3ca7560 100644
--- a/.ci/Makefile
+++ b/.ci/Makefile
@@ -1,5 +1,5 @@
 
-BASE_DIR:=../aospless
+BASE_DIR ?=../aospless
 
 SYSTEM_INCLUDE_DIRS := /usr/include/libdrm
 
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index bdbb8be..f55499f 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,5 +1,3 @@
-image: ubuntu:23.04
-
 workflow:
   rules:
     - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
@@ -7,31 +5,38 @@
 
 variables:
   DEBIAN_FRONTEND: noninteractive
-
-before_script:
-  - apt-get --quiet update --yes >/dev/null
-  - apt-get --quiet install --yes clang-15 clang-tidy-15 clang-format-15 git libdrm-dev blueprint-tools libgtest-dev make >/dev/null
-  - apt-get --quiet install --yes clang llvm make python3 wget sudo rsync lld pkg-config ninja-build meson >/dev/null
-  - apt-get --quiet install --yes python3-mako python3-jinja2 python3-ply python3-yaml >/dev/null
+  DOCKER_IMAGE_TAG: $CI_REGISTRY_IMAGE:latest
 
 stages:
+  - build-container
   - build
   - tidy
   - style
 
+build-container:
+  stage: build-container
+  image: docker:27.0.3
+  services:
+    - docker:27.0.3-dind
+  variables:
+    DOCKER_TLS_CERTDIR: ""
+  before_script:
+    - echo "$CI_JOB_TOKEN" | docker login $CI_REGISTRY -u $CI_REGISTRY_USER --password-stdin
+  script:
+    - docker build -t $DOCKER_IMAGE_TAG -f .ci/Dockerfile .
+    - docker push $DOCKER_IMAGE_TAG
+  after_script:
+    - docker logout
+
 build:
   stage: build
+  image: $DOCKER_IMAGE_TAG
   script:
     - mkdir -p install/arm64
-    - cd ..
-    - rm -f aospless_drm_hwcomposer_arm64.tar.xz
-    - rm -rf aospless/*
-    - wget https://gitlab.freedesktop.org/drm-hwcomposer/drm-hwcomposer/uploads/28ef9379b1a0ec1ee19a17825b0f3f3f/aospless_drm_hwcomposer_arm64.tar.xz
-    - tar xf aospless_drm_hwcomposer_arm64.tar.xz
-    - rm -r aospless/src
-    - ln -s ../drm-hwcomposer/ aospless/src
-    - make -C ./aospless all
-    - cp -r aospless/install/* drm-hwcomposer/install/arm64
+    - rm ${HOME}/aospless/src
+    - ln -s ${PWD} ${HOME}/aospless/src
+    - make -C ${HOME}/aospless all
+    - cp -r ${HOME}/aospless/install/* install/arm64
 
   artifacts:
     paths:
@@ -40,17 +45,15 @@
 
 tidy:
   stage: tidy
+  image: $DOCKER_IMAGE_TAG
   script:
-    - cd ..
-    - rm -f aospless_drm_hwcomposer_arm64.tar.xz
-    - rm -rf aospless/*
-    - wget https://gitlab.freedesktop.org/drm-hwcomposer/drm-hwcomposer/uploads/28ef9379b1a0ec1ee19a17825b0f3f3f/aospless_drm_hwcomposer_arm64.tar.xz
-    - tar xf aospless_drm_hwcomposer_arm64.tar.xz
-    - cd -
-    - make -f .ci/Makefile
+    - rm ${HOME}/aospless/src
+    - ln -s ${PWD} ${HOME}/aospless/src
+    - BASE_DIR=${HOME}/aospless make -f .ci/Makefile
 
 checkstyle:
   stage: style
+  image: $DOCKER_IMAGE_TAG
   script: "./.ci/.gitlab-ci-checkcommit.sh"
   artifacts:
     when: on_failure
diff --git a/backend/BackendManager.cpp b/backend/BackendManager.cpp
index 4e2532a..23fe270 100644
--- a/backend/BackendManager.cpp
+++ b/backend/BackendManager.cpp
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#define LOG_TAG "hwc-backend"
+#define LOG_TAG "drmhwc"
 
 #include "BackendManager.h"
 
diff --git a/bufferinfo/BufferInfoGetter.cpp b/bufferinfo/BufferInfoGetter.cpp
index 726b4eb..f12db22 100644
--- a/bufferinfo/BufferInfoGetter.cpp
+++ b/bufferinfo/BufferInfoGetter.cpp
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#define LOG_TAG "hwc-buffer-info-getter"
+#define LOG_TAG "drmhwc"
 
 #include "BufferInfoGetter.h"
 
diff --git a/bufferinfo/BufferInfoMapperMetadata.cpp b/bufferinfo/BufferInfoMapperMetadata.cpp
index 823d28a..dc1b906 100644
--- a/bufferinfo/BufferInfoMapperMetadata.cpp
+++ b/bufferinfo/BufferInfoMapperMetadata.cpp
@@ -16,7 +16,7 @@
 
 #if __ANDROID_API__ >= 30
 
-#define LOG_TAG "hwc-bufferinfo-mappermetadata"
+#define LOG_TAG "drmhwc"
 
 #include "BufferInfoMapperMetadata.h"
 
diff --git a/bufferinfo/legacy/BufferInfoImagination.cpp b/bufferinfo/legacy/BufferInfoImagination.cpp
index 6d917c2..0bb0aaa 100644
--- a/bufferinfo/legacy/BufferInfoImagination.cpp
+++ b/bufferinfo/legacy/BufferInfoImagination.cpp
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#define LOG_TAG "hwc-bufferinfo-imagination"
+#define LOG_TAG "drmhwc"
 
 #include "BufferInfoImagination.h"
 
diff --git a/bufferinfo/legacy/BufferInfoLibdrm.cpp b/bufferinfo/legacy/BufferInfoLibdrm.cpp
index b314bdc..6978b08 100644
--- a/bufferinfo/legacy/BufferInfoLibdrm.cpp
+++ b/bufferinfo/legacy/BufferInfoLibdrm.cpp
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#define LOG_TAG "hwc-bufferinfo-libdrm"
+#define LOG_TAG "drmhwc"
 
 #include "BufferInfoLibdrm.h"
 
diff --git a/bufferinfo/legacy/BufferInfoMaliHisi.cpp b/bufferinfo/legacy/BufferInfoMaliHisi.cpp
index 461e2eb..bfb2e7b 100644
--- a/bufferinfo/legacy/BufferInfoMaliHisi.cpp
+++ b/bufferinfo/legacy/BufferInfoMaliHisi.cpp
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#define LOG_TAG "hwc-bufferinfo-mali-hisi"
+#define LOG_TAG "drmhwc"
 
 #include "BufferInfoMaliHisi.h"
 
diff --git a/bufferinfo/legacy/BufferInfoMaliMediatek.cpp b/bufferinfo/legacy/BufferInfoMaliMediatek.cpp
index 6dac973..4493c98 100644
--- a/bufferinfo/legacy/BufferInfoMaliMediatek.cpp
+++ b/bufferinfo/legacy/BufferInfoMaliMediatek.cpp
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#define LOG_TAG "hwc-bufferinfo-mali-mediatek"
+#define LOG_TAG "drmhwc"
 
 #include "BufferInfoMaliMediatek.h"
 
diff --git a/bufferinfo/legacy/BufferInfoMaliMeson.cpp b/bufferinfo/legacy/BufferInfoMaliMeson.cpp
index 536e5a6..aa77529 100644
--- a/bufferinfo/legacy/BufferInfoMaliMeson.cpp
+++ b/bufferinfo/legacy/BufferInfoMaliMeson.cpp
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#define LOG_TAG "hwc-bufferinfo-mali-meson"
+#define LOG_TAG "drmhwc"
 
 #include "BufferInfoMaliMeson.h"
 
diff --git a/bufferinfo/legacy/BufferInfoMinigbm.cpp b/bufferinfo/legacy/BufferInfoMinigbm.cpp
index c5a9e98..4bc4358 100644
--- a/bufferinfo/legacy/BufferInfoMinigbm.cpp
+++ b/bufferinfo/legacy/BufferInfoMinigbm.cpp
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#define LOG_TAG "hwc-bufferinfo-minigbm"
+#define LOG_TAG "drmhwc"
 
 #include "BufferInfoMinigbm.h"
 
diff --git a/compositor/DrmKmsPlan.cpp b/compositor/DrmKmsPlan.cpp
index 6289b84..4f75e89 100644
--- a/compositor/DrmKmsPlan.cpp
+++ b/compositor/DrmKmsPlan.cpp
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#define LOG_TAG "hwc-composition-drm-kms-plan"
+#define LOG_TAG "drmhwc"
 
 #include "DrmKmsPlan.h"
 
diff --git a/compositor/FlatteningController.cpp b/compositor/FlatteningController.cpp
index 257f8a0..000a240 100644
--- a/compositor/FlatteningController.cpp
+++ b/compositor/FlatteningController.cpp
@@ -29,7 +29,7 @@
  * composed by the client into a single framebuffer using GPU.
  */
 
-#define LOG_TAG "hwc-flatcon"
+#define LOG_TAG "drmhwc"
 
 #include "FlatteningController.h"
 
diff --git a/drm/DrmAtomicStateManager.cpp b/drm/DrmAtomicStateManager.cpp
index b1f8257..537f819 100644
--- a/drm/DrmAtomicStateManager.cpp
+++ b/drm/DrmAtomicStateManager.cpp
@@ -17,7 +17,7 @@
 #undef NDEBUG /* Required for assert to work */
 
 #define ATRACE_TAG ATRACE_TAG_GRAPHICS
-#define LOG_TAG "hwc-drm-atomic-state-manager"
+#define LOG_TAG "drmhwc"
 
 #include "DrmAtomicStateManager.h"
 
diff --git a/drm/DrmConnector.cpp b/drm/DrmConnector.cpp
index b396487..e459fe7 100644
--- a/drm/DrmConnector.cpp
+++ b/drm/DrmConnector.cpp
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#define LOG_TAG "hwc-drm-connector"
+#define LOG_TAG "drmhwc"
 
 #include "DrmConnector.h"
 
diff --git a/drm/DrmCrtc.cpp b/drm/DrmCrtc.cpp
index 948a9ac..ecee9e2 100644
--- a/drm/DrmCrtc.cpp
+++ b/drm/DrmCrtc.cpp
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#define LOG_TAG "hwc-drm-crtc"
+#define LOG_TAG "drmhwc"
 
 #include "DrmCrtc.h"
 
diff --git a/drm/DrmDevice.cpp b/drm/DrmDevice.cpp
index f6f0b01..4534104 100644
--- a/drm/DrmDevice.cpp
+++ b/drm/DrmDevice.cpp
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#define LOG_TAG "hwc-drm-device"
+#define LOG_TAG "drmhwc"
 
 #include "DrmDevice.h"
 
diff --git a/drm/DrmDisplayPipeline.cpp b/drm/DrmDisplayPipeline.cpp
index 1a8ad5b..2d81578 100644
--- a/drm/DrmDisplayPipeline.cpp
+++ b/drm/DrmDisplayPipeline.cpp
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#define LOG_TAG "hwc-drm-display-pipeline"
+#define LOG_TAG "drmhwc"
 
 #include "DrmDisplayPipeline.h"
 
diff --git a/drm/DrmEncoder.cpp b/drm/DrmEncoder.cpp
index 21ca693..7480ce6 100644
--- a/drm/DrmEncoder.cpp
+++ b/drm/DrmEncoder.cpp
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#define LOG_TAG "hwc-drm-encoder"
+#define LOG_TAG "drmhwc"
 
 #include "DrmEncoder.h"
 
diff --git a/drm/DrmFbImporter.cpp b/drm/DrmFbImporter.cpp
index a91a52b..3d2955b 100644
--- a/drm/DrmFbImporter.cpp
+++ b/drm/DrmFbImporter.cpp
@@ -17,7 +17,7 @@
 // NOLINTNEXTLINE(cppcoreguidelines-macro-usage)
 #define ATRACE_TAG ATRACE_TAG_GRAPHICS
 // NOLINTNEXTLINE(cppcoreguidelines-macro-usage)
-#define LOG_TAG "hwc-platform-drm-generic"
+#define LOG_TAG "drmhwc"
 
 #include "DrmFbImporter.h"
 
diff --git a/drm/DrmPlane.cpp b/drm/DrmPlane.cpp
index 19b7609..310e67b 100644
--- a/drm/DrmPlane.cpp
+++ b/drm/DrmPlane.cpp
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#define LOG_TAG "hwc-drm-plane"
+#define LOG_TAG "drmhwc"
 
 #include "DrmPlane.h"
 
diff --git a/drm/DrmProperty.cpp b/drm/DrmProperty.cpp
index 938b3ad..031918a 100644
--- a/drm/DrmProperty.cpp
+++ b/drm/DrmProperty.cpp
@@ -15,7 +15,7 @@
  */
 
 // NOLINTNEXTLINE(cppcoreguidelines-macro-usage)
-#define LOG_TAG "hwc-drm-property"
+#define LOG_TAG "drmhwc"
 
 #include "DrmProperty.h"
 
diff --git a/drm/ResourceManager.cpp b/drm/ResourceManager.cpp
index a6e9fc2..fc00bee 100644
--- a/drm/ResourceManager.cpp
+++ b/drm/ResourceManager.cpp
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#define LOG_TAG "hwc-resource-manager"
+#define LOG_TAG "drmhwc"
 
 #include "ResourceManager.h"
 
diff --git a/drm/UEventListener.cpp b/drm/UEventListener.cpp
index a05ec65..f528303 100644
--- a/drm/UEventListener.cpp
+++ b/drm/UEventListener.cpp
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#define LOG_TAG "hwc-uevent-listener"
+#define LOG_TAG "drmhwc"
 
 #include "UEventListener.h"
 
diff --git a/drm/VSyncWorker.cpp b/drm/VSyncWorker.cpp
index 10d48e3..963a37b 100644
--- a/drm/VSyncWorker.cpp
+++ b/drm/VSyncWorker.cpp
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#define LOG_TAG "hwc-vsync-worker"
+#define LOG_TAG "drmhwc"
 
 #include "VSyncWorker.h"
 
diff --git a/hwc2_device/DrmHwcTwo.cpp b/hwc2_device/DrmHwcTwo.cpp
index b151155..8837285 100644
--- a/hwc2_device/DrmHwcTwo.cpp
+++ b/hwc2_device/DrmHwcTwo.cpp
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#define LOG_TAG "hwc-drm-two"
+#define LOG_TAG "drmhwc"
 
 #include "DrmHwcTwo.h"
 
diff --git a/hwc2_device/HwcDisplay.cpp b/hwc2_device/HwcDisplay.cpp
index 6f08c33..89a8c3f 100644
--- a/hwc2_device/HwcDisplay.cpp
+++ b/hwc2_device/HwcDisplay.cpp
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#define LOG_TAG "hwc-display"
+#define LOG_TAG "drmhwc"
 #define ATRACE_TAG ATRACE_TAG_GRAPHICS
 
 #include "HwcDisplay.h"
diff --git a/hwc2_device/HwcDisplayConfigs.cpp b/hwc2_device/HwcDisplayConfigs.cpp
index f6bf4a1..3645356 100644
--- a/hwc2_device/HwcDisplayConfigs.cpp
+++ b/hwc2_device/HwcDisplayConfigs.cpp
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#define LOG_TAG "hwc-display-configs"
+#define LOG_TAG "drmhwc"
 
 #include "HwcDisplayConfigs.h"
 
diff --git a/hwc2_device/HwcLayer.cpp b/hwc2_device/HwcLayer.cpp
index 12da418..da4ce7c 100644
--- a/hwc2_device/HwcLayer.cpp
+++ b/hwc2_device/HwcLayer.cpp
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#define LOG_TAG "hwc-layer"
+#define LOG_TAG "drmhwc"
 
 #include "HwcLayer.h"
 
diff --git a/hwc2_device/hwc2_device.cpp b/hwc2_device/hwc2_device.cpp
index d4ee10d..bd2ada5 100644
--- a/hwc2_device/hwc2_device.cpp
+++ b/hwc2_device/hwc2_device.cpp
@@ -17,7 +17,7 @@
 // NOLINTNEXTLINE(cppcoreguidelines-macro-usage)
 // #define LOG_NDEBUG 0 // Uncomment to see HWC2 API calls in logcat
 
-#define LOG_TAG "hwc2-device"
+#define LOG_TAG "drmhwc"
 
 #include <cinttypes>