Skip to content

device: replace imgtec thermal hal with ti specific one

Mattijs Korpershoek requested to merge mkorpershoek/thermal into ti-android-12

The imgtec thermal hal does not report any temperature sensors according to dumpsys thermalservice:

E ThermalHalWrapper: Couldn't get temperatures because of HAL error: Failed to read temperature data

However, we have 2 thermal zones on am62x:

console:/sys/class/thermal # grep . */temp
thermal_zone0/temp:39683
thermal_zone1/temp:38046
  • thermal_zone0: is the aggregation of all 4 CPUs
  • thermal_zone1: is close to the DDR

Use a custom, ti specific thermal HAL so that both thermal zones are handled by Android.

Test: dumpsys thermalservice # reports temperatures

      # Current temperatures from HAL:
      #         Temperature{mValue=41.077, mType=0, mName=main0-thermal, mStatus=0}
      #         Temperature{mValue=39.216, mType=5, mName=main1-thermal, mStatus=0}

Signed-off-by: Mattijs Korpershoek mkorpershoek@baylibre.com

Also tested with VTS:

Running main() from external/googletest/googletest/src/gtest_main.cc
[==========] Running 6 tests from 1 test suite.
[----------] Global test environment set-up.
[----------] 6 tests from PerInstance/ThermalHidlTest
[ RUN      ] PerInstance/ThermalHidlTest.NotifyThrottlingTest/0_default
[       OK ] PerInstance/ThermalHidlTest.NotifyThrottlingTest/0_default (6 ms)
[ RUN      ] PerInstance/ThermalHidlTest.RegisterThermalChangedCallbackTest/0_default
[       OK ] PerInstance/ThermalHidlTest.RegisterThermalChangedCallbackTest/0_default (10 ms)
[ RUN      ] PerInstance/ThermalHidlTest.UnregisterThermalChangedCallbackTest/0_default
[       OK ] PerInstance/ThermalHidlTest.UnregisterThermalChangedCallbackTest/0_default (9 ms)
[ RUN      ] PerInstance/ThermalHidlTest.TemperatureTest/0_default
[       OK ] PerInstance/ThermalHidlTest.TemperatureTest/0_default (6 ms)
[ RUN      ] PerInstance/ThermalHidlTest.TemperatureThresholdTest/0_default
[       OK ] PerInstance/ThermalHidlTest.TemperatureThresholdTest/0_default (5 ms)
[ RUN      ] PerInstance/ThermalHidlTest.CoolingDeviceTest/0_default
[       OK ] PerInstance/ThermalHidlTest.CoolingDeviceTest/0_default (4 ms)
[----------] 6 tests from PerInstance/ThermalHidlTest (46 ms total)

[----------] Global test environment tear-down
[==========] 6 tests from 1 test suite ran. (47 ms total)
[  PASSED  ] 6 tests.

Note: cooling devices are unsupported because we have none in sys/class/thermal/ for am62x.

Bug: TIAU-261

Series:

Edited by Mattijs Korpershoek

Merge request reports