diff options
author | Evan Quan <evan.quan@amd.com> | 2019-01-16 01:11:50 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2019-01-25 16:15:35 -0500 |
commit | 0208a105eead974acc6043dec027c08da3740e17 (patch) | |
tree | 0ad7a8e449608d4e3f2ec0d52225949b5f1cb306 /drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | |
parent | 3680b2a5b6d92747b3293ccc6783da29574147f1 (diff) |
drm/amdgpu: fix wrong APU judgement
Fix the APU judgement to make it really work as expected.
Signed-off-by: Evan Quan <evan.quan@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c index 4099c6b97cb1..250be1ef1719 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | |||
@@ -2429,7 +2429,7 @@ int amdgpu_pm_sysfs_init(struct amdgpu_device *adev) | |||
2429 | return ret; | 2429 | return ret; |
2430 | } | 2430 | } |
2431 | /* PCIe Perf counters won't work on APU nodes */ | 2431 | /* PCIe Perf counters won't work on APU nodes */ |
2432 | if (adev->flags & !AMD_IS_APU) { | 2432 | if (!(adev->flags & AMD_IS_APU)) { |
2433 | ret = device_create_file(adev->dev, &dev_attr_pcie_bw); | 2433 | ret = device_create_file(adev->dev, &dev_attr_pcie_bw); |
2434 | if (ret) { | 2434 | if (ret) { |
2435 | DRM_ERROR("failed to create device file pcie_bw\n"); | 2435 | DRM_ERROR("failed to create device file pcie_bw\n"); |
@@ -2492,7 +2492,7 @@ void amdgpu_pm_sysfs_fini(struct amdgpu_device *adev) | |||
2492 | device_remove_file(adev->dev, | 2492 | device_remove_file(adev->dev, |
2493 | &dev_attr_pp_od_clk_voltage); | 2493 | &dev_attr_pp_od_clk_voltage); |
2494 | device_remove_file(adev->dev, &dev_attr_gpu_busy_percent); | 2494 | device_remove_file(adev->dev, &dev_attr_gpu_busy_percent); |
2495 | if (adev->flags & !AMD_IS_APU) | 2495 | if (!(adev->flags & AMD_IS_APU)) |
2496 | device_remove_file(adev->dev, &dev_attr_pcie_bw); | 2496 | device_remove_file(adev->dev, &dev_attr_pcie_bw); |
2497 | if ((adev->asic_type >= CHIP_VEGA10) && | 2497 | if ((adev->asic_type >= CHIP_VEGA10) && |
2498 | !(adev->flags & AMD_IS_APU)) | 2498 | !(adev->flags & AMD_IS_APU)) |