]> git.dujemihanovic.xyz Git - linux.git/commitdiff
drm/amd/pm: Hide pp_dpm_pcie device attribute
authorLijo Lazar <lijo.lazar@amd.com>
Fri, 3 Nov 2023 05:54:44 +0000 (11:24 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 9 Nov 2023 22:00:40 +0000 (17:00 -0500)
Hide PCIe DPM attribute on SOCs with GC v9.4.2 and GC v9.4.3.

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

index 1f6d2dbcca4a96bae57130354d2cd4fd1ae47afd..8257be1b94641d3f5b61125cedd69cf088411437 100644 (file)
@@ -2209,6 +2209,10 @@ static int default_attr_update(struct amdgpu_device *adev, struct amdgpu_device_
                if (amdgpu_dpm_get_apu_thermal_limit(adev, &limit) ==
                    -EOPNOTSUPP)
                        *states = ATTR_STATE_UNSUPPORTED;
+       } else if (DEVICE_ATTR_IS(pp_dpm_pcie)) {
+               if (gc_ver == IP_VERSION(9, 4, 2) ||
+                   gc_ver == IP_VERSION(9, 4, 3))
+                       *states = ATTR_STATE_UNSUPPORTED;
        }
 
        switch (gc_ver) {