From: Evan Quan Date: Wed, 16 Jan 2019 06:11:50 +0000 (+0800) Subject: drm/amdgpu: fix wrong APU judgement X-Git-Tag: v5.15~6763^2~26^2~40 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0208a105eead974acc6043dec027c08da3740e17;p=platform%2Fkernel%2Flinux-starfive.git drm/amdgpu: fix wrong APU judgement Fix the APU judgement to make it really work as expected. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c index 4099c6b..250be1e 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) return ret; } /* PCIe Perf counters won't work on APU nodes */ - if (adev->flags & !AMD_IS_APU) { + if (!(adev->flags & AMD_IS_APU)) { ret = device_create_file(adev->dev, &dev_attr_pcie_bw); if (ret) { DRM_ERROR("failed to create device file pcie_bw\n"); @@ -2492,7 +2492,7 @@ void amdgpu_pm_sysfs_fini(struct amdgpu_device *adev) device_remove_file(adev->dev, &dev_attr_pp_od_clk_voltage); device_remove_file(adev->dev, &dev_attr_gpu_busy_percent); - if (adev->flags & !AMD_IS_APU) + if (!(adev->flags & AMD_IS_APU)) device_remove_file(adev->dev, &dev_attr_pcie_bw); if ((adev->asic_type >= CHIP_VEGA10) && !(adev->flags & AMD_IS_APU))