Skip to content

Commit

Permalink
init_run: Add support for Intel CPU
Browse files Browse the repository at this point in the history
Signed-off-by: Rem01Gaming <[email protected]>
  • Loading branch information
Rem01Gaming committed Oct 9, 2024
1 parent 78edb1f commit b71f38f
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions share/init_run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@

# CPU info
chipset=$(grep "Hardware" /proc/cpuinfo | uniq | cut -d ':' -f 2 | sed 's/^[ \t]*//')

if [ -z "$chipset" ]; then
chipset=$(grep "model\sname" /proc/cpuinfo | uniq | cut -d ':' -f 2 | sed 's/^[ \t]*//')
fi
if [ -z "$chipset" ] && [ $ANDROID ]; then
chipset="$(getprop ro.board.platform) $(getprop ro.hardware)"
fi

Expand All @@ -29,6 +31,7 @@ case "$chipset" in
*exynos*) soc=Exynos ;;
*Unisoc* | *unisoc*) soc=Unisoc ;;
*gs*) soc=Google ;;
*intel* | *Intel*) soc=Intel ;;
*) soc=unknown ;;
esac

Expand All @@ -51,8 +54,7 @@ if [ $nr_clusters -gt 1 ]; then

if [ $(cat /sys/devices/system/cpu/cpufreq/policy$(echo ${cluster0} | awk '{print $1}')/scaling_available_frequencies | awk '{print $1}') -gt $(cat /sys/devices/system/cpu/cpufreq/policy$(echo ${cluster1} | awk '{print $1}')/scaling_available_frequencies | awk '{print $1}') ]; then
# If the frequency of cluster0 (little cpu) is bigger than cluster1 (big cpu)
# then there's a chance if it's swapped due to kernel issues
# correct it.
# then there's a chance if it's swapped, correct it.
cluster0=$(cat ${policy_folders[1]}/related_cpus 2>/dev/null)
cluster1=$(cat ${policy_folders[0]}/related_cpus 2>/dev/null)
fi
Expand Down Expand Up @@ -101,7 +103,7 @@ elif [ -d /sys/kernel/gpu ]; then
gpu=$(cat /sys/kernel/gpu/gpu_model)
fi

[ -z "$gpu" ] && [[ ! $soc == "Mediatek" ]] && gpu=$(dumpsys SurfaceFlinger | grep GLES | awk -F ': ' '{print $2}' | tr -d '\n')
[ -z "$gpu" ] && [ $ANDROID ] && [[ ! $soc == "Mediatek" ]] && gpu=$(dumpsys SurfaceFlinger | grep GLES | awk -F ': ' '{print $2}' | tr -d '\n')

if [ -z "$gpu" ]; then
gpu="Unknown"
Expand Down

0 comments on commit b71f38f

Please sign in to comment.