From: Shiwu Zhang Date: Mon, 22 May 2023 09:11:59 +0000 (+0800) Subject: drm/amdgpu: set the APU flag based on package type X-Git-Tag: microblaze-v6.6~31^2~12^2~174 X-Git-Url: http://git.monstr.eu/?a=commitdiff_plain;h=20997c04b7168b1833da77f882eb5a6f246c4b96;p=linux-2.6-microblaze.git drm/amdgpu: set the APU flag based on package type Since currently APU and dGPU share the same pcie class while gmc init needs the flag to set up correctly for upcomming memory allocations v2: call get_pkg_type in smuio 13_0_3 is enough (hawking) Signed-off-by: Shiwu Zhang Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c index a0685a5ebda6..859882109f55 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c @@ -2500,6 +2500,9 @@ int amdgpu_discovery_set_ip_blocks(struct amdgpu_device *adev) break; case IP_VERSION(13, 0, 3): adev->smuio.funcs = &smuio_v13_0_3_funcs; + if (adev->smuio.funcs->get_pkg_type(adev) == AMDGPU_PKG_TYPE_APU) { + adev->flags |= AMD_IS_APU; + } break; case IP_VERSION(13, 0, 6): case IP_VERSION(13, 0, 8):