diff options
| author | Thomas Zimmermann <[email protected]> | 2025-06-11 07:01:34 +0000 |
|---|---|---|
| committer | Thomas Zimmermann <[email protected]> | 2025-06-11 07:01:34 +0000 |
| commit | c598d5eb9fb331ba17bc9ad67ae9a2231ca5aca5 (patch) | |
| tree | a5b6f4655cde4f19b6b157aa455723c0329bd719 /drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c | |
| parent | drm/panel: ilitek-ili9881c: Add configuration for 7" Raspberry Pi 720x1280 (diff) | |
| parent | Linux 6.16-rc1 (diff) | |
| download | kernel-c598d5eb9fb331ba17bc9ad67ae9a2231ca5aca5.tar.gz kernel-c598d5eb9fb331ba17bc9ad67ae9a2231ca5aca5.zip | |
Merge drm/drm-next into drm-misc-next
Backmerging to forward to v6.16-rc1
Signed-off-by: Thomas Zimmermann <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c index 8c6e55b5b967..c92b8794aa73 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c @@ -562,3 +562,26 @@ int amdgpu_umc_mca_to_addr(struct amdgpu_device *adev, return 0; } + +int amdgpu_umc_pa2mca(struct amdgpu_device *adev, + uint64_t pa, uint64_t *mca, enum amdgpu_memory_partition nps) +{ + struct ta_ras_query_address_input addr_in; + struct ta_ras_query_address_output addr_out; + int ret; + + /* nps: the pa belongs to */ + addr_in.pa.pa = pa | ((uint64_t)nps << 58); + addr_in.addr_type = TA_RAS_PA_TO_MCA; + ret = psp_ras_query_address(&adev->psp, &addr_in, &addr_out); + if (ret) { + dev_warn(adev->dev, "Failed to query RAS MCA address for 0x%llx", + pa); + + return ret; + } + + *mca = addr_out.ma.err_addr; + + return 0; +} |
