]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
platform/x86/amd/pmf: Add SMU metrics table support for 1Ah family 60h model
authorShyam Sundar S K <Shyam-sundar.S-k@amd.com>
Wed, 23 Oct 2024 06:32:41 +0000 (12:02 +0530)
committerHans de Goede <hdegoede@redhat.com>
Mon, 4 Nov 2024 09:55:22 +0000 (10:55 +0100)
Add SMU metrics table support for 1Ah family 60h model. This information
will be used by the PMF driver to alter the system thermals.

Co-developed-by: Patil Rajesh Reddy <Patil.Reddy@amd.com>
Signed-off-by: Patil Rajesh Reddy <Patil.Reddy@amd.com>
Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Link: https://lore.kernel.org/r/20241023063245.1404420-2-Shyam-sundar.S-k@amd.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/x86/amd/pmf/core.c
drivers/platform/x86/amd/pmf/spc.c

index d6af0ca036f17154750812bea54a61efde11196e..347bb43a5f2b75c478482d6f6b4aa48ea23d1bd2 100644 (file)
@@ -261,6 +261,7 @@ int amd_pmf_set_dram_addr(struct amd_pmf_dev *dev, bool alloc_buffer)
                        dev->mtable_size = sizeof(dev->m_table);
                        break;
                case PCI_DEVICE_ID_AMD_1AH_M20H_ROOT:
+               case PCI_DEVICE_ID_AMD_1AH_M60H_ROOT:
                        dev->mtable_size = sizeof(dev->m_table_v2);
                        break;
                default:
index b5183969f9bf9aa0f1f227b1d248fd78806bd3f8..06226eb0eab33f3ee9e259563f207457b578cc67 100644 (file)
@@ -86,6 +86,7 @@ static void amd_pmf_get_smu_info(struct amd_pmf_dev *dev, struct ta_pmf_enact_ta
                                         ARRAY_SIZE(dev->m_table.avg_core_c0residency), in);
                break;
        case PCI_DEVICE_ID_AMD_1AH_M20H_ROOT:
+       case PCI_DEVICE_ID_AMD_1AH_M60H_ROOT:
                memcpy(&dev->m_table_v2, dev->buf, dev->mtable_size);
                in->ev_info.socket_power = dev->m_table_v2.apu_power + dev->m_table_v2.dgpu_power;
                in->ev_info.skin_temperature = dev->m_table_v2.skin_temp;