drm/amdgpu: only check for _PR3 on dGPUs

Limonciello, Mario mario.limonciello at amd.com
Wed Mar 9 21:46:30 UTC 2022


On 3/9/2022 14:12, Alex Deucher wrote:
> We don't support runtime pm on APUs.  They support more
> dynamic power savings using clock and powergating.
> 
> Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 ++++--
>   1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index ddc5cd61af58..1b313a95c7e5 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -2159,8 +2159,10 @@ static int amdgpu_device_ip_early_init(struct amdgpu_device *adev)
>   	    !pci_is_thunderbolt_attached(to_pci_dev(dev->dev)))
>   		adev->flags |= AMD_IS_PX;
>   
> -	parent = pci_upstream_bridge(adev->pdev);
> -	adev->has_pr3 = parent ? pci_pr3_present(parent) : false;
> +	if (!(adev->flags & AMD_IS_APU)) {
> +		parent = pci_upstream_bridge(adev->pdev);
> +		adev->has_pr3 = parent ? pci_pr3_present(parent) : false;
> +	}
>   
>   	amdgpu_amdkfd_device_probe(adev);
>   

Reviewed-by: Mario Limonciello <mario.limonciello at amd.com>

I also confirmed this fixes the smartshift bias attribute from exporting 
on an APU program it shouldn't.

Tested-by: Mario Limonciello <mario.limonciello at amd.com>


More information about the amd-gfx mailing list