Commit graph

1,467,593 commits

Author SHA1 Message Date
Xiang Liu
00832179cd drm/amd/ras: generate processor CPER records
Encode runtime CPU machine checks with the standard IA Processor
section, including APIC ID, machine-check status, bank MSR address, and
SMCA register context.

Also preserve IA Processor sections recovered from BERT as
boot-notified records with their original context metadata and variable
payload size.

Route both forms through a processor-specific generator so they remain
separate from AMD crashdump records.

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-25 18:26:14 -04:00
Xiang Liu
1b03623acc drm/amd/ras: generate AMD crashdump CPER records
Populate the AMD crashdump common header and error information before
serializing fatal and boot records.

Validate that batched boot records share a section type, clamp the
register context to the crashdump payload, and account for each record
header when sizing the output.

Keep AMD record dispatch in a dedicated helper so processor and
Platform Memory generation can be added independently.

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-25 18:26:14 -04:00
Xiang Liu
26164faa3f drm/amd/ras: define processor and memory CPER formats
CPU machine-check and platform boot errors require standard processor
and Platform Memory section definitions. The AMD crashdump format also
uses a 64-byte common header followed by a common error information
structure.

Add the required GUIDs, validity fields, processor structures, and AMD
crashdump wire layout so rascore can generate each record type.

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-25 18:26:14 -04:00
Xiang Liu
7c2e79a7bd drm/amd/ras: preserve CPU MCE context in the log ring
Processor CPER generation needs the APIC ID and machine-check bank
number in addition to the ACA register values. Logging the full internal
ACA bank also exceeds the stable fixed-size log body representation.

Carry the APIC ID and bank number with incoming ACA banks and store CPU
MCE events in a compact 128-byte log context for later CPER encoding.

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-25 18:26:14 -04:00
Xiang Liu
0e176a2b8c drm/amd/ras: classify ACA v5 MCE status
Machine-check records may not carry the hardware-maintained UMC error
count expected by the normal polling path. As a result, valid deferred,
uncorrected, and corrected MCE status values can remain unclassified.

For MCE-originated banks, classify the error directly from the MCA
status bits when normal UMC decoding does not produce an error count.

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-25 18:26:14 -04:00
Xiang Liu
c3cf625bc3 drm/amd/ras: allow waking RAS processing without an event
GPU MCE handling queues bank data directly in the MCE FIFO and only
needs to wake the RAS processing thread. Requiring a separate event
request prevents this path from scheduling processing when no event
object is available.

Permit a NULL request to skip event queue insertion while still
incrementing the interrupt request count and waking the processing
thread.

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-25 18:26:14 -04:00
Xiang Liu
e760937596 drm/amd/ras: move BERT boot errors to BERT sw init
Keep BERT boot-error handling owned by the BERT module instead of letting
the MCE notifier lifecycle drive BERT processing and cleanup.

Group the cached boot-error state into a single structure so the related
poll result, raw record data, per-socket write tracking, and lock are
managed together.

Expose only the standard BERT sw_init/sw_fini entry points. The RAS manager
calls them around the existing MCE sw lifecycle, while the MCE code no
longer includes BERT headers or calls BERT helpers directly.

This lets BERT process cached boot records earlier in the RAS manager
sw_init path and release its cached state independently during sw_fini.

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-25 18:26:14 -04:00
YiPeng Chai
f0b1f681f5 drm/amd/ras: increase page buffer size for A+A
Increase page buffer size for A+A.

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-25 18:26:14 -04:00
YiPeng Chai
7765daaec5 drm/amd/ras: fix and improve bad page count calculation
Fix an issue where the saved bad page count is always zero.

The cur_nps_valid_page_num field in the record already tracks
the available bad page count, so use it directly to calculate
the correct saved bad page number.

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-25 18:26:14 -04:00
YiPeng Chai
6cd157c105 drm/amd/ras: filter out invalid pages from extended page addresses
Filter out invalid pages from extended page addresses.

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-25 18:26:14 -04:00
YiPeng Chai
3b2e000e63 drm/amd/ras: populate cper aca register info for rma device
Populate cper aca register info for rma 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-25 18:26:14 -04:00
YiPeng Chai
c5ab91b445 drm/amd/ras: add interface and improve extensibility
Add interface and improve extensibility.

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-25 18:26:13 -04:00
YiPeng Chai
06b4ad1104 drm/amd/ras: unify variable naming conventions
Unify variable naming conventions.

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-25 18:26:13 -04:00
YiPeng Chai
cb6996164c drm/amd/ras: fix ras cmd returning incorrect cper count
Fix ras cmd returning incorrect cper count.

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-25 18:26:13 -04:00
YiPeng Chai
e59969b611 drm/amd/ras: refactor ras cper to simplify adding new cper events
Restructure ras cper to improve extensibility, making it straightforward
to add and handle new cper event types.

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-25 18:26:13 -04:00
YiPeng Chai
a6fd0828ee drm/amdgpu: extend ras feature mask to 64-bit for A + A
Extend ras feature mask to 64-bit 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-25 18:26:13 -04:00
YiPeng Chai
bdc7833019 drm/amd/ras: add module parameter for uniras
Add module parameter for uniras.

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-25 18:26:13 -04:00
YiPeng Chai
dfa3ce07a8 drm/amd/ras: improve ras log timestamp precision
Improve ras log timestamp precision.

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-25 18:26:13 -04:00
Xiang Liu
d0d50ba0b9 drm/amd/ras: record crashdump BERT sections as boot CPER
Add a small section dispatch table and record AMD crashdump sections as
RAS_LOG_EVENT_BOOT events. Preserve the original section GUID,
severity, and a bounded copy of the section payload so the existing boot
CPER generator can emit records for debugfs consumers.

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-25 18:26:13 -04:00
Xiang Liu
e5249e934f drm/amd/ras: add BERT CPER table helpers
Add local HEST status and data entry layouts. Also add local helpers for
revision-aware payload access, entry walking, and basic status
validation.

Move the BERT record processing prototype into a dedicated BERT header
so the parser interface stays local to the BERT parser code.

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-25 18:26:13 -04:00
Xiang Liu
60a03019ea drm/amd/ras: add missing ras core block names
ras_core_get_ras_block_name() indexes ras_block_name[] directly
with enum ras_block_id values. The table only covered entries through
RAS_BLOCK_ID__MPIO, while ras.h defines additional blocks through
RAS_BLOCK_ID__UCIE_PCS.

When UniRAS reports a newer block such as RAS_BLOCK_ID__PCIE_PL,
the lookup falls past the end of the table and returns an empty string.
That leaves messages such as "new correctable hardware errors detected
in  block" without the block name.

Fill in the missing names in enum order so the indexed lookup can
resolve PCIE_PL and the other existing ras_block_id values.

Signed-off-by: Xiang Liu <xiang.liu@amd.com>
Reviewed-by: Tao Zhou <tao.zhou1@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-08-25 18:26:13 -04:00
YiPeng Chai
b73d6e9f42 drm/amd/ras: update interface to support multiple ras query methods
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-25 18:26:13 -04:00
YiPeng Chai
eed1a90fd4 drm/amd/ras: replace variable with function to check poison support
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-25 18:26:13 -04:00
YiPeng Chai
9f9e36c17c drm/amd/ras: resolve compiler warning for stack frame exceeding 1024 bytes
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-25 18:26:13 -04:00
YiPeng Chai
00a5a6e534 drm/amd/ras: limit eeprom ras table validation to init and post-write
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-25 18:26:13 -04:00
YiPeng Chai
7e44e70fa7 drm/amd/ras: introduce row page address buffer alloc/free interfaces
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-25 18:26:13 -04:00
YiPeng Chai
2103bfff1c drm/amdgpu/ras: use flip-bit mask to generalize bad page address derivation
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-25 18:26:13 -04:00
YiPeng Chai
34f77f1195 drm/amd/ras: add management interface to support psp bad page address 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-25 18:26:12 -04:00
Xiang Liu
9ba874eba9 drm/amd/ras: process cached BERT boot errors
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-25 18:26:12 -04:00
Xiang Liu
b6531cd34c drm/amd/ras: add rascore BERT record walker
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-25 18:26:12 -04:00
Xiang Liu
b3e4477c26 drm/amd/ras: map boot log events to CPER type
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-25 18:26:12 -04:00
Xiang Liu
d7c3a0158f drm/amd/ras: add PCIE_PL ACA block mapping
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-25 18:26:12 -04:00
YiPeng Chai
d76a306ed1 drm/amd/ras: update aca bank decoding for A + A
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-25 18:26:12 -04:00
YiPeng Chai
0ceb0531b2 drm/amd/ras: use single socket per GPU device to store ACA RAS error info
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-25 18:26:12 -04:00
YiPeng Chai
ddf0a6efbb drm/amd/ras: fix driver unload failure when uniras is enabled
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-25 18:26:12 -04:00
Jiahao Li
33cc68f283 drm/amdgpu: add new interface in guest driver for getting RAS capability 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-25 18:26:12 -04:00
YiPeng Chai
a5dc142cd1 drm/amd/ras: add address translation interface for umc_v15_0
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-25 18:26:12 -04:00
YiPeng Chai
f844ff6226 drm/amd/ras: fix silent error swallowing in get_record_count paths
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-25 18:26:12 -04:00
YiPeng Chai
374a8cdafc drm/amd/ras: harden error handling and fix resource/lock issues
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-25 18:26:12 -04:00
YiPeng Chai
b2f572f98f drm/amd/ras: support multi-parameter communication with mp1 in ras_mp1_v15_0
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-25 18:26:12 -04:00
YiPeng Chai
df4e6a492e drm/amd/ras: update mp1_v13_0 to use smu ras multi-parameter interface
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-25 18:26:12 -04:00
YiPeng Chai
08a792a7d7 drm/amd/pm: update RAS-specific interface to support multi-parameter
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-25 18:26:12 -04:00
Jiahao Li
193b0ad4a7 drm/amd/ras: overlap VF RAS_CMD buffer and legacy RAS telemetry memory regions
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-25 18:26:12 -04:00
YiPeng Chai
e21b4356a3 drm/amdgpu: add switch to select firmware loading path for RAS RL and TA
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-25 18:26:12 -04:00
YiPeng Chai
0dec7414ce drm/amdgpu/ras: support loading RAS RL and TA firmware in RAS module
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-25 18:26:11 -04:00
YiPeng Chai
ba74c69d0c drm/amdgpu: refactor memory handling to support both external and internal 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-25 18:26:11 -04:00
Xiang Liu
7008fc10a6 drm/amdgpu/ras: reload RAS TA from ras mgr resume
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-25 18:26:11 -04:00
Xiang Liu
8e1561247d drm/amdgpu/ras: prepare ras_psp for ras_mgr-owned TA reload
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-25 18:26:11 -04:00
YiPeng Chai
a10d7135b1 drm/amdgpu: fix duplicate ras debugfs node creation on driver reload
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-25 18:26:11 -04:00
YiPeng Chai
b7146153a6 drm/amdgpu: Add bad page preloading and pre-reservation support
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-25 18:26:11 -04:00