summaryrefslogtreecommitdiff
path: root/drivers/gpu
AgeCommit message (Collapse)Author
2026-08-25drm/amd/ras: update interface to support multiple ras query methodsYiPeng Chai
Add a parameter to differentiate callers that need new error count vs total count, ensuring the new count is only cleared by the intended caller. Signed-off-by: YiPeng Chai <YiPeng.Chai@amd.com> Reviewed-by: Tao Zhou <tao.zhou1@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-08-25drm/amd/ras: replace variable with function to check poison supportYiPeng Chai
Use a common interface to retrieve poison support status to avoid handling ASIC-specific logic. Signed-off-by: YiPeng Chai <YiPeng.Chai@amd.com> Reviewed-by: Tao Zhou <tao.zhou1@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-08-25drm/amd/ras: resolve compiler warning for stack frame exceeding 1024 bytesYiPeng Chai
Resolve compiler warning for stack frame exceeding 1024 bytes. Signed-off-by: YiPeng Chai <YiPeng.Chai@amd.com> Reviewed-by: Tao Zhou <tao.zhou1@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-08-25drm/amd/ras: limit eeprom ras table validation to init and post-writeYiPeng Chai
The eeprom ras table can be quite large, and each read requires multiple smu i2c transactions (max 24 bytes per transfer). Limit the validation to avoid excessive i2c traffic and CPU busy-wait overhead. Signed-off-by: YiPeng Chai <YiPeng.Chai@amd.com> Reviewed-by: Tao Zhou <tao.zhou1@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-08-25drm/amd/ras: introduce row page address buffer alloc/free interfacesYiPeng Chai
Introduce row page address buffer alloc/free interfaces. Signed-off-by: YiPeng Chai <YiPeng.Chai@amd.com> Reviewed-by: Tao Zhou <tao.zhou1@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-08-25drm/amdgpu/ras: use flip-bit mask to generalize bad page address derivationYiPeng Chai
Use flip-bit mask to generalize bad page address derivation in a row. Signed-off-by: YiPeng Chai <YiPeng.Chai@amd.com> Reviewed-by: Tao Zhou <tao.zhou1@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-08-25drm/amd/ras: add management interface to support psp bad page address ↵YiPeng Chai
translation Add management interface to support psp bad page address translation. Signed-off-by: YiPeng Chai <YiPeng.Chai@amd.com> Reviewed-by: Tao Zhou <tao.zhou1@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-08-25drm/amd/ras: process cached BERT boot errorsXiang Liu
Read and cache the ACPI BERT payload during MCE hardware init, then ask rascore to process the cached records once for each GPU socket. Reset the cached state when the MCE notifier chain is torn down so a new initialization sequence can poll and process boot errors again. Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Xiang Liu <xiang.liu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-08-25drm/amd/ras: add rascore BERT record walkerXiang Liu
Add a rascore BERT record walker that validates cached BERT generic status blocks and iterates their CPER section descriptors. The generic APEI BERT path may have already consumed the boot error region and cleared block_status before AMDGPU caches the payload, so do not use block_status to decide whether cached records should be parsed. Section-specific parsers can be added separately on top of this walker. Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Xiang Liu <xiang.liu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-08-25drm/amd/ras: map boot log events to CPER typeXiang Liu
Map boot RAS log events to the boot CPER type so records from boot-time error sources use the intended CPER record classification. Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Xiang Liu <xiang.liu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-08-25drm/amd/ras: add PCIE_PL ACA block mappingXiang Liu
Add the PCIE_PL ACA HWIP mapping for ACA v5 hardware so MCE banks with HWID 0x1e1 and ACA type 0x0 can be decoded by the RAS ACA path. Register PCIE_PL as a RAS block using the default ACA bank match and parse helpers, matching the other simple v5 block mappings. Reviewed-by: Stanley.Yang <Stanley.Yang@amd.com> Signed-off-by: Xiang Liu <xiang.liu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-08-25drm/amd/ras: update aca bank decoding for A + AYiPeng Chai
Update aca bank decoding for A + A. Signed-off-by: YiPeng Chai <YiPeng.Chai@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-08-25drm/amd/ras: use single socket per GPU device to store ACA RAS error infoYiPeng Chai
The socket ID parsed from ACA IPID always corresponds to the current socket and never references another socket. Therefore, there is no need to maintain per-socket storage for remote sockets — a single socket is sufficient to store all ACA RAS error information for each GPU device. Signed-off-by: YiPeng Chai <YiPeng.Chai@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-08-25drm/amd/ras: fix driver unload failure when uniras is enabledYiPeng Chai
Fix driver unload failure when uniras is enabled. Signed-off-by: YiPeng Chai <YiPeng.Chai@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-08-25drm/amdgpu: add new interface in guest driver for getting RAS capability ↵Jiahao Li
when uniras enabled - Adding a new interface in guest driver to parse the pf2vf message and return RAS capability to the caller when uniras is enabled - Update RAS capability fields in amdgv_sriovmsg.h for uniras Signed-off-by: Jiahao Li <Jiahao.Li@amd.com> Reviewed-by: YiPeng Chai <YiPeng.Chai@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-08-25drm/amd/ras: add address translation interface for umc_v15_0YiPeng Chai
Add address translation interface for umc_v15_0. Signed-off-by: YiPeng Chai <YiPeng.Chai@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-08-25drm/amd/ras: fix silent error swallowing in get_record_count pathsYiPeng Chai
Fix silent error swallowing in get_record_count paths. Signed-off-by: YiPeng Chai <YiPeng.Chai@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-08-25drm/amd/ras: harden error handling and fix resource/lock issuesYiPeng Chai
Harden error handling and fix resource/lock issues. Signed-off-by: YiPeng Chai <YiPeng.Chai@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-08-25drm/amd/ras: support multi-parameter communication with mp1 in ras_mp1_v15_0YiPeng Chai
support multi-parameter communication with mp1 in ras_mp1_v15_0. Signed-off-by: YiPeng Chai <YiPeng.Chai@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-08-25drm/amd/ras: update mp1_v13_0 to use smu ras multi-parameter interfaceYiPeng Chai
update mp1_v13_0 to use smu ras multi-parameter interface. Signed-off-by: YiPeng Chai <YiPeng.Chai@amd.com> Reviewed-by: Yang Wang <kevinyang.wang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-08-25drm/amd/pm: update RAS-specific interface to support multi-parameterYiPeng Chai
Update the dedicated smu ras message interface to accept multiple parameters on each call. v2: Add input parameter validation. Signed-off-by: YiPeng Chai <YiPeng.Chai@amd.com> Reviewed-by: Yang Wang <kevinyang.wang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-08-25drm/amd/ras: overlap VF RAS_CMD buffer and legacy RAS telemetry memory regionsJiahao Li
Share memory region between VF RAS_CMD buffer and legacy RAS telemetry as they are mutually exclusive based on UniRAS state Signed-off-by: Jiahao Li <Jiahao.Li@amd.com> Reviewed-by: YiPeng Chai <YiPeng.Chai@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-08-25drm/amdgpu: add switch to select firmware loading path for RAS RL and TAYiPeng Chai
Introduce a toggle to control whether RAS RL and TA firmware are loaded through the legacy path or the RAS module. Signed-off-by: YiPeng Chai <YiPeng.Chai@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-08-25drm/amdgpu/ras: support loading RAS RL and TA firmware in RAS moduleYiPeng Chai
Allow the RAS module to load RAS RL and TA firmware internally while maintaining backward compatibility with the system-level firmware loading path. Signed-off-by: YiPeng Chai <YiPeng.Chai@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-08-25drm/amdgpu: refactor memory handling to support both external and internal ↵YiPeng Chai
allocation Optimize the memory usage to accommodate both referencing externally allocated memory from outside the module and allocating memory directly within the module. Signed-off-by: YiPeng Chai <YiPeng.Chai@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-08-25drm/amdgpu/ras: reload RAS TA from ras mgr resumeXiang Liu
When uniras owns the RAS TA, rascore can no longer rely on the legacy PSP context to keep TA session state alive across reset or suspend. The manager has to provide enough metadata to reload the TA and rebuild its shared buffer after PSP reinitialization. Source TA firmware metadata from adev->psp.ras_context.context.bin_desc, allocate and free the shared buffer on demand, and hand the fini cleanup back to rascore through a put_ras_ta_fini_param callback. Add a resume hook that reloads the TA with skip_lock set so the reload can run after GPU reset. Export thin ras_mgr helpers for feature toggles and deferred replay so higher layers can use the rascore-owned TA path without depending on legacy PSP-managed TA session state directly. Signed-off-by: Jinzhou Su <jinzhou.su@amd.com> Signed-off-by: Xiang Liu <xiang.liu@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-08-25drm/amdgpu/ras: prepare ras_psp for ras_mgr-owned TA reloadXiang Liu
Stop deriving RAS TA session state from the legacy PSP status query and switch ras_psp over to locally tracked TA lifetime. Delegate TA init parameters and fini cleanup through ras_psp sys callbacks, update the load and unload flow to keep firmware metadata in rascore, and add a skip_lock load path that can be used after PSP reinitialization. This prepares ras_psp for a later ras_mgr resume hook that reloads the TA without relying on legacy PSP-managed session ownership. Signed-off-by: Jinzhou Su <jinzhou.su@amd.com> Signed-off-by: Xiang Liu <xiang.liu@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-08-25drm/amdgpu: fix duplicate ras debugfs node creation on driver reloadYiPeng Chai
On A+A, when ras_enabled is 0, the RAS debugfs node is not deleted when the driver is uninstalled. Signed-off-by: YiPeng Chai <YiPeng.Chai@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-08-25drm/amdgpu: Add bad page preloading and pre-reservation supportYiPeng Chai
Add bad page preloading and pre-reservation support. v2: Add modification to ensure amdgpu_sw_init does not fail and remove deferred ras instance release. Signed-off-by: YiPeng Chai <YiPeng.Chai@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-08-25drm/amd/ras: Add null check to prevent null pointer exceptionYiPeng Chai
Add null check to prevent null pointer exception. Signed-off-by: YiPeng Chai <YiPeng.Chai@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-08-25drm/amd/ras: remove unused code from ras eepromYiPeng Chai
Remove unused code from ras eeprom. Signed-off-by: YiPeng Chai <YiPeng.Chai@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-08-25drm/amd/ras: use record count instead of bad page count for EEPROM threshold ↵YiPeng Chai
checking - Since EEPROM threshold configuration is record count, use record count instead of bad page count for EEPROM threshold checking. - RMA check and notification have been moved to ras_eeprom_mgr. Signed-off-by: YiPeng Chai <YiPeng.Chai@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-08-25drm/amd/ras: Add gpu rma exception handlingYiPeng Chai
Add gpu rma exception handling. Signed-off-by: YiPeng Chai <YiPeng.Chai@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-08-25drm/amd/ras: Support obtaining bad page info at boot time for ras_mp1_v15_0YiPeng Chai
Support obtaining bad page info at boot time for ras_mp1_v15_0. Signed-off-by: YiPeng Chai <YiPeng.Chai@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-08-25drm/amd/ras: add interface to report bad page infoYiPeng Chai
Add interface to report bad page info. Signed-off-by: YiPeng Chai <YiPeng.Chai@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-08-25drm/amd/ras: preload and handle bad pages at boot timeYiPeng Chai
Preload bad pages occur during the sw_init stage, so the preload-related code in RAS module must be moved to sw_init for proper initialization. v2: Rename functions and variables. Signed-off-by: YiPeng Chai <YiPeng.Chai@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-08-25drm/amd/ras: add interface to obtain FW eeprom records at runtimeYiPeng Chai
Add interface to obtain FW eeprom records at runtime. Signed-off-by: YiPeng Chai <YiPeng.Chai@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-08-25drm/amd/ras: unify umc record logging paths for runtime and preloadYiPeng Chai
Unify UMC record logging paths for runtime and preload. Signed-off-by: YiPeng Chai <YiPeng.Chai@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-08-25drm/amdgpu/ras: Rework fw eeprom handling for new management interfaceYiPeng Chai
Rework fw eeprom handling for new management interface: - Support new eeprom management interfaces. - Use ras_mp1 common interfaces to retrieve bad page information - Keep a local backup to reduce the interaction frequency with MP1. Signed-off-by: YiPeng Chai <YiPeng.Chai@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-08-25drm/amd/ras: switch to use new eeprom management interfacesYiPeng Chai
Switch to use new eeprom management interfaces. Signed-off-by: YiPeng Chai <YiPeng.Chai@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-08-25drm/amd/ras: Ras eeprom supports new eeprom management interfacesYiPeng Chai
Ras eeprom supports new eeprom management interfaces. v2: Correct incorrect return values. Signed-off-by: YiPeng Chai <YiPeng.Chai@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-08-25drm/amd/ras: Refactor EEPROM parameter config to support multiple ras EEPROMsYiPeng Chai
- Refactor EEPROM parameter config to support multiple ras EEPROMs. - Convert bad page count to record count as EEPROM threshold. Signed-off-by: YiPeng Chai <YiPeng.Chai@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-08-25drm/amd/ras: add interfaces to manage multiple EEPROMsYiPeng Chai
Add interfaces to manage multiple EEPROMs. Signed-off-by: YiPeng Chai <YiPeng.Chai@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-08-25drm/amd/ras: Support retrieving bad page info from mp1_v15_0YiPeng Chai
Support retrieving bad page info from mp1_v15_0. Signed-off-by: YiPeng Chai <YiPeng.Chai@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-08-25drm/amd/ras: ras mp1 introduces common interfacesYiPeng Chai
Ras mp1 introduces common interfaces to manage mp1 data obtained from different ASICs. v2: Add mutex to ensure complete data transactions with MP1. Signed-off-by: YiPeng Chai <YiPeng.Chai@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-08-25drm/amd/ras: add helper to convert aca bank to eeprom recordYiPeng Chai
add helper to convert aca bank to eeprom record. v2: Correct incorrect return values. Signed-off-by: YiPeng Chai <YiPeng.Chai@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-08-25drm/amd/ras: add interface to query nps mode and vram typeYiPeng Chai
Add interface to query nps mode and vram type. Signed-off-by: YiPeng Chai <YiPeng.Chai@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-08-25drm/amd/ras: Isolate ras mce handler with CONFIG_X86_MCE_AMDYiPeng Chai
Isolate ras mce handler with CONFIG_X86_MCE_AMD. v2: Isolate all ras mce handlers. v3: squash in fix to remove extra header Signed-off-by: YiPeng Chai <YiPeng.Chai@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-08-25drm/amdgpu: Make extra space in psp->cmd_buf_bo usableFelix Kuehling
Make space at the end of psp->cmd_buf_bo usable for extra data returned from PSP commands. Signed-off-by: Felix Kuehling <felix.kuehling@amd.com> Reviewed-by: Mukul Joshi <mukul.joshi@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-08-25drm/amd/ras: add ext_umc_mask to RAS TA initCandice Li
Add ext_umc_mask for the upper half of adev->umc.active_mask and fill both fields when building RAS TA init message. Signed-off-by: Candice Li <candice.li@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>