[PATCH] drm/amdkfd: pass the PD BOs directly for PA

2025-09-07 Thread Prike Liang
Since the PD BOs are assigned at initialization, the placement stage can obtain the PD physical address (PA) directly from the PD BOs without additional lookups. Signed-off-by: Prike Liang --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH] drm/amd/display: Fix unload issues in amdgpu

2025-09-07 Thread Rodrigo Siqueira
Loading and unloading the amdgpu module in TTY mode is successful at first glance, but attempting to turn off the system after this action results in a kernel panic. Sometimes, after trying to run load/unload multiple times, the user may also encounter other issues. The easiest way to reproduce thi

Re: [PATCH 1/3] drm/amdgpu: fix userq VM validation v3

2025-09-07 Thread Christian König
On 03.09.25 04:52, Liang, Prike wrote: >> + ret = amdgpu_vm_update_pdes(adev, vm, false); >> + if (ret) >> + goto unlock_all; > > Do we need to create a sync point for syncing the VM PD/PT/PET update, and > ensure > all the updates done before attach the eviction fence? Oh, g

RE: [PATCH] drm/amd/amdgpu: Declare isp firmware binary file

2025-09-07 Thread Nirujogi, Pratap
[AMD Official Use Only - AMD Internal Distribution Only] -Original Message- From: Limonciello, Mario Sent: Wednesday, September 3, 2025 2:43 PM To: Nirujogi, Pratap ; amd-gfx@lists.freedesktop.org; Deucher, Alexander ; Koenig, Christian ; Limonciello, Mario Cc: Chan, Benjamin (Koon Pan

[PATCH] drm/amdgpu: set an error on all fences from a bad context

2025-09-07 Thread Alex Deucher
When we backup ring contents to reemit after a queue reset, we don't backup ring contents from the bad context. When we signal the fences, we should set an error on those fences as well. Fixes: 77cc0da39c7c ("drm/amdgpu: track ring state associated with a fence") Signed-off-by: Alex Deucher ---

[PATCH 3/3] drm/amdgpu: Implement user queue reset functionality

2025-09-07 Thread Jesse . Zhang
This patch adds robust reset handling for user queues (userq) to improve recovery from queue failures. The key components include: 1. Queue detection and reset logic: - amdgpu_userq_detect_and_reset_queues() identifies failed queues - Per-IP detect_and_reset callbacks for targeted recovery

[PATCH v6 RESEND 10/11] drm/amd: Avoid evicting resources at S5

2025-09-07 Thread Mario Limonciello (AMD)
Normally resources are evicted on dGPUs at suspend or hibernate and on APUs at hibernate. These steps are unnecessary when using the S4 callbacks to put the system into S5. Cc: AceLan Kao Cc: Kai-Heng Feng Cc: Mark Pearson Cc: Denis Benato Cc: Merthan Karakaş Tested-by: Eric Naim Acked-by:

[PATCH 1/2] drm/amdgpu: add AMDGPU_IDS_FLAGS_GANG_SUBMIT

2025-09-07 Thread Christian König
Add a UAPI flag indicating if gang submit is supported or not. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 4 include/uapi/drm/amdgpu_drm.h | 9 + 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amd

Re: [REGRESSION] AMD HDMI/DP audio broken after suspend since commit 50e0bae34fa6

2025-09-07 Thread Mario Limonciello
On 9/4/2025 8:03 AM, Przemysław Kopa wrote: I'm attaching two new dmesg logs. Sorry, I attached wrong files to my previous message. The proper ones are attached to this one. I'm guessing what's going on is a race between the HDMI device going to D3 through snd-hda-intel (which provides HDMI

[PATCH v6 RESEND 05/11] PCI: PM: Disable device wakeups when halting system through S4 flow

2025-09-07 Thread Mario Limonciello (AMD)
PCI devices can be programmed as a wakeup source from low power states by sysfs. However when using the S4 flow to go into S5 these wakeup sources should be disabled to avoid what users would perceive as spurious wakeup events. Tested-by: Eric Naim Signed-off-by: Mario Limonciello (AMD) --- dr

[PATCH] drm/amd/display: Drop dm_prepare_suspend() and dm_complete()

2025-09-07 Thread Mario Limonciello
From: "Mario Limonciello" [Why] dm_prepare_suspend() was added in commit 50e0bae34fa6b ("drm/amd/display: Add and use new dm_prepare_suspend() callback") to allow display to turn off earlier in the suspend sequence. This caused a regression that HDMI audio sometimes didn't work properly after re

Re: [PATCH] drm/amdkfd: Fix error code sign for EINVAL in svm_ioctl()

2025-09-07 Thread Alex Deucher
Applied. Thanks! Alex On Thu, Sep 4, 2025 at 8:54 AM Qianfeng Rong wrote: > > Use negative error code -EINVAL instead of positive EINVAL in the default > case of svm_ioctl() to conform to Linux kernel error code conventions. > > Fixes: 42de677f7999 ("drm/amdkfd: register svm range") > Signed-of

[PATCH v2 1/2] drm/amd/amdgpu: Move isp firmware load into isp_v4_1_x modules

2025-09-07 Thread Pratap Nirujogi
Move isp firmware load from generic amdgpu_isp driver to isp version specific driver modules isp_v4_1_0 and isp_v4_1_1. Signed-off-by: Pratap Nirujogi --- drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c | 22 +- drivers/gpu/drm/amd/amdgpu/amdgpu_isp.h | 2 ++ drivers/gpu/drm/amd/amd

[PATCH v6 RESEND 08/11] PCI: PM: Use pci_power_manageable() in pci_pm_poweroff_noirq()

2025-09-07 Thread Mario Limonciello (AMD)
Devices with no subordinate should be put into D3 during hibernate, but devices that have bridge_d3 set should also be put to sleep during hibernate. Adjust the check in pci_pm_poweroff_noirq() to use pci_power_manageable() to cover those as well. Tested-by: Eric Naim Signed-off-by: Mario Limonci

Re: [PATCH] drm/amd/display: Remove redundant ternary operators

2025-09-07 Thread Alex Deucher
Applied. Thanks! On Thu, Sep 4, 2025 at 3:29 AM Liao Yuanhong wrote: > > For ternary operators in the form of "a ? true : false" or > "a ? false : true", if 'a' itself returns a boolean result, the ternary > operator can be omitted. Remove redundant ternary operators to clean up the > code. > >

Re: [PATCH v2] drm/amdgpu: fix memleak of ring sched and fence driver

2025-09-07 Thread Christian König
Alex already send exactly that patch yesterday. Please review that one instead. Thanks, Christian. On 05.09.25 04:34, Lin.Cao wrote: > commit 4220d2c7c41b ("drm/amdgpu: remove is_mes_queue flag") set > ring->adev->ring[ring-idx] as NULL at the end of function amdgpu_ring_fini() > which will caus

Re: [PATCH 4/4] drm/radeon/pm: Remove redundant ternary operators

2025-09-07 Thread Alex Deucher
Applied the series. Thanks! Alex On Thu, Sep 4, 2025 at 7:49 AM Liao Yuanhong wrote: > > For ternary operators in the form of "a ? true : false", if 'a' itself > returns a boolean result, the ternary operator can be omitted. Remove > redundant ternary operators to clean up the code. > > Signed-

Re: [PATCH 1/2] Revert "drm/amdkfd: return migration pages from copy function"

2025-09-07 Thread James Zhu
Ping ... On 2025-08-22 15:38, James Zhu wrote: This reverts commit cab1cec78c8fd52e014546739875a81150f11080. migrate_vma_pages can fail if a CPU thread faults on the same page. However, the page table is locked and only one of the new pages will be inserted. The device driver will see that the

[PATCH 2/2] drm/amdgpu: reject gang submissions under SRIOV

2025-09-07 Thread Christian König
Gang submission means that the kernel driver guarantees that multiple submissions are executed on the HW at the same time on different engines. Background is that those submissions then depend on each other and each can't finish stand alone. SRIOV now uses world switch to preempt submissions on t

[PATCH v2] drm/amdgpu: fix memleak of ring sched and fence driver

2025-09-07 Thread Lin . Cao
commit 4220d2c7c41b ("drm/amdgpu: remove is_mes_queue flag") set ring->adev->ring[ring-idx] as NULL at the end of function amdgpu_ring_fini() which will cause function amdgpu_fence_driver_sw_fini() skip drm_sched_fini() and free fence_drv.fence then cause memory leak. Remove set rings[ring->idx] a

[PATCH 3/3] drm/amd/pm: Allow to set power cap in vf mode

2025-09-07 Thread Asad Kamal
Allow setting power cap for smu_v13_0_6 in 1vf mode Signed-off-by: Asad Kamal --- drivers/gpu/drm/amd/pm/amdgpu_pm.c | 7 --- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 6 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/

[PATCH next] drm/amdgpu: Fix error codes if copy_to_user() fails

2025-09-07 Thread Dan Carpenter
The copy_to_user() function returns the number of bytes that it wasn't able to copy, but we should return -EFAULT to the user. Fixes: 4d82724f7f2b ("drm/amdgpu: Add mapping info option for GEM_OP ioctl") Fixes: f9db1fc52ceb ("drm/amdgpu: Add ioctl to get all gem handles for a process") Signed-off

Re: [PATCH] drm/amdgpu: Fix NULL ptr deref in amdgpu_device_cache_switch_state()

2025-09-07 Thread Alex Deucher
Applied. Thanks! On Fri, Sep 5, 2025 at 8:49 AM Wang, Yang(Kevin) wrote: > > [AMD Official Use Only - AMD Internal Distribution Only] > > Reviewed-by: Yang Wang > > Best Regards, > Kevin > > -Original Message- > From: John Olender > Sent: Friday, September 5, 2025 6:11 PM > To: Wang, Y

Re: [PATCH] drm/amd/display: Drop dm_prepare_suspend() and dm_complete()

2025-09-07 Thread Alex Deucher
On Fri, Sep 5, 2025 at 1:41 PM Mario Limonciello wrote: > > From: "Mario Limonciello" > > [Why] > dm_prepare_suspend() was added in commit 50e0bae34fa6b > ("drm/amd/display: Add and use new dm_prepare_suspend() callback") > to allow display to turn off earlier in the suspend sequence. > > This ca

[PATCH] drm/amd/display: Disable DPCD Probe Quirk

2025-09-07 Thread Fangzhi Zuo
Disable dpcd probe quirk to native aux. Cc: # 6.16.y: 5281cbe0b55a Cc: # 6.16.y: 0b4aa85e8981 Cc: # 6.16.y: b87ed522b364 Cc: # 6.16.y Signed-off-by: Fangzhi Zuo Reviewed-by: Imre Deak --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 1 + 1 file changed, 1 insertion(+) diff

[PATCH v6 RESEND 06/11] PCI: PM: Split out code from pci_pm_suspend_noirq() into helper

2025-09-07 Thread Mario Limonciello (AMD)
In order to unify suspend and hibernate codepaths without code duplication the common code should be in common helpers. Move it from pci_pm_suspend_noirq() into a helper. No intended functional changes. Tested-by: Eric Naim Signed-off-by: Mario Limonciello (AMD) --- drivers/pci/pci-driver.c |