]> git.dujemihanovic.xyz Git - linux.git/commitdiff
drm/amd/pm: Add mem_busy_percent for GCv9.4.3 apu
authorAsad Kamal <asad.kamal@amd.com>
Fri, 22 Dec 2023 10:24:20 +0000 (18:24 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 4 Jan 2024 14:50:03 +0000 (09:50 -0500)
Expose sysfs entry mem_busy_percent for GC version
9.4.3 APU system

Signed-off-by: Asad Kamal <asad.kamal@amd.com>
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/pm/amdgpu_pm.c

index 49028dde0f87b13be19c093d13df7e539c91a2b4..20c53eefd680f4b01504a120de846dd5819ef606 100644 (file)
@@ -2128,7 +2128,9 @@ static int default_attr_update(struct amdgpu_device *adev, struct amdgpu_device_
                if (amdgpu_dpm_is_overdrive_supported(adev))
                        *states = ATTR_STATE_SUPPORTED;
        } else if (DEVICE_ATTR_IS(mem_busy_percent)) {
-               if (adev->flags & AMD_IS_APU || gc_ver == IP_VERSION(9, 0, 1))
+               if ((adev->flags & AMD_IS_APU &&
+                    gc_ver != IP_VERSION(9, 4, 3)) ||
+                   gc_ver == IP_VERSION(9, 0, 1))
                        *states = ATTR_STATE_UNSUPPORTED;
        } else if (DEVICE_ATTR_IS(pcie_bw)) {
                /* PCIe Perf counters won't work on APU nodes */