aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
diff options
context:
space:
mode:
authorRemo Senekowitsch <[email protected]>2025-06-11 10:29:05 +0000
committerDanilo Krummrich <[email protected]>2025-06-12 22:58:53 +0000
commit2db611374cef12bd793b72d5728f0ecd1affeb17 (patch)
tree64fca45b937222d32d8e657af5d4e1bada23f399 /drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
parentrust: device: Introduce PropertyGuard (diff)
downloadkernel-2db611374cef12bd793b72d5728f0ecd1affeb17.tar.gz
kernel-2db611374cef12bd793b72d5728f0ecd1affeb17.zip
rust: device: Implement accessors for firmware properties
Add methods to FwNode for reading several firmware property types like strings, integers and arrays. Most types are read with the generic `property_read` method. There are two exceptions: * `property_read_bool` cannot fail, so the fallible function signature of `property_read` would not make sense for reading booleans. * `property_read_array_vec` can fail because of a dynamic memory allocation. This error must be handled separately, leading to a different function signature than `property_read`. The traits `Property` and `PropertyInt` drive the generic behavior of `property_read`. `PropertyInt` is necessary to associate specific integer types with the C functions to read them. While there is a C function to read integers of generic sizes called `fwnode_property_read_int_array`, it was preferred not to make this public. Tested-by: Dirk Behme <[email protected]> Co-developed-by: Rob Herring (Arm) <[email protected]> Signed-off-by: Rob Herring (Arm) <[email protected]> Signed-off-by: Remo Senekowitsch <[email protected]> Link: https://lore.kernel.org/r/[email protected] [ Properly include kernel::device::private::Sealed; add explicit type annotations for core::mem::transmute(). - Danilo ] Signed-off-by: Danilo Krummrich <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c')
0 files changed, 0 insertions, 0 deletions