local: MaliBridge rc4, auto local DNS, KWin render node

This commit is contained in:
openMali committed 2026-11-01 15:17:41 +08:00
1 parent 69ffc0966b
commit 9419a19c66
11 files changed
+86 -14

No files matched your search

@@ -16,7 +16,7 @@ object DeviceInfo {
val vk = VulkanInfo.query()
val gpu = GpuInfo.detect()
return listOf(
chip(), gpu(gpu), cpu(), memory(context), system(), vulkan(context, vk), drivers(context, gpu),
chip(), gpu(context, gpu), cpu(), memory(context), system(), vulkan(context, vk), drivers(context, gpu),
).filter { it.rows.isNotEmpty() }
}
@@ -51,7 +51,7 @@ object DeviceInfo {
add("Family", read("/sys/devices/soc0/family"))
})
private fun gpu(gpu: GpuInfo) = Section("GPU", buildList<Pair<String, String>> {
private fun gpu(context: Context, gpu: GpuInfo) = Section("GPU", buildList<Pair<String, String>> {
add("GPU", gpu.name)
add("Family", gpu.family.label)
add("Model found from", when (gpu.modelSource) {
@@ -66,7 +66,7 @@ object DeviceInfo {
add("Clock range", gpuRange())
add("Load", read("$kgsl/gpu_busy_percentage")?.let { if (it.endsWith("%")) it else "$it %" })
add("Temperature", read("$kgsl/temp")?.toLongOrNull()?.let { if (it > 1000) "${it / 1000} °C" else "$it °C" })
add("Support", gpu.supportText)
add("Support", gpu.supportText(SessionPrefs.vkBridge(context)))
})
private fun cpu() = Section("CPU", buildList<Pair<String, String>> {
@@ -53,6 +53,18 @@ data class GpuInfo(
Support.UNSUPPORTED -> "Not supported: DroidDeck needs an Adreno (Snapdragon) GPU"
}
fun supportText(bridge: Boolean): String = when {
support != Support.UNSUPPORTED -> supportText
bridge -> "Runs through the Mali bridge, on the phone's own Vulkan driver"
else -> "Not supported with the Mali bridge off: Turnip needs an Adreno (Snapdragon) GPU"
}
fun supportText(context: Context, bridge: Boolean): String = when {
support != Support.UNSUPPORTED -> supportText(context)
bridge -> context.getString(R.string.gpuinfo_bridge)
else -> context.getString(R.string.gpuinfo_bridge_off)
}
fun supportText(context: Context): String = context.getString(when (support) {
Support.TESTED -> R.string.gpuinfo_supported
Support.UNTESTED -> when {