Commit graph

1,485,056 commits

Author SHA1 Message Date
Hawking Zhang
91a166e69c drm/amdgpu: Add mp v15_0_3 ip headers v4
Add header files for mp v15_0_3 register offsets
and shift masks

v2: Update mp ip headers to LSC version
v3: Update mp ip headers to BTO version
v4: Update registers (Alex)

Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Frank Min <Frank.Min@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-10-01 11:23:34 -04:00
Likun Gao
5b8a05bcb9 drm/amdgpu: add support for lsdma v8
Add support for LSDMA v8

v2: fix wait_pio_status() per Philip's comments.

Reviewed-by: Philip Yang <philip.yang@amd.com>
Signed-off-by: Likun Gao <Likun.Gao@amd.com>
Reviewed-by: Frank Min <Frank.Min@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-10-01 11:23:29 -04:00
Hawking Zhang
c7a595f6dc drm/amdgpu: Add lsdma v8_0_1 ip headers
Add header files for lsdma v8_0_1 register offsets
and shift masks

v2: Update registers (Alex)

Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Frank Min <Frank.Min@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-10-01 11:23:25 -04:00
Frank Min
481f34c243 drm/amdgpu: add hdp v8 ip block
add hdp v8 ip block

Signed-off-by: Frank Min <Frank.Min@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-10-01 11:23:23 -04:00
Hawking Zhang
fe9521296e drm/amdgpu: Add hdp v8_0_1 ip headers v3
Add header files for hdp v8_0_1 register offsets
and shift masks

v2: Update hdp ip headers to BTO version
v3: Update registers (Alex)

Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Frank Min <Frank.Min@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-10-01 11:23:20 -04:00
Hawking Zhang
cd3b6f82ef drm/amdgpu: Add smuio v15_0_3 support
Add initial implementation for the new generation of smuio

v2: squash in clock counter changes

Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Frank Min <Frank.Min@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-10-01 11:23:16 -04:00
Hawking Zhang
7f5a53bde6 drm/amdgpu: Add smuio v15_0_3 ip headers v4
Add header files for smuio v15_0_3 register offsets
and shift masks

v2: Update smuio ip headers to LSC version
v3: Update smuio ip headers to BTO version
v4: Update registers (Alex)

Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Frank Min <Frank.Min@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-10-01 11:23:13 -04:00
ZhenGuo Yin
b34364d359 drm/amdgpu: fall back to RCC_HW_DEBUG for VF frame buffer size
On some SR-IOV VFs RCC_CONFIG_MEMSIZE reads back 0. Fall back to
RCC_HW_DEBUG for the frame buffer size in the nbif get_memsize()
callback and in the early-init paths that read the register directly.
Only VFs that read back 0 are affected.

Signed-off-by: ZhenGuo Yin <zhenguo.yin@amd.com>
Reviewed-by: Frank Min <frank.min@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-10-01 11:23:09 -04:00
Hawking Zhang
fa53376be6 drm/amdgpu: Add nbif v7_10 support
Add initial implementation for the new generation of nbif

v2: squash in HDP, VPE, RLC/IH, SDMA fixes

Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Frank Min <Frank.Min@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-10-01 11:23:05 -04:00
Hawking Zhang
e66a5ab119 drm/amdgpu: Add pcie v6_1_3 ip headers v4
Add header files for pcie v6_1_3 register offsets
and shift masks

v2: Update pcie ip headers to LSC version
v3: Update pcie ip headers to BTO version
v4: Update registers (Alex)

Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Frank Min <Frank.Min@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-10-01 11:23:00 -04:00
Hawking Zhang
2562900b09 drm/amdgpu: Add nbif v7_10_0 ip headers v4
Add header files for nbif v7_10_0 register headers
and shift masks

v2: Update nbif ip headers to LSC version
v3: Update nbif ip headers to BTO version
v4: Update registers (Alex)
v5: Squash in SR-IOV updates (Alex)

Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Frank Min <Frank.Min@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-10-01 11:22:56 -04:00
Hawking Zhang
01d6b9d032 drm/amdgpu/discovery: Add ih v8_0 ip block
Add ih v8_0 ip block

Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Frank Min <Frank.Min@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-10-01 11:22:53 -04:00
Hawking Zhang
327edf9e92 drm/amdgpu: Add ih v8_0 support
Add initial implementation for the new generation of ih

v2: squash in flood control fix

Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Frank Min <Frank.Min@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-10-01 11:22:48 -04:00
Hawking Zhang
0431798feb drm/amdgpu: Add osssys v8_0_1 ip headers v3
Add header files for osssys v8_0_1 register offsets
and shift masks

v2: Update osssys ip headers to BTO version
v3: Update registers (Alex)

Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Frank Min <Frank.Min@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-10-01 11:22:42 -04:00
Hawking Zhang
46d702cdef drm/amdgpu: Add soc v2_0 ih client id table
To acommandate the specific ih client for soc v2_0

Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Frank Min <Frank.Min@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-10-01 11:22:34 -04:00
Lin Cao
34f5b2eea3 drm/amdgpu: fix ip discovery table validation
Fix ip discovery table_check, get_mall_info, and get_vcn_info to guard
on both offset and size being non-zero before parsing.

Signed-off-by: Danijel Slivka <danijel.slivka@amd.com>
Signed-off-by: ZhenGuo Yin <zhenguo.yin@amd.com>
Signed-off-by: Lin Cao <lincao12@amd.com>
Reviewed-by: Frank Min<Frank.Min@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-10-01 11:22:26 -04:00
Eric Huang
a839ca90f4 drm/amdgpu: fix atomics on DF 5.0.2
DF 5.0.2 needs to program DF config register as DF 4.15.x, so
share the functions, they have the same register layout.

Signed-off-by: Eric Huang <jinhuieric.huang@amd.com>
Reviewed-by: David Belanger <david.belanger@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-10-01 11:22:19 -04:00
Likun Gao
7fba03cf78 drm/amdgpu: Add gc_info_v1_4 table support
Initialize amdgpu_gfx_config using values from
gc_info_v1_4.

Signed-off-by: Likun Gao <Likun.Gao@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-10-01 11:22:15 -04:00
Frank Min
e5e8342825 drm/amdgpu: update FIRMWARE ID for soc24
Update firmware ID for SOC24 to support more firmware.

Signed-off-by: Frank Min <Frank.Min@amd.com>
Signed-off-by: Likun Gao <Likun.Gao@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-10-01 11:22:08 -04:00
Frank Min
09b58ce953 drm/amdgpu: add debug info for psp ip key mgr ucode
Add debug info for psp ip key mgr ucode.

Signed-off-by: Frank Min <Frank.Min@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-10-01 11:22:02 -04:00
Frank Min
8de34e5cbe drm/amdgpu: add GDDR7 vram name
Add GDDR7 vram name.

Signed-off-by: Frank Min <Frank.Min@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-10-01 11:21:59 -04:00
Pierre-Eric Pelloux-Prayer
04a45bbc09 drm/amdgpu: use pm_runtime_resume_and_get amdgpu_gem_create_ioctl
This ioctl might trigger GPU work through ttm so make sure the GPU
is awake.

Signed-off-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Co-developed-by: Shahyan Soltani <shahyan.soltani@amd.com>
Signed-off-by: Shahyan Soltani <shahyan.soltani@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-10-01 11:21:47 -04:00
Jesse Zhang
aa1a19e18e drm/amdgpu/gfx: add a shared gfx pipe reset helper
Serialize GFX recovery with mec.reset_mutex and attempt MES suspend
before locating a user HQD. Back up collateral kernel rings before reset,
then resume MES before testing and replaying rebuilt rings.

Allow reset to proceed if suspend fails. Always attempt resume, report
reset or resume errors, and leave schedulers stopped on failure.

Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-10-01 11:21:44 -04:00
Jesse Zhang
ac3477ac78 drm/amdgpu: factor out the MES user queue reset body
Extract mes_userq_reset_hw() for reuse by GFX recovery. Keep reset and
MES queue removal together, marking the queue HUNG only after both
operations succeed. The existing reset entry point uses the same helper.

Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-10-01 11:21:35 -04:00
Jesse Zhang
893642e0e3 drm/amdgpu/gfx11: set KMD_QUEUE for kernel gfx queues
Set KMD_QUEUE in the GFX MQD and kernel ring control registers so CP
preserves kernel IB VMIDs instead of replacing them with the queue VMID.
Use prop->kernel_queue to distinguish kernel and user MQDs.

Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-10-01 11:21:31 -04:00
Jesse Zhang
14741c0168 drm/amdgpu/gfx12: set KMD_QUEUE for kernel gfx queues
Set KMD_QUEUE in the GFX MQD and kernel ring control registers so CP
preserves kernel IB VMIDs instead of replacing them with the queue VMID.
Use prop->kernel_queue to distinguish kernel and user MQDs.

Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-10-01 11:21:13 -04:00
Jesse Zhang
49e3b50b41 drm/amdgpu/mes12: read the gfx user queue VMID for MMIO reset
Read the MES-assigned VMID from CP_GFX_HQD_VMID under srbm_mutex when
resetting a GFX user queue over MMIO. Kernel queues keep the IB VMID
supplied by the caller.

Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-10-01 11:21:11 -04:00
Jesse Zhang
ecae06f3ef drm/amdgpu/mes11: read the gfx user queue VMID for MMIO reset
Read the MES-assigned VMID from CP_GFX_HQD_VMID under srbm_mutex when
resetting a GFX user queue over MMIO. Kernel queues keep the IB VMID
supplied by the caller.

Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-10-01 11:20:58 -04:00
Jesse Zhang
cd3de60ae6 drm/amdgpu/mes11: restore collateral gfx queues after pipe reset
A pipe reset restarts the shared PFP/ME, but CP firmware dequeues only
the requested queue. Wait for its CP_VMID_RESET bit and HQD_ACTIVE to
clear, and return -ETIMEDOUT if recovery does not complete.

Preempt each collateral kernel queue and wait for its HQD to deactivate
before rebuilding its MQD/ring and remapping it. Leave the guilty kernel
queue to the outer reset helper.

Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-10-01 11:20:52 -04:00
Jesse Zhang
f3a41f6fe5 drm/amdgpu/mes12: restore collateral gfx queues after pipe reset
A pipe reset restarts the shared PFP/ME, but CP firmware dequeues only
the requested queue. Wait for its CP_VMID_RESET bit and HQD_ACTIVE to
clear, and return -ETIMEDOUT if recovery does not complete.

Preempt each collateral kernel queue and wait for its HQD to deactivate
before rebuilding its MQD/ring and remapping it. Leave the guilty kernel
queue to the outer reset helper.

Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-10-01 11:20:49 -04:00
Jesse Zhang
2bf7c12b95 drm/amdgpu/gfx: export amdgpu_gfx_mqd_reset_restore
Expose amdgpu_gfx_mqd_reset_restore() so MES11/12 pipe reset can rebuild
collateral kernel rings.

Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-10-01 11:20:45 -04:00
Jesse Zhang
6adc917949 drm/amdgpu/gfx11: implement detect_hung_queue
Implement detect_hung_queue() by matching enabled HQD doorbells over
MMIO, allowing GFX reset to locate the queue without a MES request.

Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-10-01 11:20:41 -04:00
Jesse Zhang
148882950d drm/amdgpu/gfx12: implement detect_hung_queue
Implement detect_hung_queue() by matching enabled HQD doorbells over
MMIO, allowing GFX reset to locate the queue without a MES request.

Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-10-01 11:20:37 -04:00
Jesse Zhang
c41659869d drm/amdgpu/gfx: add a detect_hung_queue callback
Allow GFX recovery to resolve a doorbell to an HQD (ME, pipe, queue)
without querying a stalled MES scheduler.

Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-10-01 11:20:33 -04:00
Jesse Zhang
78fbe15663 drm/amdgpu: fix empty fence backup and replay intervals
amdgpu_ring_set_fence_errors_and_reemit() and
amdgpu_ring_backup_unprocessed_commands() masked last_seq and sync_seq to
fence-array indices before the loop, then walked a do/while until the two
indices met. When hardware completed every command before the driver
signalled the fences, last_seq == sync_seq, but the masked-index do/while
could not tell that empty interval from a full table and walked the whole
fence array, backing up and replaying already-completed commands.

Read the raw sequence numbers, return early through amdgpu_fence_process()
when they are equal, and mask only at the array index. Guard the
force-completion against a NULL guilty_fence so a non-guilty backup does
not dereference it.

Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-10-01 11:20:29 -04:00
Jesse Zhang
b3f73daa1c drm/amdgpu: support non-guilty job save on ring backup
amdgpu_ring_backup_unprocessed_commands() is also used to preserve a
ring that carries no guilty command - for example a collateral kernel
gfx ring that shares the faulting pipe during a gfx user-queue pipe
reset. Such a ring is backed up with a NULL guilty_fence and all of its
unprocessed commands must be saved so they can be replayed after the
reset rebuilds the ring's MQD.

The early-return that skips an already-seen guilty fence compared
"ring->guilty_fence == guilty_fence", which is also true when both are
NULL. A non-guilty save therefore hit the early return and left
ring_backup_entries_to_copy at 0, so the pending commands were dropped
when the ring was rebuilt.

Guard the early return with a non-NULL guilty_fence so a NULL fence
never takes it and every unprocessed command is backed up.

Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-10-01 11:20:21 -04:00
Timur Kristóf
cc2795483c drm/amdgpu: Delete unimplemented IH soft_reset() code
The soft_reset() function for IH (interrupt handler) blocks
of Vega and newer have never been implemented, and there are
no plans to implement them.

Let's delete these functions, they don't do anything and
also aren't called from anywhere.

Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-10-01 11:20:14 -04:00
Timur Kristóf
68304d3fdf drm/amdgpu: Delete SI/CIK/VI IH soft_reset() code
The code for SI/CIK/VI IH (interrupt handler) IP blocks
has a soft_reset() function for each block.
These functions are not called from anywhere and are
dead code. It's unclear what the original intention
was or why the IH block would ever need to be reset.

All SI/CIK/VI GPUs have been working well for
10+ years without ever resetting the IH block
so it's time to just delete the dead code.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-10-01 11:20:10 -04:00
Lu Yao
0da420089b drm/amdkfd: drop KFD_QUEUE_TYPE_DIQ note
Commit e1b73b6427 ("amdkfd: remove DIQ support") removed the
KFD_QUEUE_TYPE_DIQ enumerator from enum kfd_queue_type but left its
description behind in the note block.

Fixes: e1b73b6427 ("amdkfd: remove DIQ support")
Signed-off-by: Lu Yao <yaolu@kylinos.cn>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-10-01 11:19:33 -04:00
Timur Kristóf
58473c7c49 drm/amd/pm/si: Check AMD_IS_MOBILITY flag for PPSMC_SYSTEMFLAG_GPIO_DC
Unfortunately, some desktop boards eg. the FirePro D500
have the HARDWAREDC platform flag set and also have
a battery power state configured in their VBIOS.
This makes no sense for a desktop GPU and results in
incorrect behaviour: the clocks are stuck at lowest.

We observed that the kernel driver can work around
the issue in two possible ways:
1. Set PPSMC_SWSTATE_FLAG_DC on all power states
2. Clear PPSMC_SYSTEMFLAG_GPIO_DC

We think that the PPSMC_SYSTEMFLAG_GPIO_DC flag
makes the SMC assume it's running on battery even
though this is a desktop machine with no battery,
and that's why it doesn't do DPM on power states
without PPSMC_SYSTEMFLAG_GPIO_DC.

Issue was uncovered by "Fix updating clock limits from
power states" because previously the limits for the
battery state were not tracked separately. However,
battery power state has lower frequencies and voltages,
so the kernel doesn't set the DC flag on the current
power state anymore. That causes the SMC to be stuck
on the lowest clocks.

Let's clear PPSMC_SYSTEMFLAG_GPIO_DC on desktop GPUs.
We can use the AMD_IS_MOBILITY flag to determine that.

Fixes: e6c5d36756 ("drm/amd/pm/si: Fix updating clock limits from power states")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/work_items/16352
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Link: https://patch.msgid.link/20260923120354.1027996-1-timur.kristof@gmail.com
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-10-01 11:18:21 -04:00
Prike Liang
8d3b778257 drm/amd/display: fix dml-wrapper file discovery for out-of-tree builds
Anchor the object search to the DML wrapper top-level Makefile directory.
This allows source files in subdirectories to be properly discovered and
compiled with the required FPU CFLAGS, fixing SSE compilation errors.

Signed-off-by: Prike Liang <Prike.Liang@amd.com>
Reviewed-by: Leo Li <sunpeng.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-10-01 11:18:13 -04:00
Shiwu Zhang
d4c2b50b10 drm/amdgpu: enlarge the waiting time for psp cmd
Just wait longer for psp command to complete.

Signed-off-by: Shiwu Zhang <shiwu.zhang@amd.com>
Signed-off-by: Mukul Joshi <mukul.joshi@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-10-01 11:18:06 -04:00
Alex Sierra
acef787228 drm/amdgpu: disable XNACK replay for all VMIDs on GC 12.1.0 A0
XNACK is not supported on A0. Updating RETRY_DISABLE only for the VMID
in use gives unreliable control, so all VMIDs must be programmed
identically.

Set SH_MEM_CONFIG.RETRY_DISABLE = 1 on rev_id 0 for every VMID in both
constants init and compute VMID init, so XNACK replay is off from device
boot up.

Signed-off-by: Alex Sierra <alex.sierra@amd.com>
Reviewed-by: Mukul Joshi <mukul.joshi@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-10-01 11:17:57 -04:00
Timur Kristóf
843b525180 drm/amdgpu: Delete unimplemented DM soft_reset() code
The soft_reset() function for the DCE / DCN blocks
has never been implemented, and there are no
plans to implement it.

Let's delete this function, it doesn't do anything and
also isn't called from anywhere.

Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-10-01 11:17:51 -04:00
Timur Kristóf
1072aa811e drm/amd/display: Mark DCE 6.4 as not APU
DCE 6.4 is found in Oland chips, which were advertised
as low-end gaming GPUs in 2013~2015 and then have been
sold as low-end workstation GPUs until 2017~2019.

These are not APUs.

Fixes: 7c15fd86aa ("drm/amd/display: dc/dce: add initial DCE6 support (v10)")
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Link: https://patch.msgid.link/20260923122033.1046651-3-timur.kristof@gmail.com
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-10-01 11:17:24 -04:00
Timur Kristóf
5760537955 drm/amd/display: Fix fast updates on DCE 8.1
DCE8 should use legacy fast updates.
This was already set for DCE 8.0 and 8.3, but it seems
that DCE 8.1 (found in Kaveri chips) was forgotten.

This fix should be backported to all kernel versions that
have "Refactor fast update to use new HWSS build sequence",
but this patch won't apply cleanly to older kernels due to
another refactor in "Remove dc param from check_update".

Fixes: 0baae62463 ("drm/amd/display: Refactor fast update to use new HWSS build sequence")
Fixes: 9ec11bb842 ("drm/amd/display: Remove dc param from check_update")
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Link: https://patch.msgid.link/20260923122033.1046651-2-timur.kristof@gmail.com
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-10-01 11:17:09 -04:00
Timur Kristóf
698fda6e36 drm/amd/display: Fix fast updates on DCE 6.x
DCE6 should use legacy fast updates, just like all DCE8 - DCN2.
Set that flag for DCE 6.0, 6.1 and 6.4 (all DCE6 versions).

Technically DCE6 should have been included when the fast update
code was refactored, but it just happened to work until now.

A recent commit "Attach only plane updates that actually changed"
has exposed this issue because with that commit, DC accidentally
took the new fast update code path for DCE6 as well, which caused
it to boot into a black screen with a flip done timeout.

This fix should be backported to all kernel versions that
have "Refactor fast update to use new HWSS build sequence",
but this patch won't apply cleanly to older kernels due to
another refactor in "Remove dc param from check_update".

Fixes: 0baae62463 ("drm/amd/display: Refactor fast update to use new HWSS build sequence")
Fixes: 9ec11bb842 ("drm/amd/display: Remove dc param from check_update")
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Link: https://patch.msgid.link/20260923122033.1046651-1-timur.kristof@gmail.com
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-10-01 11:15:40 -04:00
Arthur Heymans
ccb6c27020 drm/amd/display: Preserve eDP mode on initial ASSR failure
Commit 56d8ce9d8c ("drm/amd/display: Apply correct panel mode when
reinitializing hardware") made ASSR failure fall back to the default panel
mode unless eDP mode had previously been applied.

However, dc_link is zero-initialized and DP_PANEL_MODE_DEFAULT is zero.
Before the first call to dp_set_panel_mode(), panel_mode therefore looks
like a previously applied default mode. If ASSR setup fails during the
first link training attempt, the driver incorrectly trains the eDP link
using the default scrambling mode.

On a Google Vilboz Chromebook running self-built coreboot firmware and
PSP verstage, this leaves the panel mostly black with corrupted output
along the top edge.

Track whether panel_mode has actually been initialized, and only consult
the saved mode after it has been applied. This retains the recovery
behavior while preserving eDP mode during initial link training.

Fixes: 56d8ce9d8c ("drm/amd/display: Apply correct panel mode when reinitializing hardware")
Assisted-by: Pi:gpt-5.6-sol
Reviewed-by: George Zhang <george.zhang@amd.com>
Reviewed-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: Dan Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-10-01 11:13:31 -04:00
Adrian Betschart
d23f735d0e drm/amd/display: Default HDMI RGB output to limited range on CTA modes
With the Broadcast RGB property at Automatic,
amdgpu_dm_get_output_color_space() selects COLOR_SPACE_SRGB for RGB
output, so DC neither compresses the pixels nor, without a QS-capable
sink, signals full range in the AVI InfoFrame. A sink that follows
CTA-861 treats the default quantization of a CTA video format as limited
and expands 16-235 to 0-255: everything below 16 is crushed to black,
everything above 235 clips.

Follow the CTA-861 default for Automatic instead, as the DRM HDMI state
helper (hdmi_is_limited_range()) and i915 do: limited range on an HDMI
sink for CTA modes other than 640x480, full range elsewhere. Full and
Limited keep their explicit meaning. The same rule applies to the
BT.2020 RGB branch. With commit 892659399f ("drm/amd/display:
Propagate HDMI RGB quantization selectability") the AVI InfoFrame then
carries the matching Q value on sinks that support selection.

Measured on a Radeon RX 7600 (DCN 3.2.1) driving a JVC DLA-RS4100 at
1920x1080p24 RGB 12 bpc: the sink reports the signal as limited range
while the picture shows crushed shadows; rendering limited range in the
client makes it match a reference source.

The KUnit fixtures that reach amdgpu_dm_get_output_color_space() now
carry a connector, since Automatic reads its display_info, and five
cases cover the new rule.

Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/5796
Reviewed-by: George Zhang <george.zhang@amd.com>
Signed-off-by: Adrian Betschart <adrian.betschart@cinemaone.ch>
Assisted-by: Claude Code:claude-fable-5-1
Tested-by: Dan Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-10-01 11:10:23 -04:00
Albert Esteve
5a98f454a6 drm/amd/display: drop INLINE_IFN_KUNIT
This helper was originally static inline. INLINE_IFN_KUNIT only added
inline for KUnit builds, which dropped that hint from production.

There is no equivalent in kunit/visibility.h, and tests do not need
one: they call the exported symbol from another translation unit.
Use an unconditional inline with VISIBLE_IF_KUNIT instead so
production stays static inline.

kernel-doc already strips inline, so the dedicated xform can go too.

Reviewed-by: George Zhang <george.zhang@amd.com>
Signed-off-by: Albert Esteve <aesteve@redhat.com>
Tested-by: Dan Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-10-01 11:09:13 -04:00