Closed tomasbrod closed 6 years ago
Sorry for inconvenience, I just looked at it and it seems I just copied it from __write_card_pp
and forgot to implement it. Will fix it soon.
You do not have to hurry. I just found that plain reading the pp_table and writing the same data back will crash the driver (rx560), so I won't be able to use this tool anyway.
You can email me your pp_table and I can check it out locally (and add it to tests). I remember fixing a similar bug where the library corrupted the table as well.
I used dd/cat for that exercise.
cat /sys/class/drm/card0/device/pp_table >pp_table
cat pp_table >/sys/class/drm/card0/device/pp_table
Which crashed the driver (null pointer, but somehow no panic).
Your tool behaves correctly after patching the function with a hard-coded path.
You should patch the function and upload the commit.
This bug has been fixed with commit 2a4ff77e092af9fc1f8895b09616460f0f0ea220 and with pull request https://github.com/kobalicek/amdtweak/pull/10. This bug should be closed now.
write_file_pp
command seems broken. Says to accept 1 argument, but checks for 0. And it seems to try to write the table back to live driver, instead of user's file. Saving to file is important for backup-restore purposes and also to verify the program operation before committing a change to live card.