mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-12 10:22:12 +02:00
GPU (Linux): fixes GPU core counting on Asahi Linux
This commit is contained in:
@@ -306,7 +306,11 @@ const char* ffDrmDetectAsahi(FFGPUResult* gpu, int fd) {
|
||||
.size = sizeof(paramsGlobal),
|
||||
}) >= 0) {
|
||||
// They removed `unstable_uabi_version` from the struct. Hopefully they won't introduce new ABI changes.
|
||||
gpu->coreCount = (int32_t) (paramsGlobal.num_clusters_total * paramsGlobal.num_cores_per_cluster);
|
||||
assert(paramsGlobal.num_clusters_total <= DRM_ASAHI_MAX_CLUSTERS);
|
||||
gpu->coreCount = 0;
|
||||
for (uint32_t i = 0; i < paramsGlobal.num_clusters_total; i++) {
|
||||
gpu->coreCount += __builtin_popcountll(paramsGlobal.core_masks[i]);
|
||||
}
|
||||
gpu->frequency = paramsGlobal.max_frequency_khz / 1000;
|
||||
gpu->deviceId = ffGPUGeneral2Id(paramsGlobal.chip_id);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user