sibradzic / amdgpu-clocks

Simple script to control power states of amdgpu driven GPUs
GNU General Public License v2.0
393 stars 44 forks source link

Kernel driver featuremask check is too sctrict. #2

Closed sibradzic closed 5 years ago

sibradzic commented 5 years ago

The check_ppfeaturemask() is too strict, it checks for 0xffffffff, but we only need to check for 14th bit, which indicates if OverDrive is enabled (see https://github.com/torvalds/linux/blob/master/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c#L117-L118).

sibradzic commented 5 years ago

The correct check should be: [ "x$(printf '%#x' "$(($CURRENT_INT10_MASK & 0x4000))")" = "x0x4000" ]