]> git.ipfire.org Git - thirdparty/kernel/linux.git/log
thirdparty/kernel/linux.git
5 weeks agodrm/amd/amdgpu: Port over some missing registers and bits from GC 10.1 to 10.3 (v2)
Tom St Denis [Tue, 2 Dec 2025 15:05:51 +0000 (10:05 -0500)] 
drm/amd/amdgpu: Port over some missing registers and bits from GC 10.1 to 10.3 (v2)

v2: Added SPI bits to sh_mask header

Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amd/pm: Add smu driver table structure
Lijo Lazar [Tue, 2 Dec 2025 07:07:32 +0000 (12:37 +0530)] 
drm/amd/pm: Add smu driver table structure

For interfaces like gpu metrics, driver returns a formatted structure
based on IP version. Add a separate data structure for such tables which
also tracks the cache intervals.

Signed-off-by: Lijo Lazar <lijo.lazar@amd.com>
Reviewed-by: Asad Kamal <asad.kamal@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amd/pm: fix pp_dpm_pcie wrong state issue for smu v13.0.0
Yang Wang [Thu, 11 Dec 2025 04:46:52 +0000 (12:46 +0800)] 
drm/amd/pm: fix pp_dpm_pcie wrong state issue for smu v13.0.0

put wrong value into incorrect data into following function,
which caused it to fail to match the correct item on smu v13.0.0:
smu_cmn_print_pcie_levels()

Fixes: a95f01edd80b ("drm/amd/pm: Use common helper for smuv13.0.0 dpm")
Signed-off-by: Yang Wang <kevinyang.wang@amd.com>
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amd/pm: fix pp_dpm_pcie wrong state issue for smu v13.0.7
Yang Wang [Thu, 11 Dec 2025 04:49:35 +0000 (12:49 +0800)] 
drm/amd/pm: fix pp_dpm_pcie wrong state issue for smu v13.0.7

put wrong value into incorrect data into following function,
which caused it to fail to match the correct item on smu v13.0.7:
smu_cmn_print_pcie_levels()

Fixes: b2debbbb60f1 ("drm/amd/pm: Use common helper for smuv13.0.7 dpm")
Signed-off-by: Yang Wang <kevinyang.wang@amd.com>
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amd/pm: fix pp_dpm_pcie wrong state issue for smu v14.0.2
Yang Wang [Wed, 10 Dec 2025 12:33:43 +0000 (20:33 +0800)] 
drm/amd/pm: fix pp_dpm_pcie wrong state issue for smu v14.0.2

put wrong value into incorrect data into following function,
which caused it to fail to match the correct item on smu v14.0.2:
smu_cmn_print_pcie_levels()

Fixes: 03d11f8564ca ("drm/amd/pm: Use common helper for smuv14.0.2 dpm")
Signed-off-by: Yang Wang <kevinyang.wang@amd.com>
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amd/pm: add smu pcie dpm cap & width convert helper
Yang Wang [Wed, 10 Dec 2025 12:27:42 +0000 (20:27 +0800)] 
drm/amd/pm: add smu pcie dpm cap & width convert helper

define following heler to convert pmfw pcie dpm index to smu index.
- SMU_DPM_PCIE_GEN_IDX(gen)
- SMU_DPM_PCIE_WIDTH_IDX(width)

Signed-off-by: Yang Wang <kevinyang.wang@amd.com>
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amdkfd: update outdated comment
Julia Lawall [Tue, 30 Dec 2025 16:17:17 +0000 (17:17 +0100)] 
drm/amdkfd: update outdated comment

The function acquire_packet_buffer() was renamed
kq_acquire_packet_buffer() by commit a5a4d68c9326 ("drm/amdkfd:
Eliminate unnecessary kernel queue function pointers").  Update
the comment accordingly.

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>
Signed-off-by: Felix Kuehling <felix.kuehling@amd.com>
Reviewed-by: Felix Kuehling <felix.kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amdgpu: update outdated comment
Julia Lawall [Tue, 30 Dec 2025 17:53:53 +0000 (18:53 +0100)] 
drm/amdgpu: update outdated comment

The function amdgpu_amdkfd_gpuvm_import_dmabuf() was split into
import_obj_create() and amdgpu_amdkfd_gpuvm_import_dmabuf_fd() in
commit 0188006d7c79 ("drm/amdkfd: Import DMABufs for interop
through DRM").  import_obj_create() now does the allocation for
the mem variable discussed in the comment.

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>
Signed-off-by: Felix Kuehling <felix.kuehling@amd.com>
Reviewed-by: Felix Kuehling <felix.kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amd/pm: Disable MMIO access during SMU Mode 1 reset
Perry Yuan [Thu, 25 Dec 2025 08:43:49 +0000 (16:43 +0800)] 
drm/amd/pm: Disable MMIO access during SMU Mode 1 reset

During Mode 1 reset, the ASIC undergoes a reset cycle and becomes
temporarily inaccessible via PCIe. Any attempt to access MMIO registers
during this window (e.g., from interrupt handlers or other driver threads)
can result in uncompleted PCIe transactions, leading to NMI panics or
system hangs.

To prevent this, set the `no_hw_access` flag to true immediately after
triggering the reset. This signals other driver components to skip
register accesses while the device is offline.

A memory barrier `smp_mb()` is added to ensure the flag update is
globally visible to all cores before the driver enters the sleep/wait
state.

Signed-off-by: Perry Yuan <perry.yuan@amd.com>
Reviewed-by: Yifan Zhang <yifan1.zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amdgpu: Refactor amdgpu_gem_va_ioctl for Handling Last Fence Update and Timeline...
Srinivasan Shanmugam [Thu, 11 Dec 2025 15:55:20 +0000 (21:25 +0530)] 
drm/amdgpu: Refactor amdgpu_gem_va_ioctl for Handling Last Fence Update and Timeline Management v4

This commit simplifies the amdgpu_gem_va_ioctl function, key updates
include:
 - Moved the logic for managing the last update fence directly into
   amdgpu_gem_va_update_vm.
 - Introduced checks for the timeline point to enable conditional
   replacement or addition of fences.

v2: Addressed review comments from Christian.
v3: Updated comments (Christian).
v4: The previous version selected the fence too early and did not manage its
    reference correctly, which could lead to stale or freed fences being used.
    This resulted in refcount underflows and could crash when updating GPU
    timelines.
    The fence is now chosen only after the VA mapping work is completed, and its
    reference is taken safely. After exporting it to the VM timeline syncobj, the
    driver always drops its local fence reference, ensuring balanced refcounting
    and avoiding use-after-free on dma_fence.

Crash signature:
[  205.828135] refcount_t: underflow; use-after-free.
[  205.832963] WARNING: CPU: 30 PID: 7274 at lib/refcount.c:28 refcount_warn_saturate+0xbe/0x110
...
[  206.074014] Call Trace:
[  206.076488]  <TASK>
[  206.078608]  amdgpu_gem_va_ioctl+0x6ea/0x740 [amdgpu]
[  206.084040]  ? __pfx_amdgpu_gem_va_ioctl+0x10/0x10 [amdgpu]
[  206.089994]  drm_ioctl_kernel+0x86/0xe0 [drm]
[  206.094415]  drm_ioctl+0x26e/0x520 [drm]
[  206.098424]  ? __pfx_amdgpu_gem_va_ioctl+0x10/0x10 [amdgpu]
[  206.104402]  amdgpu_drm_ioctl+0x4b/0x80 [amdgpu]
[  206.109387]  __x64_sys_ioctl+0x96/0xe0
[  206.113156]  do_syscall_64+0x66/0x2d0
...
[  206.553351] BUG: unable to handle page fault for address: ffffffffc0dfde90
...
[  206.553378] RIP: 0010:dma_fence_signal_timestamp_locked+0x39/0xe0
...
[  206.553405] Call Trace:
[  206.553409]  <IRQ>
[  206.553415]  ? __pfx_drm_sched_fence_free_rcu+0x10/0x10 [gpu_sched]
[  206.553424]  dma_fence_signal+0x30/0x60
[  206.553427]  drm_sched_job_done.isra.0+0x123/0x150 [gpu_sched]
[  206.553434]  dma_fence_signal_timestamp_locked+0x6e/0xe0
[  206.553437]  dma_fence_signal+0x30/0x60
[  206.553441]  amdgpu_fence_process+0xd8/0x150 [amdgpu]
[  206.553854]  sdma_v4_0_process_trap_irq+0x97/0xb0 [amdgpu]
[  206.554353]  edac_mce_amd(E) ee1004(E)
[  206.554270]  amdgpu_irq_dispatch+0x150/0x230 [amdgpu]
[  206.554702]  amdgpu_ih_process+0x6a/0x180 [amdgpu]
[  206.555101]  amdgpu_irq_handler+0x23/0x60 [amdgpu]
[  206.555500]  __handle_irq_event_percpu+0x4a/0x1c0
[  206.555506]  handle_irq_event+0x38/0x80
[  206.555509]  handle_edge_irq+0x92/0x1e0
[  206.555513]  __common_interrupt+0x3e/0xb0
[  206.555519]  common_interrupt+0x80/0xa0
[  206.555525]  </IRQ>
[  206.555527]  <TASK>
...
[  206.555650] RIP: 0010:dma_fence_signal_timestamp_locked+0x39/0xe0
...
[  206.555667] Kernel panic - not syncing: Fatal exception in interrupt

Link: https://patchwork.freedesktop.org/patch/654669/
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Christian König <christian.koenig@amd.com>
Suggested-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amdgpu: only check critical address when it is not reserved
Gangliang Xie [Mon, 22 Dec 2025 08:48:22 +0000 (16:48 +0800)] 
drm/amdgpu: only check critical address when it is not reserved

when an address is reserved already, no need to check if it is
in critical or not, to save time

Signed-off-by: Gangliang Xie <ganglxie@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amdgpu: Fix query for VPE block_type and ip_count
Alan Liu [Mon, 22 Dec 2025 04:26:35 +0000 (12:26 +0800)] 
drm/amdgpu: Fix query for VPE block_type and ip_count

[Why]
Query for VPE block_type and ip_count is missing.

[How]
Add VPE case in ip_block_type and hw_ip_count query.

Reviewed-by: Lang Yu <lang.yu@amd.com>
Signed-off-by: Alan Liu <haoping.liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amd/ras: Replace NPS flags in ras module
Jinzhou Su [Tue, 23 Dec 2025 05:45:16 +0000 (13:45 +0800)] 
drm/amd/ras: Replace NPS flags in ras module

Replace AMDGPU_NPS8_PARTITION_MODE with
UMC_MEMORY_PARTITION_MODE_NPS8 to pass sriov
compilation.

Signed-off-by: Jinzhou Su <jinzhou.su@amd.com>
Reviewed-by: YiPeng Chai <YiPeng.Chai@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amd/display: Don't repeat DAC load detection
Timur Kristóf [Sat, 6 Dec 2025 02:31:06 +0000 (03:31 +0100)] 
drm/amd/display: Don't repeat DAC load detection

The analog link detection code path had already performed the
DAC load detection by the time the EDID read is attempted.
So there is no need to repeat the DAC load detection,
we can know that no display is connected if no EDID is read.

Fixes: ac1bb4952267 ("drm/amd/display: Use DAC load detection on analog connectors (v2)")
Suggested-by: Alex Hung <alex.hung@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amd/display: Add missing encoder setup to DACnEncoderControl
Timur Kristóf [Sat, 6 Dec 2025 02:31:04 +0000 (03:31 +0100)] 
drm/amd/display: Add missing encoder setup to DACnEncoderControl

Apparently the DAC encoder needs to be set up before use.
The BIOS parser in DC did not support this so I assumed it was
not necessary, but the DAC doesn't work without it on some GPUs.

Fixes: 69b29b894660 ("drm/amd/display: Hook up DAC to bios_parser_encoder_control")
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amd/display: Correct color depth for SelectCRTC_Source
Timur Kristóf [Sat, 6 Dec 2025 02:31:03 +0000 (03:31 +0100)] 
drm/amd/display: Correct color depth for SelectCRTC_Source

Pass the correct enum values as expected by the VBIOS.
Previously the actual bit depth integer value was passed,
which was a mistake.

Fixes: 7fb4f254c8eb ("drm/amd/display: Add SelectCRTC_Source to BIOS parser")
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amd/display: Pass proper DAC encoder ID to VBIOS
Timur Kristóf [Sat, 6 Dec 2025 02:31:02 +0000 (03:31 +0100)] 
drm/amd/display: Pass proper DAC encoder ID to VBIOS

Similarly to the analog_engine field, add a new analog_id field
which contains the encoder ID of the analog encoder that
corresponds to the link encoder.

Previously, the default encoder ID of the link encoder was used,
which meant that we passed the wrong ID in case of DVI-I.

Fixes: 5834c33fd3f6 ("drm/amd/display: Add concept of analog encoders (v2)")
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amdgpu/gfx9: Implement KGQ ring reset
Alex Deucher [Wed, 20 Aug 2025 14:07:38 +0000 (10:07 -0400)] 
drm/amdgpu/gfx9: Implement KGQ ring reset

GFX ring resets work differently on pre-GFX10 hardware since
there is no MQD managed by the scheduler.
For ring reset, you need issue the reset via CP_VMID_RESET
via KIQ or MMIO and submit the following to the gfx ring to
complete the reset:
1. EOP packet with EXEC bit set
2. WAIT_REG_MEM to wait for the fence
3. Clear CP_VMID_RESET to 0
4. EVENT_WRITE ENABLE_LEGACY_PIPELINE
5. EOP packet with EXEC bit set
6. WAIT_REG_MEM to wait for the fence
Once those commands have completed the reset should
be complete and the ring can accept new packets.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Tested-by: Jiqian Chen <Jiqian.Chen@amd.com> (v1)
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amdgpu/gfx9: rework pipeline sync packet sequence
Alex Deucher [Thu, 18 Dec 2025 20:04:33 +0000 (15:04 -0500)] 
drm/amdgpu/gfx9: rework pipeline sync packet sequence

Replace WAIT_REG_MEM with EVENT_WRITE flushes for all
shader types and ACQUIRE_MEM.  That should accomplish
the same thing and avoid having to wait on a fence
preventing any issues with pipeline syncs during
queue resets.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amdgpu: avoid a warning in timedout job handler
Alex Deucher [Fri, 12 Dec 2025 16:46:48 +0000 (11:46 -0500)] 
drm/amdgpu: avoid a warning in timedout job handler

Only set an error on the fence if the fence is not
signalled.  We can end up with a warning if the
per queue reset path signals the fence and sets an error
as part of the reset, but fails to recover.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amd/amdgpu: Fix SMU warning during isp suspend-resume
Pratap Nirujogi [Wed, 10 Dec 2025 01:22:15 +0000 (20:22 -0500)] 
drm/amd/amdgpu: Fix SMU warning during isp suspend-resume

ISP mfd child devices are using genpd and the system suspend-resume
operations between genpd and amdgpu parent device which uses only
runtime suspend-resume are not in sync.

Linux power manager during suspend-resume resuming the genpd devices
earlier than the amdgpu parent device. This is resulting in the below
warning as SMU is in suspended state when genpd attempts to resume ISP.

WARNING: CPU: 13 PID: 5435 at drivers/gpu/drm/amd/amdgpu/../pm/swsmu/amdgpu_smu.c:398 smu_dpm_set_power_gate+0x36f/0x380 [amdgpu]

To fix this warning isp suspend-resume is handled as part of amdgpu
parent device suspend-resume instead of genpd sequence. Each ISP MFD
child device is marked as dev_pm_syscore_device to skip genpd
suspend-resume and use pm_runtime_force api's to suspend-resume
the devices when callbacks from amdgpu are received.

Co-developed-by: Gjorgji Rosikopulos <grosikop@amd.com>
Signed-off-by: Gjorgji Rosikopulos <grosikop@amd.com>
Signed-off-by: Bin Du <bin.du@amd.com>
Signed-off-by: Pratap Nirujogi <pratap.nirujogi@amd.com>
Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amd/display: Promote DC to 3.2.364
Taimur Hassan [Sat, 13 Dec 2025 02:32:55 +0000 (21:32 -0500)] 
drm/amd/display: Promote DC to 3.2.364

This version brings along the following updates:

 - Add frame skip feature support flag.
 - Add sink EDID data null check.
 - Update function name to link_detect_connection_type_analog.
 - Fix mismatched unlock for DMUB HW lock in HWSS fast path.
 - Fix P010, NV12, YUY2 scale down by four times failure.
 - Fix and reenable UPDATE_V3_FLOW_NEW_CONTEXT_MINIMAL.
 - Consolidate dmub fb info to a single struct.
 - Add new fields to fams2 config.
 - Update timing source enums.
 - Add signal type check for dcn401 get_phyd32clk_src.
 - Fix dsc eDP issue.
 - Remove unnecessary divider update flag.
 - Update dc_connection_dac_load to dc_connection_analog_load.
 - Check NULL before calling dac_load_detection.
 - Replace log macro for analog display detection.

Reviewed-by: Rodrigo Siqueira <rodrigo.siqueira@amd.com>
Signed-off-by: Taimur Hassan <Syed.Hassan@amd.com>
Signed-off-by: Chenyu Chen <chen-yu.chen@amd.com>
Acked-by: Wayne Lin <Wayne.Lin@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amd/display: Replace log macro for analog display detection
Alex Hung [Mon, 8 Dec 2025 19:18:02 +0000 (12:18 -0700)] 
drm/amd/display: Replace log macro for analog display detection

link detection should use LINK_INFO() macro.

Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Chenyu Chen <chen-yu.chen@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amd/display: Check NULL before calling dac_load_detection
Alex Hung [Mon, 8 Dec 2025 19:11:43 +0000 (12:11 -0700)] 
drm/amd/display: Check NULL before calling dac_load_detection

dac_load_detection can be NULL in some scenario, so checking it before
calling.

Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Chenyu Chen <chen-yu.chen@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amd/display: Update dc_connection_dac_load to dc_connection_analog_load
Alex Hung [Mon, 8 Dec 2025 19:09:08 +0000 (12:09 -0700)] 
drm/amd/display: Update dc_connection_dac_load to dc_connection_analog_load

Update to a more accurate name dc_connection_analog_load.

Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Chenyu Chen <chen-yu.chen@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amd/display: Remove unnecessary divider update flag
Cruise Hung [Fri, 5 Dec 2025 13:22:44 +0000 (21:22 +0800)] 
drm/amd/display: Remove unnecessary divider update flag

[Why]
When transitioning from 640x480 at RBRx1 to HBR3x1,
both output pixel mode and pixel rate divider should update.
The needs_divider_update flag was only for 8b10b and 128b132b transition.

[How]
Remove needs_divider_update flag.

Reviewed-by: Michael Strauss <michael.strauss@amd.com>
Reviewed-by: Wenjing Liu <wenjing.liu@amd.com>
Signed-off-by: Cruise Hung <Cruise.Hung@amd.com>
Signed-off-by: Chenyu Chen <chen-yu.chen@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amd/display: Fix dsc eDP issue
Charlene Liu [Wed, 10 Dec 2025 22:01:17 +0000 (17:01 -0500)] 
drm/amd/display: Fix dsc eDP issue

[why]
Need to add function hook check before use

Reviewed-by: Mohit Bawa <mohit.bawa@amd.com>
Signed-off-by: Charlene Liu <Charlene.Liu@amd.com>
Signed-off-by: Chenyu Chen <chen-yu.chen@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amd/display: Add signal type check for dcn401 get_phyd32clk_src
Dmytro Laktyushkin [Wed, 10 Dec 2025 20:52:39 +0000 (15:52 -0500)] 
drm/amd/display: Add signal type check for dcn401 get_phyd32clk_src

Trying to access link enc on a dpia link will cause a crash otherwise

Reviewed-by: Charlene Liu <charlene.liu@amd.com>
Signed-off-by: Dmytro Laktyushkin <dmytro.laktyushkin@amd.com>
Signed-off-by: Chenyu Chen <chen-yu.chen@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amd/display: Update timing source enums
Clay King [Wed, 10 Dec 2025 18:39:04 +0000 (13:39 -0500)] 
drm/amd/display: Update timing source enums

Added missing enum for CEA VIC

Reviewed-by: Joshua Aberback <joshua.aberback@amd.com>
Signed-off-by: Clay King <clayking@amd.com>
Signed-off-by: Chenyu Chen <chen-yu.chen@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amd/display: Add new fields to fams2 config
Dillon Varone [Tue, 9 Dec 2025 21:12:40 +0000 (16:12 -0500)] 
drm/amd/display: Add new fields to fams2 config

[WHY&HOW]
Adds new fields to the fams2 configuration structure.

Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Signed-off-by: Dillon Varone <Dillon.Varone@amd.com>
Signed-off-by: Chenyu Chen <chen-yu.chen@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amd/display: Consolidate dmub fb info to a single struct
Dillon Varone [Tue, 9 Dec 2025 20:26:33 +0000 (15:26 -0500)] 
drm/amd/display: Consolidate dmub fb info to a single struct

[WHY&HOW]
Consolidate dmub fb info into a single structure to simplify translation
between components.

Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Signed-off-by: Dillon Varone <Dillon.Varone@amd.com>
Signed-off-by: Chenyu Chen <chen-yu.chen@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amd/display: Fix and reenable UPDATE_V3_FLOW_NEW_CONTEXT_MINIMAL
Dominik Kaszewski [Wed, 26 Nov 2025 12:00:44 +0000 (13:00 +0100)] 
drm/amd/display: Fix and reenable UPDATE_V3_FLOW_NEW_CONTEXT_MINIMAL

[Why]
Reenable new split implementation, previously partially reverted due
to issues with ODM on high-bandwidth displays 4k144Hz, resulting
in a corrupted gray screen.

Minimal flows require two separate commits, with extra intermediate
commit to enable seamless transitions, each followed by a swap. Since
new design requires commit to be run in execute and swap in cleanup
stage, an attempt was made to reorder them from CSCS (Commit-Swap-Commit-Swap)
to CCSS (Commit-Commit-Swap-Swap). Not only is this not viable, but
was implemented incorrectly as CCS, one swap missing.

[How]
* Change UPDATE_V3_FLOW_NEW_CONTEXT_MINIMAL_NEW/CURRENT to execute
and cleanup one commit, then run UPDATE_V3_FLOW_NEW_CONTEXT_SEAMLESS,
which closely matches old implementation where minimal flows fall back
to seamless.
* Fix uninitialized variable error.

Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Signed-off-by: Dominik Kaszewski <dominik.kaszewski@amd.com>
Signed-off-by: Chenyu Chen <chen-yu.chen@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amd/display: Fix P010, NV12, YUY2 scale down by four times failure
Kaier Hsueg [Thu, 4 Dec 2025 16:33:59 +0000 (00:33 +0800)] 
drm/amd/display: Fix P010, NV12, YUY2 scale down by four times failure

[WHY]
When performing 4:1 downscaling with subsampled formats,
the SPL remainder distribution logic (+1) overrides the
upper layer’s aligned width, resulting in odd segment
widths and causing hang.

The upper layer alignment ensures the width is sufficient
and even, so SPL should not modify it further.

[HOW]
In dc_spl.c within calculate_mpc_slice_in_timing_active,
add an extra condition: Skip the remainder distribution
(+1) when use_recout_width_aligned is true.This change
respects the upper layer’s alignment decision, prevents
odd widths, and is a minimal, safe fix.

Reviewed-by: Joshua Aberback <joshua.aberback@amd.com>
Signed-off-by: Kaier Hsueh <Kaier.Hsueh@amd.com>
Signed-off-by: Chenyu Chen <chen-yu.chen@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amd/display: Fix mismatched unlock for DMUB HW lock in HWSS fast path
Nicholas Kazlauskas [Mon, 8 Dec 2025 19:08:56 +0000 (14:08 -0500)] 
drm/amd/display: Fix mismatched unlock for DMUB HW lock in HWSS fast path

[Why]
The evaluation for whether we need to use the DMUB HW lock isn't the
same as whether we need to unlock which results in a hang when the
fast path is used for ASIC without FAMS support.

[How]
Store a flag that indicates whether we should use the lock and use
that same flag to specify whether unlocking is needed.

Reviewed-by: Swapnil Patel <swapnil.patel@amd.com>
Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Signed-off-by: Chenyu Chen <chen-yu.chen@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amd/display: Update function name to link_detect_connection_type_analog
Alex Hung [Tue, 2 Dec 2025 18:54:56 +0000 (11:54 -0700)] 
drm/amd/display: Update function name to link_detect_connection_type_analog

[WHAT]
Update function "link_detect_analog" to a more accurate name
"link_detect_connection_type_analog".

Suggested-by: Wenjing Liu <wenjing.liu@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Chenyu Chen <chen-yu.chen@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amd/display: sink EDID data null check
Richard Chiang [Wed, 3 Dec 2025 14:24:59 +0000 (22:24 +0800)] 
drm/amd/display: sink EDID data null check

[Why]
When sink EDID data pointer is NULL, it will cause an
unexpected error.

[How]
Check data pointer is not NULL first.

Reviewed-by: Yihan Zhu <yihan.zhu@amd.com>
Signed-off-by: Richard Chiang <Richard.Chiang@amd.com>
Signed-off-by: Chenyu Chen <chen-yu.chen@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amd/display: Add frame skip feature support flag
ChunTao Tso [Mon, 8 Dec 2025 09:36:57 +0000 (17:36 +0800)] 
drm/amd/display: Add frame skip feature support flag

[WHY]
The set_replay_frame_skip_number() function should not execute when
the link does not support the Frame Skipping feature.

[HOW]
Add a new field `frame_skip_supported` to struct replay_config to
indicate whether the link supports frame skipping. Check this flag
at the beginning of set_replay_frame_skip_number() and return early
if the feature is not supported.

Reviewed-by: Robin Chen <robin.chen@amd.com>
Signed-off-by: ChunTao Tso <chuntao.tso@amd.com>
Signed-off-by: Chenyu Chen <chen-yu.chen@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amd/pm: force send pcie parmater on navi1x
Yang Wang [Mon, 15 Dec 2025 09:51:11 +0000 (17:51 +0800)] 
drm/amd/pm: force send pcie parmater on navi1x

v1:
the PMFW didn't initialize the PCIe DPM parameters
and requires the KMD to actively provide these parameters.

v2:
clean & remove unused code logic (lijo)

Fixes: 1a18607c07bb ("drm/amd/pm: override pcie dpm parameters only if it is necessary")
Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4671
Signed-off-by: Yang Wang <kevinyang.wang@amd.com>
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amdgpu: use dma_fence_get_status() for adapter reset
Alex Deucher [Fri, 12 Dec 2025 16:13:58 +0000 (11:13 -0500)] 
drm/amdgpu: use dma_fence_get_status() for adapter reset

We need to check if the fence was signaled without an
error as the per queue resets may have signalled the fence
while attempting to reset the queue.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agoDocumentation/amdgpu: Add UMA carveout details
Yo-Jung Leo Lin (AMD) [Fri, 12 Dec 2025 07:59:17 +0000 (15:59 +0800)] 
Documentation/amdgpu: Add UMA carveout details

Add documentation for the uma/carveout_options and uma/carveout
attributes in sysfs

Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Yo-Jung Leo Lin (AMD) <Leo.Lin@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amdgpu: add UMA allocation interfaces to sysfs
Yo-Jung Leo Lin (AMD) [Fri, 12 Dec 2025 07:59:16 +0000 (15:59 +0800)] 
drm/amdgpu: add UMA allocation interfaces to sysfs

Add a uma/ directory containing two sysfs files as interfaces to
inspect or change UMA carveout size. These files are:

- uma/carveout_options: a read-only file listing all the available
  UMA allocation options and their index.

- uma/carveout: a file that is both readable and writable. On read,
  it shows the index of the current setting. Writing a valid index
  into this file allows users to change the UMA carveout size to that
  option on the next boot.

Co-developed-by: Mario Limonciello (AMD) <superm1@kernel.org>
Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Yo-Jung Leo Lin (AMD) <Leo.Lin@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amdgpu: add UMA allocation setting helpers
Yo-Jung Leo Lin (AMD) [Fri, 12 Dec 2025 07:59:15 +0000 (15:59 +0800)] 
drm/amdgpu: add UMA allocation setting helpers

On some platforms, UMA allocation size can be set using the ATCS
methods. Add helper functions to interact with this functionality.

Co-developed-by: Mario Limonciello (AMD) <superm1@kernel.org>
Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Yo-Jung Leo Lin (AMD) <Leo.Lin@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amdgpu: add helper to read UMA carveout info
Yo-Jung Leo Lin (AMD) [Fri, 12 Dec 2025 07:59:14 +0000 (15:59 +0800)] 
drm/amdgpu: add helper to read UMA carveout info

Currently, the available UMA allocation configs in the integrated system
information table have not been parsed. Add a helper function to retrieve
and store these configs.

Co-developed-by: Mario Limonciello (AMD) <superm1@kernel.org>
Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Yo-Jung Leo Lin (AMD) <Leo.Lin@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amdgpu: parse UMA size-getting/setting bits in ATCS mask
Yo-Jung Leo Lin (AMD) [Fri, 12 Dec 2025 07:59:13 +0000 (15:59 +0800)] 
drm/amdgpu: parse UMA size-getting/setting bits in ATCS mask

The capabilities of getting and setting VRAM carveout size are exposed
in the ATCS mask. Parse and store these capabilities for future use.

Co-developed-by: Mario Limonciello (AMD) <superm1@kernel.org>
Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Yo-Jung Leo Lin (AMD) <Leo.Lin@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amdgpu: always backup and reemit fences
Alex Deucher [Thu, 13 Nov 2025 19:12:10 +0000 (14:12 -0500)] 
drm/amdgpu: always backup and reemit fences

If when we backup the ring contents for reemit before a
ring reset, we skip jobs associated with the bad
context, however, we need to make sure the fences
are reemited as unprocessed submissions may depend on
them.

v2: clean up fence handling, make helpers static

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amdgpu: don't reemit ring contents more than once
Alex Deucher [Thu, 13 Nov 2025 18:24:10 +0000 (13:24 -0500)] 
drm/amdgpu: don't reemit ring contents more than once

If we cancel a bad job and reemit the ring contents, and
we get another timeout, cancel everything rather than reemitting.
The wptr markers are only relevant for the original emit.  If
we reemit, the wptr markers are no longer correct.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amdgpu: add helpers to access cross-die registers smn addr for soc v1_0
Le Ma [Thu, 6 Nov 2025 04:03:04 +0000 (12:03 +0800)] 
drm/amdgpu: add helpers to access cross-die registers smn addr for soc v1_0

Encode die_id/socket_id for upper 32bits of soc v1_0 registers SMN address.

v2: fix logical error caught by clang

Signed-off-by: Le Ma <le.ma@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amdgpu: RLC-G VF Register Access Interface
Bokun Zhang [Mon, 27 Oct 2025 13:45:33 +0000 (13:45 +0000)] 
drm/amdgpu: RLC-G VF Register Access Interface

- Implement Gfx v12.1 VFi interface under SRIOV
- Redirect all RLCG interface access to new function after
  Gfx v12.1

v2: squash in register updates

Signed-off-by: Bokun Zhang <Bokun.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amdgpu: set aid_mask for soc v1
Likun Gao [Tue, 11 Nov 2025 06:34:20 +0000 (14:34 +0800)] 
drm/amdgpu: set aid_mask for soc v1

Set aid_mask via xcc_mask.

v2: squash in follow up change

Signed-off-by: Likun Gao <Likun.Gao@amd.com>
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amdgpu: Enable support for PSP 15_0_0
Pratik Vishwakarma [Mon, 24 Nov 2025 04:40:21 +0000 (04:40 +0000)] 
drm/amdgpu: Enable support for PSP 15_0_0

Add support for PSP v 15.0.0.

Signed-off-by: Pratik Vishwakarma <Pratik.Vishwakarma@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amdgpu: add MP 15.0.0 headers
Alex Deucher [Fri, 5 Dec 2025 15:56:37 +0000 (10:56 -0500)] 
drm/amdgpu: add MP 15.0.0 headers

Add headers for MP 15.0.0.

v2: squash in updates (Alex)

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amdgpu: add queue reset support for jpeg 5.3
Alex Deucher [Wed, 17 Dec 2025 15:31:58 +0000 (10:31 -0500)] 
drm/amdgpu: add queue reset support for jpeg 5.3

Enable queue reset for JPEG 5.3.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amdgpu/discovery: add vcn and jpeg ip block
Saleemkhan Jamadar [Sun, 5 Oct 2025 08:57:52 +0000 (14:27 +0530)] 
drm/amdgpu/discovery: add vcn and jpeg ip block

Add VCN and jpeg IPs v5_3_0 blocks.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Signed-off-by: Saleemkhan Jamadar <saleemkhan.jamadar@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amdgpu/jpeg: Add jpeg 5.3.0 support
Saleemkhan Jamadar [Sun, 5 Oct 2025 08:51:09 +0000 (14:21 +0530)] 
drm/amdgpu/jpeg: Add jpeg 5.3.0 support

Add the Jpeg IP v5_3_0 code base.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Signed-off-by: Saleemkhan Jamadar <saleemkhan.jamadar@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amdgpu: add VCN 5.3.0 headers
Alex Deucher [Fri, 5 Dec 2025 15:59:30 +0000 (10:59 -0500)] 
drm/amdgpu: add VCN 5.3.0 headers

Add headers for VCN 5.3.0.

v2: Squash in updates (Alex)

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amdgpu: reserve umf hole size at vram high end for gfx v12.1
Le Ma [Fri, 7 Nov 2025 07:23:32 +0000 (15:23 +0800)] 
drm/amdgpu: reserve umf hole size at vram high end for gfx v12.1

This region is reserved by firmware thus carve it out in driver.

v2: set reserve size based on aid configuration.

Signed-off-by: Le Ma <le.ma@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amdgpu: Use explicit VCN instance 0 in SR-IOV init
Srinivasan Shanmugam [Thu, 18 Dec 2025 09:55:25 +0000 (15:25 +0530)] 
drm/amdgpu: Use explicit VCN instance 0 in SR-IOV init

vcn_v2_0_start_sriov() declares a local variable "i" initialized to zero
and uses it only as the instance index in SOC15_REG_OFFSET(UVD, i, ...).
The value is never changed and all other fields are taken from
adev->vcn.inst[0], so this path only ever programs VCN instance 0.

This triggered a Smatch:
warn: iterator 'i' not incremented

Replace the dummy iterator with an explicit instance index of 0 in
SOC15_REG_OFFSET() calls.

Fixes: dd26858a9cd8 ("drm/amdgpu: implement initialization part on VCN2.0 for SRIOV")
Reported by: Dan Carpenter <dan.carpenter@linaro.org>
Cc: darlington Opara <darlington.opara@amd.com>
Cc: Jinage Zhao <jiange.zhao@amd.com>
Cc: Monk Liu <Monk.Liu@amd.com>
Cc: Emily Deng <Emily.Deng@amd.com>
Cc: Christian König <christian.koenig@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
Reviewed-by: Emily Deng <Emily.Deng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amdgpu: enable CP interrupt for gfx v12_1 in frontdoor loading case
Le Ma [Fri, 7 Nov 2025 07:05:56 +0000 (15:05 +0800)] 
drm/amdgpu: enable CP interrupt for gfx v12_1 in frontdoor loading case

Enable cp interrupt for event detection since GFX CGCG and LS
has been enabled by firmware.

v2: enable CP INT by merely checking fw_load_type

Signed-off-by: Le Ma <le.ma@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amdkfd: Apply VGPR bank state fixup on gfx12.1 trap exit
Jay Cornwall [Thu, 23 Oct 2025 20:33:04 +0000 (15:33 -0500)] 
drm/amdkfd: Apply VGPR bank state fixup on gfx12.1 trap exit

- Identify co-issue of S_SET_VGPR_MSB and VALU with banked VGPR
- Restore previous bank setting when exiting the trap

v2:
- Refine VOP3PX2 detection
- Improve load pipelining
- Fix a comment typo

Signed-off-by: Jay Cornwall <jay.cornwall@amd.com>
Reviewed-by: Lancelot Six <lancelot.six@amd.com>
Cc: Joseph Greathouse <joseph.greathouse@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amdkfd: Fix VGPR bank state save in gfx12.1 trap handler
Jay Cornwall [Thu, 23 Oct 2025 20:28:39 +0000 (15:28 -0500)] 
drm/amdkfd: Fix VGPR bank state save in gfx12.1 trap handler

S_SETREG_IMM32_B32 does not apply a mask to the MODE bank bits.
SRC2 is consequently unconditonally cleared during context save.

Use S_SETREG_B32 instead to preserve SRC2.

Signed-off-by: Jay Cornwall <jay.cornwall@amd.com>
Reviewed-by: Lancelot Six <lancelot.six@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amdgpu: Add sysfs up clean for gfx_v12_1
Asad Kamal [Thu, 16 Oct 2025 10:58:05 +0000 (18:58 +0800)] 
drm/amdgpu: Add sysfs up clean for gfx_v12_1

Add sysfs clean up for gfx_v12_1 during gfx fini sequence. This will
prevent following crash while reloading driver

2645.490824] R13: 000055d0cb186330 R14: 000055d0cb185ed0 R15: 000055d0cb188f40
[ 2645.490825]  </TASK>
[ 2645.490836] amdgpu 0000:02:00.0: amdgpu: failed to create xcp sysfs files
[ 2645.490937] amdgpu 0000:02:00.0: amdgpu: sw_init of IP block <gfx_v12_1> failed -17
[ 2645.491018] amdgpu 0000:02:00.0: amdgpu: amdgpu_device_ip_init failed
[ 2645.491098] amdgpu 0000:02:00.0: amdgpu: Fatal error during GPU init
[ 2645.491547] amdgpu 0000:02:00.0: amdgpu: amdgpu: finishing device.
[ 2648.549939] ------------[ cut here ]------------
[ 2648.549942] WARNING: CPU: 0 PID: 2459 at /tmp/amd.aIpOeG3c/amd/amdgpu/amdgpu_irq.c:

Signed-off-by: Asad Kamal <asad.kamal@amd.com>
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amdkfd: Add metadata ring buffer for compute
David Yat Sin [Tue, 18 Mar 2025 19:49:55 +0000 (19:49 +0000)] 
drm/amdkfd: Add metadata ring buffer for compute

Add support for separate ring-buffer for metadata packets when using
compute queues. Userspace application allocate the metadata ring-buffer
and the queue ring-buffer with a single allocation. The metadata
ring-buffer starts after the queue ring-buffer.

Signed-off-by: David Yat Sin <David.YatSin@amd.com>
Reviewed-by: Philip Yang <Philip.Yang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amd/amdgpu : Use the MES INV_TLBS API for tlb invalidation on gfx12_1
Shaoyun Liu [Fri, 1 Aug 2025 02:27:12 +0000 (22:27 -0400)] 
drm/amd/amdgpu : Use the MES INV_TLBS API for tlb invalidation on gfx12_1

Signed-off-by: Shaoyun Liu <shaoyun.liu@amd.com>
Reviewed-by: Prike Liang <Prike.Liang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amdgpu: Update TCP Control register on GFX 12.1
Mukul Joshi [Mon, 15 Sep 2025 14:48:04 +0000 (10:48 -0400)] 
drm/amdgpu: Update TCP Control register on GFX 12.1

Update TCP CNTL register to disable some features not supported
on GFX 12.1.

Signed-off-by: Mukul Joshi <mukul.joshi@amd.com>
Reviewed-by: Alex Sierra <alex.sierra@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amdkfd: Add back CWSR trap handler for GFX 12.1
Mukul Joshi [Fri, 12 Sep 2025 21:48:12 +0000 (17:48 -0400)] 
drm/amdkfd: Add back CWSR trap handler for GFX 12.1

CWSR Trap handler for GFX 12.1 was missed when merging changes
from 6.14 NPI branch to 6.16 NPI branch. This change adds back
the CWSR trap handler for GFX 12.1.

Signed-off-by: Mukul Joshi <mukul.joshi@amd.com>
Reviewed-by: Alex Sierra <alex.sierra@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amdgpu: Cleanup gmc_v12_1 after 6.16 merge
Mukul Joshi [Wed, 10 Sep 2025 18:36:09 +0000 (14:36 -0400)] 
drm/amdgpu: Cleanup gmc_v12_1 after 6.16 merge

After the 6.16 merge, some changes not applicable to GFX 12.1 were
added in the gmc_v12_1_get_vm_pte function. Additionally, add the
case for MTYPE RW for GFX 12.1.

Signed-off-by: Mukul Joshi <mukul.joshi@amd.com>
Reviewed-by: Alex Sierra <alex.sierra@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amdgpu: Disable TCP Early Write Ack for GFX 12.1
Mukul Joshi [Sat, 6 Sep 2025 02:22:32 +0000 (22:22 -0400)] 
drm/amdgpu: Disable TCP Early Write Ack for GFX 12.1

Disable the TCP Early Write Ack feature on GFX 12.1.

Signed-off-by: Mukul Joshi <mukul.joshi@amd.com>
Reviewed-by: Alex Sierra <alex.sierra@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amdkfd: enable precise memory operations for gfx1250
Jonathan Kim [Tue, 9 Sep 2025 19:57:44 +0000 (15:57 -0400)] 
drm/amdkfd: enable precise memory operations for gfx1250

Enable precise memory for GFX 1250.

Signed-off-by: Jonathan Kim <jonathan.kim@amd.com>
Reviewed-by: Mukul Joshi <mukul.joshi@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amdkfd: fix partitioned gfx12 address watch enablement
Jonathan Kim [Mon, 8 Sep 2025 17:40:01 +0000 (17:40 +0000)] 
drm/amdkfd: fix partitioned gfx12 address watch enablement

GFX 12 devices that support spatial partitioning should use the WREG32
per XCC macro when updating address watch settings, similar to GFX 9
devices that support spatial partitioning.

Signed-off-by: Jonathan Kim <jonathan.kim@amd.com>
Reviewed-by: Mukul Joshi <mukul.joshi@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amdkfd: Implement CU Masking for GFX 12.1
Mukul Joshi [Thu, 4 Sep 2025 22:04:29 +0000 (18:04 -0400)] 
drm/amdkfd: Implement CU Masking for GFX 12.1

Add CU masking implementation for GFX 12.1. Add a local
implementation for GFX 12.1 instead of using the generic
function defined in kfd_mqd_manager.c because of some
quirks in the way CU mask is handled on GFX 12.1.

Signed-off-by: Mukul Joshi <mukul.joshi@amd.com>
Reviewed-by: Alex Sierra <alex.sierra@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amdgpu: skip gfxhub tlb flush if gfx is power off
Likun Gao [Mon, 25 Aug 2025 06:23:08 +0000 (14:23 +0800)] 
drm/amdgpu: skip gfxhub tlb flush if gfx is power off

Skip for gfxhub tlb flush for gc v12_1 if gfx is not poweron.

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>
5 weeks agodrm/amdkfd: Add gfx_v12_1_kfd2kgd interface for GFX12_1
Likun Gao [Wed, 27 Aug 2025 02:08:46 +0000 (10:08 +0800)] 
drm/amdkfd: Add gfx_v12_1_kfd2kgd interface for GFX12_1

Create new kfd2kgd interface for gfx v12_1, based on gfx v12.
Support register program accoding to xcc id.
V2: Fix SDMA register address for muti-xcc.

Signed-off-by: Likun Gao <Likun.Gao@amd.com>
Reviewed-by: Mukul Joshi <mukul.joshi@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amdgpu: update mcm_addr_lut data for imu v12_1
Likun Gao [Mon, 18 Aug 2025 07:29:07 +0000 (15:29 +0800)] 
drm/amdgpu: update mcm_addr_lut data for imu v12_1

Support for partition mode to program MCM_ADDR_LUT.

v2: clean up (Alex)

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>
5 weeks agodrm/amdgpu: Init mcm_addr look up table
Hawking Zhang [Thu, 12 Jun 2025 13:52:19 +0000 (21:52 +0800)] 
drm/amdgpu: Init mcm_addr look up table

Encode mcm address look up table in SPX mode
as a temp solution.

v2: fill in when interface is ready (Alex)

Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Likun Gao <Likun.Gao@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amdgpu: Always set PTE.B for device memory on GFX 12.1
Mukul Joshi [Thu, 14 Aug 2025 19:23:16 +0000 (15:23 -0400)] 
drm/amdgpu: Always set PTE.B for device memory on GFX 12.1

On GFX 12.1, we need to set the atomics bit (PTE.B) always for
device memory.

Signed-off-by: Mukul Joshi <mukul.joshi@amd.com>
Reviewed-by: Alex Sierra <alex.sierra@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amdgpu/gfx12.1: Don't fetch default register values from hardware in mqd init
Lang Yu [Tue, 19 Aug 2025 10:54:30 +0000 (18:54 +0800)] 
drm/amdgpu/gfx12.1: Don't fetch default register values from hardware in mqd init

1. We can't assure the fetched values are always default register values.
   Observing non-zero cp_hqd_pq_rptr in mes_v12_1_self_test->init_mqd()
   where no GRBM_GFX_CNTL is specified.

2. See commit fc3c139cf043 ("drm/amdgpu/gfx12: don't read registers in mqd init").

Signed-off-by: Lang Yu <lang.yu@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amd: Convert DRM_*() to drm_*()
Mario Limonciello (AMD) [Mon, 15 Dec 2025 01:12:27 +0000 (19:12 -0600)] 
drm/amd: Convert DRM_*() to drm_*()

The drm_*() macros include the device which is helpful for debugging
issues in multi-GPU systems.

Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org>
Reviewed-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amd: Drop amdgpu prefix from message prints
Mario Limonciello (AMD) [Mon, 15 Dec 2025 01:12:26 +0000 (19:12 -0600)] 
drm/amd: Drop amdgpu prefix from message prints

Hardcoding the prefix isn't necessary when using drm_* or dev_*
message prints.

Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org>
Reviewed-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amd: Convert amdgpu_display from DRM_* to drm_ macros
Mario Limonciello (AMD) [Mon, 15 Dec 2025 01:12:25 +0000 (19:12 -0600)] 
drm/amd: Convert amdgpu_display from DRM_* to drm_ macros

drm_* macros show the device they were called with which is helpful
in multi-GPU systems.

Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org>
Reviewed-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amd/display: Fix DPMS log printing
Mario Limonciello (AMD) [Mon, 15 Dec 2025 01:12:24 +0000 (19:12 -0600)] 
drm/amd/display: Fix DPMS log printing

[Why]
Spaces before newline are not necessary. Inserting newlines in
multi-line strings are harder to follow when tracing messages.

[How]
Drop extra new lines and split multi-line messages into one print
per line.

Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org>
Reviewed-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amd: Drop dev_fmt prefix
Mario Limonciello (AMD) [Mon, 15 Dec 2025 01:12:23 +0000 (19:12 -0600)] 
drm/amd: Drop dev_fmt prefix

The `amdgpu:` prefix in dev_fmt() isn't needed because the core
already includes the driver in the print.

Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org>
Reviewed-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amd: Pass `adev` to amdgpu_gfx_parse_disable_cu()
Mario Limonciello (AMD) [Mon, 15 Dec 2025 01:12:22 +0000 (19:12 -0600)] 
drm/amd: Pass `adev` to amdgpu_gfx_parse_disable_cu()

In order for messages to be attribute to the correct device
amdgpu_gfx_parse_disable_cu() needs to know what device is being
operated on.  Pass the argument in.

Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org>
Reviewed-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amd: Add correct prefix for VBIOS message
Mario Limonciello (AMD) [Mon, 15 Dec 2025 01:12:21 +0000 (19:12 -0600)] 
drm/amd: Add correct prefix for VBIOS message

It's not obvious which GPU the ATOM BIOS message goes with. Use
drm_info() to show the correct one.

Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org>
Reviewed-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amdkfd: Correct the topology message for APUs
Mario Limonciello (AMD) [Mon, 15 Dec 2025 01:12:20 +0000 (19:12 -0600)] 
drm/amdkfd: Correct the topology message for APUs

At bootup on a Strix machine the following message comes up:
```
amdgpu: Topology: Add dGPU node [0x150e:0x1002]
```

This is an APU though. Clarify the messaging by only offer a
"CPU node" or "GPU node" message. Also set the message as
VID:DID instead which is how other messages work.

Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org>
Reviewed-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amdkfd: Fix signal_eviction_fence() bool return value
Srinivasan Shanmugam [Wed, 17 Dec 2025 09:51:57 +0000 (15:21 +0530)] 
drm/amdkfd: Fix signal_eviction_fence() bool return value

signal_eviction_fence() is declared to return bool, but returns -EINVAL
when no eviction fence is present.  This makes the "no fence" or "the
NULL-fence" path evaluate to true and triggers a Smatch warning.

v2: Return true instead to explicitly indicate that there is no eviction
fence to signal and that eviction is already complete. This matches the
existing caller logic where a NULL fence means "nothing to do" and
allows restore handling to proceed normally. (Christian)

Fixes the below:
drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_process.c:2099 signal_eviction_fence()
warn: '(-22)' is not bool

drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_process.c
    2090 static bool signal_eviction_fence(struct kfd_process *p)
                ^^^^

    2091 {
    2092         struct dma_fence *ef;
    2093         bool ret;
    2094
    2095         rcu_read_lock();
    2096         ef = dma_fence_get_rcu_safe(&p->ef);
    2097         rcu_read_unlock();
    2098         if (!ef)
--> 2099                 return -EINVAL;

This should be either true or false.
Probably true because presumably
it has been tested?

    2100
    2101         ret = dma_fence_check_and_signal(ef);
    2102         dma_fence_put(ef);
    2103
    2104         return ret;
    2105 }

Fixes: 37865e02e6cc ("drm/amdkfd: Fix eviction fence handling")
Reported by: Dan Carpenter <dan.carpenter@linaro.org>
Cc: Philip Yang <Philip.Yang@amd.com>
Cc: Gang BA <Gang.Ba@amd.com>
Cc: Felix Kuehling <felix.kuehling@amd.com>
Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amd/pm: fix wrong pcie parameter on navi1x
Yang Wang [Thu, 11 Dec 2025 02:47:18 +0000 (10:47 +0800)] 
drm/amd/pm: fix wrong pcie parameter on navi1x

fix wrong pcie dpm parameter on navi1x

Fixes: 1a18607c07bb ("drm/amd/pm: override pcie dpm parameters only if it is necessary")
Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4671
Signed-off-by: Yang Wang <kevinyang.wang@amd.com>
Co-developed-by: Kenneth Feng <kenneth.feng@amd.com>
Signed-off-by: Kenneth Feng <kenneth.feng@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amd: Drop "amdgpu kernel modesetting enabled" message
Mario Limonciello (AMD) [Mon, 15 Dec 2025 01:12:19 +0000 (19:12 -0600)] 
drm/amd: Drop "amdgpu kernel modesetting enabled" message

The behavior for amdgpu was changed with commit e00e5c223878
("drm/amdgpu: adjust drm_firmware_drivers_only() handling") to
potentially allow loading even if nomodeset was set, so the
message is no longer accurate.

Just drop it to avoid confusion.

Fixes: e00e5c223878 ("drm/amdgpu: adjust drm_firmware_drivers_only() handling")
Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org>
Reviewed-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amdgpu: Add address checking for uniras
Jinzhou Su [Tue, 2 Dec 2025 08:15:10 +0000 (16:15 +0800)] 
drm/amdgpu: Add address checking for uniras

Add address checking for uniras

Signed-off-by: Jinzhou Su <jinzhou.su@amd.com>
Reviewed-by: YiPeng Chai <YiPeng.Chai@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/radeon: Remove __counted_by from ClockInfoArray.clockInfo[]
Alex Deucher [Mon, 30 Jun 2025 14:47:09 +0000 (10:47 -0400)] 
drm/radeon: Remove __counted_by from ClockInfoArray.clockInfo[]

clockInfo[] is a generic uchar pointer to variable sized structures
which vary from ASIC to ASIC.

Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4374
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amdgpu: add support for MMHUB IP version 3.4.0
Tim Huang [Mon, 20 Jan 2025 06:11:34 +0000 (14:11 +0800)] 
drm/amdgpu: add support for MMHUB IP version 3.4.0

This initializes MMHUB IP version 3.4.0.

v2: squash in clients table update (Alex)

Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Tim Huang <tim.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amdgpu: add support for HDP IP version 6.1.1
Tim Huang [Thu, 12 Dec 2024 02:46:47 +0000 (10:46 +0800)] 
drm/amdgpu: add support for HDP IP version 6.1.1

This initializes HDP IP version 6.1.1.

Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Tim Huang <tim.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amdgpu: add support for IH IP version 6.1.1
Tim Huang [Thu, 12 Dec 2024 02:44:04 +0000 (10:44 +0800)] 
drm/amdgpu: add support for IH IP version 6.1.1

This initializes IH IP version 6.1.1.

Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Tim Huang <tim.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amdgpu: add support for NBIO IP version 7.11.4
Tim Huang [Wed, 11 Dec 2024 08:23:54 +0000 (16:23 +0800)] 
drm/amdgpu: add support for NBIO IP version 7.11.4

This initializes NBIO IP version 7.11.4.

Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Tim Huang <tim.huang@amd.com>
Signed-off-by: Pratik Vishwakarma <Pratik.Vishwakarma@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amdgpu: add support for SDMA IP version 6.1.4
Tim Huang [Wed, 11 Dec 2024 08:20:50 +0000 (16:20 +0800)] 
drm/amdgpu: add support for SDMA IP version 6.1.4

This initializes SDMA IP version 6.1.4.

Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Tim Huang <tim.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amdgpu: add support for GC IP version 11.5.4
Tim Huang [Wed, 11 Dec 2024 08:07:09 +0000 (16:07 +0800)] 
drm/amdgpu: add support for GC IP version 11.5.4

This initializes GC IP version 11.5.4.

v2: squash in RLC offset fix

Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Tim Huang <tim.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amdgpu: Fix xcc_id input for soc_v1_0_grbm_select
Hawking Zhang [Tue, 19 Aug 2025 08:55:32 +0000 (16:55 +0800)] 
drm/amdgpu: Fix xcc_id input for soc_v1_0_grbm_select

Ensure the GRBM_GFX_CNTL is programmed correctly

Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Le Ma <le.ma@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amdgpu: Do not initialize imu callback for vf
Hawking Zhang [Thu, 7 Aug 2025 14:49:51 +0000 (22:49 +0800)] 
drm/amdgpu: Do not initialize imu callback for vf

Not needed in guest environment

Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Le Ma <le.ma@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amdgpu: make normalize reg addr to common func for soc v1
Likun Gao [Mon, 18 Aug 2025 04:45:27 +0000 (12:45 +0800)] 
drm/amdgpu: make normalize reg addr to common func for soc v1

Normalize registers address to local xcc address for sdma v7_1.
Merge normalize register address function to an common function
for soc v1.

Signed-off-by: Likun Gao <Likun.Gao@amd.com>
Reviewed-by: Feifei Xu <Feifei.Xu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amdgpu: Setup MTYPE on SOC models for GFX 12.1
Mukul Joshi [Wed, 13 Aug 2025 19:05:37 +0000 (15:05 -0400)] 
drm/amdgpu: Setup MTYPE on SOC models for GFX 12.1

Fix it to apply for all models.

Signed-off-by: Mukul Joshi <mukul.joshi@amd.com>
Reviewed-by: Alex Sierra <alex.sierra@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 weeks agodrm/amdgpu: Report correct compute partition mode on GFX 12.1
Mukul Joshi [Fri, 8 Aug 2025 21:33:59 +0000 (17:33 -0400)] 
drm/amdgpu: Report correct compute partition mode on GFX 12.1

PSP programs the NBIO partition status register. In the absence of PSP,
read the current compute partition from the GFX IMU register instead of
NBIO.

Signed-off-by: Mukul Joshi <mukul.joshi@amd.com>
Reviewed-by: Alex Sierra <alex.sierra@amd.com>
Reviewed-by: Michael Chen <michael.chen@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>