Date: Wed, 4 Oct 2017 18:15:05 +0300 From: Vasily Postnicov <shamaz.mazum@gmail.com> To: freebsd-hackers@freebsd.org Subject: hwmon status in FreeBSD and radeon driver. Message-ID: <CADnZ6BkqBgwoe4vJwidFxv1TaBg_z_EfffDBUwt4Q%2BZGEVdaYg@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
--001a11442d34a29f5f055aba12b7 Content-Type: text/plain; charset="UTF-8" Hello. I have created a thread on FreeBSD forums but was redirected here. Its about temperature sensors for AMD Radeon graphic cards which is present in FreeBSD code but is surrounded by #ifdef FREEBSD_WIP ... #endif macros. It relays on hwmon from Linux and does not work. I suggest to replace hwmon-dependent parts with traditional sysctl variables either temporary or permanently (which depends on status of hwmon in FreeBSD, in other words are there plans to port it or not). https://forums.freebsd.org/threads/62714/ I would like to send a patch but I do not know how to deal with hwmon parts. I attach a patch which I use on my system --001a11442d34a29f5f055aba12b7 Content-Type: text/x-patch; charset="US-ASCII"; name="0001-Unlock-temperature-sensors-for-radeon.patch" Content-Disposition: attachment; filename="0001-Unlock-temperature-sensors-for-radeon.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_j8d6cl3d0 RnJvbSBkMTcyOTcyMjEyMmM2YWViNzcwZDg0ZDFjMTM3NGM4OTAyMzY0ZmU0IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBDaGFybGllIFJvb3QgPHNoYW1hei5tYXp1bUBnbWFpbC5jb20+ CkRhdGU6IE1vbiwgMiBPY3QgMjAxNyAyMDo0NzowMSArMDMwMApTdWJqZWN0OiBbUEFUQ0hdIFVu bG9jayB0ZW1wZXJhdHVyZSBzZW5zb3JzIGZvciByYWRlb24KCi0tLQogc3lzL2Rldi9kcm0yL3Jh ZGVvbi9yYWRlb25fcG0uYyB8IDQ1ICsrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysr KysrKysrCiAxIGZpbGUgY2hhbmdlZCwgNDUgaW5zZXJ0aW9ucygrKQoKZGlmZiAt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RldiwgIkFkZGluZyB0ZW1wZXJhdHVyZSBzeXNjdGxcbiIpOworICAgICAgICBTWVNDVExf QUREX1BST0MgKGRldmljZV9nZXRfc3lzY3RsX2N0eCAocmRldi0+ZGV2KSwKKyAgICAgICAgICAg ICAgICAgICAgICAgICBTWVNDVExfQ0hJTERSRU4oZGV2aWNlX2dldF9zeXNjdGxfdHJlZSAocmRl di0+ZGV2KSksIE9JRF9BVVRPLAorICAgICAgICAgICAgICAgICAgICAgICAgICJ0ZW1wZXJhdHVy ZSIsIENUTEZMQUdfUkQgfCBDVExUWVBFX0lOVCwgcmRldi0+ZGV2LCBzaXplb2YgKHJkZXYtPmRl diksCisgICAgICAgICAgICAgICAgICAgICAgICAgc3lzY3RsX3JhZGVvbl90ZW1wLCAiSUszIiwg IlJhZGVvbiBjYXJkIHRlbXBlcmF0dXJlIik7CiAjZW5kaWYgLyogRlJFRUJTRF9XSVAgKi8KIAkJ YnJlYWs7CiAJZGVmYXVsdDoKLS0gCjIuMTQuMQoK --001a11442d34a29f5f055aba12b7--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CADnZ6BkqBgwoe4vJwidFxv1TaBg_z_EfffDBUwt4Q%2BZGEVdaYg>