fix: Better handle drm path, fixes issues with DisplayLink

This commit is contained in:
Kyle Gospodnetich 2023-12-23 20:17:12 -08:00
parent 4c8034f5a6
commit 79756279aa

View File

@ -50,18 +50,18 @@ index 296996e..ae0ae3e 100755
if [[ "$WRITE_PATH" == /sys/class/drm/card*/device/power_dpm_force_performance_level ]]; then if [[ "$WRITE_PATH" == /sys/class/drm/card*/device/power_dpm_force_performance_level ]]; then
- CommitWrite - CommitWrite
+ for i in $(ls /sys/class/drm/): + for i in $(ls /sys/class/drm/card*/device/power_dpm_force_performance_level)
+ do + do
+ WRITE_PATH="/sys/class/drm/$i/device/power_dpm_force_performance_level" + WRITE_PATH="$i"
+ CommitWrite + CommitWrite
+ done + done
fi fi
if [[ "$WRITE_PATH" == /sys/class/drm/card*/device/pp_od_clk_voltage ]]; then if [[ "$WRITE_PATH" == /sys/class/drm/card*/device/pp_od_clk_voltage ]]; then
- CommitWrite - CommitWrite
+ for i in $(ls /sys/class/drm/): + for i in $(ls /sys/class/drm/card*/device/pp_od_clk_voltage)
+ do + do
+ WRITE_PATH="/sys/class/drm/$i/device/pp_od_clk_voltage" + WRITE_PATH="$i"
+ CommitWrite + CommitWrite
+ done + done
fi fi