Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/amdgpu: Check APU supports true APP mode

On GPXIP 9.4.3 APU, in no carveout mode there is no real vram heap and
could be emulated by the driver over the interleaved NUMA system memory
and the APU could also be in the carveout mode during early development
stage or otherwise for debugging purpose so introduce a new member in
amdgpu_gmc to figure out whether the APU is in the native mode as per
the production configuration. AMD_IS_APU cannot be used for Accelerated
Processing Platform APUs as it might be used in a different context on
previous generations or on small APUs.

Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Tested-by: Graham Sider <graham.sider@amd.com>
Signed-off-by: Rajneesh Bhardwaj <rajneesh.bhardwaj@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Rajneesh Bhardwaj and committed by
Alex Deucher
497db7ea eaae4bee

+15
+1
drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h
··· 251 251 uint64_t last_fault:AMDGPU_GMC_FAULT_RING_ORDER; 252 252 253 253 bool tmz_enabled; 254 + bool is_app_apu; 254 255 255 256 const struct amdgpu_gmc_funcs *gmc_funcs; 256 257
+14
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
··· 1442 1442 adev->smuio.funcs->is_host_gpu_xgmi_supported(adev); 1443 1443 } 1444 1444 1445 + if (adev->ip_versions[GC_HWIP][0] == IP_VERSION(9, 4, 3)) { 1446 + enum amdgpu_pkg_type pkg_type = 1447 + adev->smuio.funcs->get_pkg_type(adev); 1448 + /* On GFXIP 9.4.3. APU, there is no physical VRAM domain present 1449 + * and the APU, can be in used two possible modes: 1450 + * - carveout mode 1451 + * - native APU mode 1452 + * "is_app_apu" can be used to identify the APU in the native 1453 + * mode. 1454 + */ 1455 + adev->gmc.is_app_apu = (pkg_type == AMDGPU_PKG_TYPE_APU && 1456 + !pci_resource_len(adev->pdev, 0)); 1457 + } 1458 + 1445 1459 gmc_v9_0_set_gmc_funcs(adev); 1446 1460 gmc_v9_0_set_irq_funcs(adev); 1447 1461 gmc_v9_0_set_umc_funcs(adev);