drm/amd: Refactor find_system_memory()
authorMario Limonciello <mario.limonciello@amd.com>
Thu, 6 Feb 2025 21:48:35 +0000 (15:48 -0600)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 13 Feb 2025 02:04:09 +0000 (21:04 -0500)
commit0a0bd4f95cb33150b63d4f5bb02dc45c5557c483
treec9b38a607b621eacb3344c286b4a237290606075
parente92f3f94cad24154fd3baae30c6dfb918492278d
drm/amd: Refactor find_system_memory()

find_system_memory() pulls out two fields from an SMBIOS type 17
device and sets them on KFD devices. The data offsets are counted
to find interesting data.

Instead use a struct representation to access the members and pull
out the two specific fields.

No intended functional changes.

Link: https://www.dmtf.org/sites/default/files/standards/documents/DSP0134_3.8.0.pdf
Reviewed-by: Felix Kuehling <felix.kuehling@amd.com>
Link: https://lore.kernel.org/r/20250206214847.3334595-1-superm1@kernel.org
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_topology.c
drivers/gpu/drm/amd/amdkfd/kfd_topology.h