From 1830a99ad22195b5993d782ca99189f83b89c3a4 Mon Sep 17 00:00:00 2001 From: James Huang Date: Sun, 20 Oct 2024 20:57:25 +0800 Subject: [PATCH 1/2] gps: Update official release 4.15.3_7_241024_R1 config on P24 Add Chip_Configuration_ntn_option=2 bug: 369951938 Test: NTN test Change-Id: Ieae21e4716d39c7e1b73ae6128032abcbcfa689a --- location/caiman/user/gps.cfg | 1 + location/caiman/userdebug/gps.cfg | 5 +++++ location/komodo/user/gps.cfg | 1 + location/komodo/userdebug/gps.cfg | 5 +++++ location/ripcurrent24/user/gps.cfg | 1 + location/ripcurrent24/userdebug/gps.cfg | 5 +++++ location/ripcurrentpro/user/gps.cfg | 1 + location/ripcurrentpro/userdebug/gps.cfg | 5 +++++ location/tokay/user/gps.cfg | 1 + location/tokay/userdebug/gps.cfg | 5 +++++ 10 files changed, 30 insertions(+) diff --git a/location/caiman/user/gps.cfg b/location/caiman/user/gps.cfg index c0c7f740..d329a77b 100644 --- a/location/caiman/user/gps.cfg +++ b/location/caiman/user/gps.cfg @@ -29,6 +29,7 @@ Chip_Configuration_DCXO_CrystalType=0x11 Chip_Configuration_GNSSConstConstraintDef = 0x60FF LocTech_Constraints = 0x60FF Chip_Configuration_RfMiscCtrl = 0x80008001 +Chip_Configuration_ntn_option=2 bdsUsedInUSPolicy=2 sbasUsedInUSPolicy=2 qzssUsedInUSPolicy=2 diff --git a/location/caiman/userdebug/gps.cfg b/location/caiman/userdebug/gps.cfg index c373b124..61c7f3ed 100644 --- a/location/caiman/userdebug/gps.cfg +++ b/location/caiman/userdebug/gps.cfg @@ -115,6 +115,11 @@ Chip_Configuration_RfMiscCtrl = 0x80008001 #Chip_Configuration_RfMiscCtrl=0x8001 #Chip_Configuration_IspTestConfig=0x22242822 +#Chip_Configuration_ntn_option=0 means no NTN blackout IPC handling +#Chip_Configuration_ntn_option=1 means L1 blanking during NTN blackout period. +#Chip_Configuration_ntn_option=2 means turning GNSS off during NTN blackout period. +Chip_Configuration_ntn_option=2 + # Disable BDS in the U.S. # 0-enabled (default), 1-disabled, 2-auto(disabled in US) #gloUsedInUSPolicy=2 diff --git a/location/komodo/user/gps.cfg b/location/komodo/user/gps.cfg index 8efa8092..f9e6e7c6 100644 --- a/location/komodo/user/gps.cfg +++ b/location/komodo/user/gps.cfg @@ -29,6 +29,7 @@ Chip_Configuration_DCXO_CrystalType=0x11 Chip_Configuration_GNSSConstConstraintDef = 0x60FF LocTech_Constraints = 0x60FF Chip_Configuration_RfMiscCtrl = 0x80008001 +Chip_Configuration_ntn_option=2 bdsUsedInUSPolicy=2 sbasUsedInUSPolicy=2 qzssUsedInUSPolicy=2 diff --git a/location/komodo/userdebug/gps.cfg b/location/komodo/userdebug/gps.cfg index e0ce7ba6..3aae35e8 100644 --- a/location/komodo/userdebug/gps.cfg +++ b/location/komodo/userdebug/gps.cfg @@ -115,6 +115,11 @@ Chip_Configuration_RfMiscCtrl = 0x80008001 #Chip_Configuration_RfMiscCtrl=0x8001 #Chip_Configuration_IspTestConfig=0x22242822 +#Chip_Configuration_ntn_option=0 means no NTN blackout IPC handling +#Chip_Configuration_ntn_option=1 means L1 blanking during NTN blackout period. +#Chip_Configuration_ntn_option=2 means turning GNSS off during NTN blackout period. +Chip_Configuration_ntn_option=2 + # Disable BDS in the U.S. # 0-enabled (default), 1-disabled, 2-auto(disabled in US) #gloUsedInUSPolicy=2 diff --git a/location/ripcurrent24/user/gps.cfg b/location/ripcurrent24/user/gps.cfg index 554454cd..bd26a81f 100644 --- a/location/ripcurrent24/user/gps.cfg +++ b/location/ripcurrent24/user/gps.cfg @@ -29,6 +29,7 @@ Chip_Configuration_DCXO_CrystalType=0x11 Chip_Configuration_GNSSConstConstraintDef = 0x60FF LocTech_Constraints = 0x60FF Chip_Configuration_RfMiscCtrl = 0x80008001 +Chip_Configuration_ntn_option=2 bdsUsedInUSPolicy=2 sbasUsedInUSPolicy=2 qzssUsedInUSPolicy=2 diff --git a/location/ripcurrent24/userdebug/gps.cfg b/location/ripcurrent24/userdebug/gps.cfg index d99fc8e0..f6ff481f 100644 --- a/location/ripcurrent24/userdebug/gps.cfg +++ b/location/ripcurrent24/userdebug/gps.cfg @@ -115,6 +115,11 @@ Chip_Configuration_RfMiscCtrl = 0x80008001 #Chip_Configuration_RfMiscCtrl=0x8001 #Chip_Configuration_IspTestConfig=0x22242822 +#Chip_Configuration_ntn_option=0 means no NTN blackout IPC handling +#Chip_Configuration_ntn_option=1 means L1 blanking during NTN blackout period. +#Chip_Configuration_ntn_option=2 means turning GNSS off during NTN blackout period. +Chip_Configuration_ntn_option=2 + # Disable BDS in the U.S. # 0-enabled (default), 1-disabled, 2-auto(disabled in US) #gloUsedInUSPolicy=2 diff --git a/location/ripcurrentpro/user/gps.cfg b/location/ripcurrentpro/user/gps.cfg index 554454cd..bd26a81f 100644 --- a/location/ripcurrentpro/user/gps.cfg +++ b/location/ripcurrentpro/user/gps.cfg @@ -29,6 +29,7 @@ Chip_Configuration_DCXO_CrystalType=0x11 Chip_Configuration_GNSSConstConstraintDef = 0x60FF LocTech_Constraints = 0x60FF Chip_Configuration_RfMiscCtrl = 0x80008001 +Chip_Configuration_ntn_option=2 bdsUsedInUSPolicy=2 sbasUsedInUSPolicy=2 qzssUsedInUSPolicy=2 diff --git a/location/ripcurrentpro/userdebug/gps.cfg b/location/ripcurrentpro/userdebug/gps.cfg index d99fc8e0..f6ff481f 100644 --- a/location/ripcurrentpro/userdebug/gps.cfg +++ b/location/ripcurrentpro/userdebug/gps.cfg @@ -115,6 +115,11 @@ Chip_Configuration_RfMiscCtrl = 0x80008001 #Chip_Configuration_RfMiscCtrl=0x8001 #Chip_Configuration_IspTestConfig=0x22242822 +#Chip_Configuration_ntn_option=0 means no NTN blackout IPC handling +#Chip_Configuration_ntn_option=1 means L1 blanking during NTN blackout period. +#Chip_Configuration_ntn_option=2 means turning GNSS off during NTN blackout period. +Chip_Configuration_ntn_option=2 + # Disable BDS in the U.S. # 0-enabled (default), 1-disabled, 2-auto(disabled in US) #gloUsedInUSPolicy=2 diff --git a/location/tokay/user/gps.cfg b/location/tokay/user/gps.cfg index 9f4f8775..cf7ed87e 100644 --- a/location/tokay/user/gps.cfg +++ b/location/tokay/user/gps.cfg @@ -29,6 +29,7 @@ Chip_Configuration_DCXO_CrystalType=0x11 Chip_Configuration_GNSSConstConstraintDef = 0x60FF LocTech_Constraints = 0x60FF Chip_Configuration_RfMiscCtrl = 0x80008001 +Chip_Configuration_ntn_option=2 bdsUsedInUSPolicy=2 sbasUsedInUSPolicy=2 qzssUsedInUSPolicy=2 diff --git a/location/tokay/userdebug/gps.cfg b/location/tokay/userdebug/gps.cfg index 6661b9b5..1389d995 100644 --- a/location/tokay/userdebug/gps.cfg +++ b/location/tokay/userdebug/gps.cfg @@ -115,6 +115,11 @@ Chip_Configuration_RfMiscCtrl = 0x80008001 #Chip_Configuration_RfMiscCtrl=0x8001 #Chip_Configuration_IspTestConfig=0x22242822 +#Chip_Configuration_ntn_option=0 means no NTN blackout IPC handling +#Chip_Configuration_ntn_option=1 means L1 blanking during NTN blackout period. +#Chip_Configuration_ntn_option=2 means turning GNSS off during NTN blackout period. +Chip_Configuration_ntn_option=2 + # Disable BDS in the U.S. # 0-enabled (default), 1-disabled, 2-auto(disabled in US) #gloUsedInUSPolicy=2 From 20ca16779a1824bdfd100ed72d1b97d57164c50f Mon Sep 17 00:00:00 2001 From: Richard Chang Date: Tue, 29 Oct 2024 08:25:10 +0000 Subject: [PATCH 2/2] powerhint: Add WriteOnly flag for PA_KILL to avoid SELinux error The node "/sys/kernel/vendor_mm/pa_kill/reclaim_kb" is write-only. So we need to add WriteOnly flag to prevent powerhal to read the node. SELinux errors: avc: denied { dac_read_search } for comm="android.hardwar" capability=2 scontext=u:r:hal_power_default:s0 tcontext=u:r:hal_power_default:s0 tclass=capability permissive=0 avc: denied { dac_override } for comm="android.hardwar" capability=1 scontext=u:r:hal_power_default:s0 tcontext=u:r:hal_power_default:s0 tclass=capability permissive=0 Bug: 350830411 Change-Id: Ic78a419b1500efce631e848d36816bc87d666920 Test: adb shell dumpsys android.hardware.power.IPower/default, check if any avc denied messages Flag: EXEMPT config json change --- perf/powerhint-caiman.json | 1 + perf/powerhint-komodo.json | 1 + perf/powerhint-ripcurrent24.json | 1 + perf/powerhint-ripcurrentpro.json | 1 + perf/powerhint-tokay.json | 1 + perf/powerhint-zuma.json | 1 + 6 files changed, 6 insertions(+) diff --git a/perf/powerhint-caiman.json b/perf/powerhint-caiman.json index 5f2e974e..30f94955 100644 --- a/perf/powerhint-caiman.json +++ b/perf/powerhint-caiman.json @@ -958,6 +958,7 @@ "102400", "0" ], + "WriteOnly": true, "ResetOnInit": false }, { diff --git a/perf/powerhint-komodo.json b/perf/powerhint-komodo.json index ed65ab01..86dae6e0 100644 --- a/perf/powerhint-komodo.json +++ b/perf/powerhint-komodo.json @@ -958,6 +958,7 @@ "102400", "0" ], + "WriteOnly": true, "ResetOnInit": false }, { diff --git a/perf/powerhint-ripcurrent24.json b/perf/powerhint-ripcurrent24.json index ccab4c15..d1a2e484 100644 --- a/perf/powerhint-ripcurrent24.json +++ b/perf/powerhint-ripcurrent24.json @@ -612,6 +612,7 @@ "102400", "0" ], + "WriteOnly": true, "ResetOnInit": false } ], diff --git a/perf/powerhint-ripcurrentpro.json b/perf/powerhint-ripcurrentpro.json index 92bdfd14..5b7f18ff 100644 --- a/perf/powerhint-ripcurrentpro.json +++ b/perf/powerhint-ripcurrentpro.json @@ -882,6 +882,7 @@ "102400", "0" ], + "WriteOnly": true, "ResetOnInit": false }, { diff --git a/perf/powerhint-tokay.json b/perf/powerhint-tokay.json index 7504d48a..47ceaae8 100644 --- a/perf/powerhint-tokay.json +++ b/perf/powerhint-tokay.json @@ -958,6 +958,7 @@ "102400", "0" ], + "WriteOnly": true, "ResetOnInit": false }, { diff --git a/perf/powerhint-zuma.json b/perf/powerhint-zuma.json index 81374c04..1a75c204 100644 --- a/perf/powerhint-zuma.json +++ b/perf/powerhint-zuma.json @@ -796,6 +796,7 @@ "102400", "0" ], + "WriteOnly": true, "ResetOnInit": false } ],