AsteroidOS / meta-smartwatch

OpenEmbedded layer that provides support for various smartwatches.
26 stars 18 forks source link

catfish: Move to an Android 9 base. #109

Closed MagneFire closed 1 year ago

MagneFire commented 2 years ago

Like the title says. This is the first port to properly use a patched hybris for Android 9.

Currently in testing and depends on:

For now it appears to perform slower than the current build, this is because the hybris work doesn't incorporate https://github.com/AsteroidOS/android_hardware_qcom_display/commit/9052e3bac0cc4d1553f55bdf81abfb8aa2066dd8 since it no longer depends on a patched hwcomposer. This means that we need to find a different solution to the problem since at the time it appeared to be resizing of the framebuffer related.

This work adds support for some components that are not supported in current builds:

I'm not sure when/if we want to merge this since it has the UI performance regression.

MagneFire commented 2 years ago

I've done some debugging and it turns out that we cannot solve the performance issue by patching the hwcomposer (https://github.com/AsteroidOS/android_hardware_qcom_display/commit/9052e3bac0cc4d1553f55bdf81abfb8aa2066dd8 and https://github.com/AsteroidOS/android_system_core/commit/e2781ab79687d040d9301e0c5b8c3822e2da6fa3). Said patches no longer effect the performance since the relevant hwcomposer code has been replaced entirely as part of the hwcomposer 2 API (https://android.googlesource.com/platform/hardware/qcom/display/+/d39a514dd0540cf47e121775a77e9ac1b578bdb1%5E%21/).

MagneFire commented 1 year ago

The most recent changes are:

Here's an insight on how often the GPU clock frequencies change:

/ # cat /sys/class/kgsl/kgsl-3d0/devfreq/trans_stat 
   From  :   To
         :19200000200000000307200000   time(ms)
 19200000:       0       0       0         0
*200000000:       0       0      33    139450
 307200000:       0      33       0    206140
Total transition : 66

It mostly stays at 200000000 when on the homescreen/watchface and will jump to 307200000 upon user interaction. Resource heavy applications like the settings app will also keep it at 307200000.

The latter has improved the performance to a state where I'm happy to merge this PR.