From 9bef8781e7589000d31226b896a9014b940b9538 Mon Sep 17 00:00:00 2001 From: Cheng Chang Date: Tue, 25 Jun 2024 09:43:41 +0000 Subject: [PATCH 1/2] gps: Set configuration by kernel version Bug: 258364350 Test: Verification at b/258364350. Test: Function verification at b/258364350. Test: Compile and verify the configuration is correct. Change-Id: I6ea5be077c749684ba35d5e41fafbc82144c5392 --- device-oriole.mk | 14 ++++- device-raven.mk | 14 ++++- location/gps.6.1.xml.oriole | 105 +++++++++++++++++++++++++++++++ location/gps.6.1.xml.raven | 105 +++++++++++++++++++++++++++++++ location/gps_user.6.1.xml.oriole | 104 ++++++++++++++++++++++++++++++ location/gps_user.6.1.xml.raven | 104 ++++++++++++++++++++++++++++++ 6 files changed, 442 insertions(+), 4 deletions(-) create mode 100644 location/gps.6.1.xml.oriole create mode 100644 location/gps.6.1.xml.raven create mode 100644 location/gps_user.6.1.xml.oriole create mode 100644 location/gps_user.6.1.xml.raven diff --git a/device-oriole.mk b/device-oriole.mk index 0b74ed1..f41eb7e 100644 --- a/device-oriole.mk +++ b/device-oriole.mk @@ -281,11 +281,21 @@ PRODUCT_PRODUCT_PROPERTIES += \ # Location ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT))) + ifneq (,$(filter 6.1, $(TARGET_LINUX_KERNEL_VERSION))) PRODUCT_COPY_FILES += \ - device/google/raviole/location/gps.xml.oriole:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/gps.xml + device/google/raviole/location/gps.6.1.xml.oriole:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/gps.xml + else + PRODUCT_COPY_FILES += \ + device/google/raviole/location/gps.xml.oriole:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/gps.xml + endif else + ifneq (,$(filter 6.1, $(TARGET_LINUX_KERNEL_VERSION))) PRODUCT_COPY_FILES += \ - device/google/raviole/location/gps_user.xml.oriole:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/gps.xml + device/google/raviole/location/gps_user.6.1.xml.oriole:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/gps.xml + else + PRODUCT_COPY_FILES += \ + device/google/raviole/location/gps_user.xml.oriole:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/gps.xml + endif endif # Enable DeviceAsWebcam support diff --git a/device-raven.mk b/device-raven.mk index 8382360..6d90b66 100644 --- a/device-raven.mk +++ b/device-raven.mk @@ -292,11 +292,21 @@ PRODUCT_PRODUCT_PROPERTIES += \ # Location ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT))) + ifneq (,$(filter 6.1, $(TARGET_LINUX_KERNEL_VERSION))) PRODUCT_COPY_FILES += \ - device/google/raviole/location/gps.xml.raven:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/gps.xml + device/google/raviole/location/gps.6.1.xml.raven:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/gps.xml + else + PRODUCT_COPY_FILES += \ + device/google/raviole/location/gps.xml.raven:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/gps.xml + endif else + ifneq (,$(filter 6.1, $(TARGET_LINUX_KERNEL_VERSION))) PRODUCT_COPY_FILES += \ - device/google/raviole/location/gps_user.xml.raven:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/gps.xml + device/google/raviole/location/gps_user.6.1.xml.raven:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/gps.xml + else + PRODUCT_COPY_FILES += \ + device/google/raviole/location/gps_user.xml.raven:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/gps.xml + endif endif # Enable DeviceAsWebcam support diff --git a/location/gps.6.1.xml.oriole b/location/gps.6.1.xml.oriole new file mode 100644 index 0000000..34a4552 --- /dev/null +++ b/location/gps.6.1.xml.oriole @@ -0,0 +1,105 @@ + + + + + + + + + + diff --git a/location/gps.6.1.xml.raven b/location/gps.6.1.xml.raven new file mode 100644 index 0000000..da9c8b4 --- /dev/null +++ b/location/gps.6.1.xml.raven @@ -0,0 +1,105 @@ + + + + + + + + + + diff --git a/location/gps_user.6.1.xml.oriole b/location/gps_user.6.1.xml.oriole new file mode 100644 index 0000000..2307636 --- /dev/null +++ b/location/gps_user.6.1.xml.oriole @@ -0,0 +1,104 @@ + + + + + + + + + + diff --git a/location/gps_user.6.1.xml.raven b/location/gps_user.6.1.xml.raven new file mode 100644 index 0000000..00d9b45 --- /dev/null +++ b/location/gps_user.6.1.xml.raven @@ -0,0 +1,104 @@ + + + + + + + + + + From 065a8c2c8ddb9338cbc3737a5ac929cf169cfc94 Mon Sep 17 00:00:00 2001 From: Rick Yiu Date: Tue, 2 Jul 2024 08:50:11 +0000 Subject: [PATCH 2/2] Remove NewlyIdleBalancer NewlyIdleBalancer is not supported in kernel 6.1, so remvoe it. Besides, the newly idle balance is mainly for ADPF now, the power impact should be much less than before. Bug: 350212757 Test: build pass Change-Id: Ib952e2c492fbc65b2529d997c511631c341e2a34 --- powerhint-oriole.json | 32 -------------------------------- powerhint-raven.json | 32 -------------------------------- 2 files changed, 64 deletions(-) diff --git a/powerhint-oriole.json b/powerhint-oriole.json index 9264d09..bdca86d 100644 --- a/powerhint-oriole.json +++ b/powerhint-oriole.json @@ -319,14 +319,6 @@ ], "ResetOnInit": true }, - { - "Name": "NewlyIdleBalancer", - "Path": "/proc/vendor_sched/idle_balancer", - "Values": [ - "0", - "1" - ] - }, { "Name": "LimitFlashCurrent", "Path": "vendor.camera.max_flash_current", @@ -1070,12 +1062,6 @@ "Duration": 0, "Value": "0" }, - { - "PowerHint": "CAMERA_STREAMING_EXTREME", - "Node": "NewlyIdleBalancer", - "Duration": 0, - "Value": "0" - }, { "PowerHint": "CAMERA_STREAMING_HIGH", "Node": "PowerHALCameraRunning", @@ -1148,12 +1134,6 @@ "Duration": 0, "Value": "0" }, - { - "PowerHint": "CAMERA_STREAMING_HIGH", - "Node": "NewlyIdleBalancer", - "Duration": 0, - "Value": "0" - }, { "PowerHint": "CAMERA_STREAMING_STANDARD", "Node": "PowerHALCameraRunning", @@ -1208,12 +1188,6 @@ "Duration": 0, "Value": "0" }, - { - "PowerHint": "CAMERA_STREAMING_STANDARD", - "Node": "NewlyIdleBalancer", - "Duration": 0, - "Value": "0" - }, { "PowerHint": "CAMERA_STREAMING_LOW", "Node": "PowerHALCameraRunning", @@ -1274,12 +1248,6 @@ "Duration": 0, "Value": "0" }, - { - "PowerHint": "CAMERA_STREAMING_LOW", - "Node": "NewlyIdleBalancer", - "Duration": 0, - "Value": "0" - }, { "PowerHint": "CAMERA_VIDEO_RECORDING", "Type": "MaskHint", diff --git a/powerhint-raven.json b/powerhint-raven.json index af6d3c7..1470f54 100644 --- a/powerhint-raven.json +++ b/powerhint-raven.json @@ -318,14 +318,6 @@ ], "ResetOnInit": true }, - { - "Name": "NewlyIdleBalancer", - "Path": "/proc/vendor_sched/idle_balancer", - "Values": [ - "0", - "1" - ] - }, { "Name": "LimitFlashCurrent", "Path": "vendor.camera.max_flash_current", @@ -1069,12 +1061,6 @@ "Duration": 0, "Value": "0" }, - { - "PowerHint": "CAMERA_STREAMING_EXTREME", - "Node": "NewlyIdleBalancer", - "Duration": 0, - "Value": "0" - }, { "PowerHint": "CAMERA_STREAMING_HIGH", "Node": "PowerHALCameraRunning", @@ -1147,12 +1133,6 @@ "Duration": 0, "Value": "0" }, - { - "PowerHint": "CAMERA_STREAMING_HIGH", - "Node": "NewlyIdleBalancer", - "Duration": 0, - "Value": "0" - }, { "PowerHint": "CAMERA_STREAMING_STANDARD", "Node": "PowerHALCameraRunning", @@ -1207,12 +1187,6 @@ "Duration": 0, "Value": "0" }, - { - "PowerHint": "CAMERA_STREAMING_STANDARD", - "Node": "NewlyIdleBalancer", - "Duration": 0, - "Value": "0" - }, { "PowerHint": "CAMERA_STREAMING_LOW", "Node": "PowerHALCameraRunning", @@ -1273,12 +1247,6 @@ "Duration": 0, "Value": "0" }, - { - "PowerHint": "CAMERA_STREAMING_LOW", - "Node": "NewlyIdleBalancer", - "Duration": 0, - "Value": "0" - }, { "PowerHint": "CAMERA_VIDEO_RECORDING", "Type": "MaskHint",