RE: [PATCH] drm/amdgpu: fix mmhub client id out-of-bounds access

2024-03-07 Thread Zhang, Yifan
[Public] Yes, this is a trade-off b/w readability and code size. it is a nit-pick. Feel free to add: Reviewed-by: Yifan Zhang Best Regards, Yifan -Original Message- From: Yu, Lang Sent: Thursday, March 7, 2024 2:06 PM To: Zhang, Yifan ; amd-gfx@lists.freedesktop.org Cc: Deucher,

Re: [PATCH] drm/amdgpu: fix use-after-free bug

2024-03-07 Thread Christian König
Am 07.03.24 um 17:26 schrieb vitaly.pros...@amd.com: From: Vitaly Prosyak The bug can be triggered by sending a single amdgpu_gem_userptr_ioctl to the AMDGPU DRM driver on any ASICs with an invalid address and size. The bug was reported by Joonkyo Jung . For example the following code: static

Re: Reporting a slab-use-after-free in amdgpu

2024-03-07 Thread vitaly prosyak
Hi Joonkyo, Sorry for the delay. Yes, sure, I reproduced issue 2 (null-ptr-deref in amdgpu) and I will provide the fix soon. However, issue No. 3 is no longer reproducible if the recent patch inflight is applied which fixes issue No 1. Do you see the same behavior? Thanks in advance, Vitaly

[PATCH] drm/amdgpu: enable smu block for smu v14_0_1

2024-03-07 Thread Li Ma
add smu 14 support for sum v14_0_1 Signed-off-by: Li Ma Reviewed-by: Yifan Zhang i --- drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c index

Re: [PATCH v5 1/2] drm/amdgpu: implement TLB flush fence

2024-03-07 Thread Felix Kuehling
On 2024-03-07 1:39, Sharma, Shashank wrote: On 07/03/2024 00:54, Felix Kuehling wrote: On 2024-03-06 09:41, Shashank Sharma wrote: From: Christian König The problem is that when (for example) 4k pages are replaced with a single 2M page we need to wait for change to be flushed out by

[PATCH v2 0/2] Add pagefault support for devcoredump

2024-03-07 Thread Sunil Khatri
Add support of devcoredump from global object of amdgpu_device Sunil Khatri (2): drm/amdgpu: add recent pagefault info in vm_manager drm/amdgpu: add vm fault information to devcoredump drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c | 14 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c

[PATCH v2 2/2] drm/amdgpu: add vm fault information to devcoredump

2024-03-07 Thread Sunil Khatri
Add page fault information to the devcoredump. Output of devcoredump: AMDGPU Device Coredump version: 1 kernel: 6.7.0-amd-staging-drm-next module: amdgpu time: 29.725011811 process_name: soft_recovery_p PID: 1720 Ring timed out details IP Type: 0 Ring Name: gfx_0.0.0 [gfxhub] Page

[PATCH v2 1/2] drm/amdgpu: add recent pagefault info in vm_manager

2024-03-07 Thread Sunil Khatri
Currently page fault information is stored per vm and which could be freed or stale during reset. Add it pagefault information in the vm_manager which is a global space for vm's and remains valid across. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 8

Re: [PATCH 2/2] drm/amdgpu: add vm fault information to devcoredump

2024-03-07 Thread Alex Deucher
On Thu, Mar 7, 2024 at 3:42 PM Khatri, Sunil wrote: > > > On 3/8/2024 12:44 AM, Alex Deucher wrote: > > On Thu, Mar 7, 2024 at 12:00 PM Sunil Khatri wrote: > >> Add page fault information to the devcoredump. > >> > >> Output of devcoredump: > >> AMDGPU Device Coredump > >> version: 1 >

Re: [PATCH 2/2] drm/amdgpu: add vm fault information to devcoredump

2024-03-07 Thread Khatri, Sunil
On 3/8/2024 12:44 AM, Alex Deucher wrote: On Thu, Mar 7, 2024 at 12:00 PM Sunil Khatri wrote: Add page fault information to the devcoredump. Output of devcoredump: AMDGPU Device Coredump version: 1 kernel: 6.7.0-amd-staging-drm-next module: amdgpu time: 29.725011811 process_name:

Re: [PATCH 25/34] drm/amd/display: Set the power_down_on_boot function pointer to null

2024-03-07 Thread Melissa Wen
On 02/28, Mario Limonciello wrote: > On 2/28/2024 12:39, Alex Hung wrote: > > From: Muhammad Ahmed > > > > [WHY] > > Blackscreen hang @ PC EF25 when trying to wake up from S0i3. DCN > > gets powered off due to dc_power_down_on_boot() being called after > > timeout. > > > > [HOW] > > Setting

Re: [PATCH v5 1/2] drm/amdgpu: implement TLB flush fence

2024-03-07 Thread Philip Yang
On 2024-03-06 09:41, Shashank Sharma wrote: From: Christian König The problem is that when (for example) 4k pages are replaced with a single 2M page we need to wait for change to be flushed out by invalidating the TLB before the PT can be freed. Solve

Re: [PATCH 2/2] drm/amdgpu: add vm fault information to devcoredump

2024-03-07 Thread Alex Deucher
On Thu, Mar 7, 2024 at 12:00 PM Sunil Khatri wrote: > > Add page fault information to the devcoredump. > > Output of devcoredump: > AMDGPU Device Coredump > version: 1 > kernel: 6.7.0-amd-staging-drm-next > module: amdgpu > time: 29.725011811 > process_name: soft_recovery_p PID: 1720 >

[PATCH 3/3] drm/amdgpu: Increase soft recovery timeout to .5s

2024-03-07 Thread Joshua Ashton
Results in much more reliable soft recovery on Steam Deck. Signed-off-by: Joshua Ashton Cc: Friedrich Vock Cc: Bas Nieuwenhuizen Cc: Christian König Cc: André Almeida Cc: sta...@vger.kernel.org --- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH 2/3] drm/amdgpu: Determine soft recovery deadline next to usage

2024-03-07 Thread Joshua Ashton
Otherwise we are determining this timeout based on a time before we go into some unrelated spinlock, which is bad. Signed-off-by: Joshua Ashton Cc: Friedrich Vock Cc: Bas Nieuwenhuizen Cc: Christian König Cc: André Almeida Cc: sta...@vger.kernel.org ---

[PATCH 1/3] drm/amdgpu: Forward soft recovery errors to userspace

2024-03-07 Thread Joshua Ashton
As we discussed before[1], soft recovery should be forwarded to userspace, or we can get into a really bad state where apps will keep submitting hanging command buffers cascading us to a hard reset. 1: https://lore.kernel.org/all/bf23d5ed-9a6b-43e7-84ee-8cbfd0d60...@froggi.es/ Signed-off-by:

RE: [PATCH 00/34] DC Patches Feb 28, 2020

2024-03-07 Thread Wheeler, Daniel
[Public] Hi all, This week this patchset was tested on the following systems: * Lenovo ThinkBook T13s Gen4 with AMD Ryzen 5 6600U * MSI Gaming X Trio RX 6800 * Gigabyte Gaming OC RX 7900 XTX These systems were tested on the following display/connection types: *

[PATCH 2/2] drm/amdgpu: add vm fault information to devcoredump

2024-03-07 Thread Sunil Khatri
Add page fault information to the devcoredump. Output of devcoredump: AMDGPU Device Coredump version: 1 kernel: 6.7.0-amd-staging-drm-next module: amdgpu time: 29.725011811 process_name: soft_recovery_p PID: 1720 Ring timed out details IP Type: 0 Ring Name: gfx_0.0.0 [gfxhub] Page

[PATCH 1/2] drm/amdgpu: add recent pagefault info in vm_manager

2024-03-07 Thread Sunil Khatri
Currently page fault information is stored per vm and which could be freed or stale during reset. Add it pagefault information in the vm_manager which is a global space for vm's and remains valid across. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 8

[PATCH 0/2] Add pagefault support for devcoredump

2024-03-07 Thread Sunil Khatri
Add support of devcoredump from global object of amdgpu_device Sunil Khatri (2): drm/amdgpu: add recent pagefault info in vm_manager drm/amdgpu: add vm fault information to devcoredump drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c | 14 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c|

Re: [PATCH v8 1/3] drm/buddy: Implement tracking clear page feature

2024-03-07 Thread Matthew Auld
On 07/03/2024 12:25, Paneer Selvam, Arunpravin wrote: Hi Matthew, On 3/6/2024 11:19 PM, Matthew Auld wrote: On 04/03/2024 16:32, Arunpravin Paneer Selvam wrote: - Add tracking clear page feature. - Driver should enable the DRM_BUDDY_CLEARED flag if it    successfully clears the blocks in the

[PATCH] drm/amdgpu: fix use-after-free bug

2024-03-07 Thread vitaly.prosyak
From: Vitaly Prosyak The bug can be triggered by sending a single amdgpu_gem_userptr_ioctl to the AMDGPU DRM driver on any ASICs with an invalid address and size. The bug was reported by Joonkyo Jung . For example the following code: static void Syzkaller1(int fd) { struct

[pull] amdgpu drm-fixes-6.8

2024-03-07 Thread Alex Deucher
Hi Dave, Sima, Fixes for 6.8. The following changes since commit d6a209dd76e5ceb5d536e0a1a707ffcf64f95cef: Merge tag 'drm-intel-fixes-2024-03-01' of https://anongit.freedesktop.org/git/drm/drm-intel into drm-fixes (2024-03-05 09:54:12 +0100) are available in the Git repository at:

RE: [PATCH 1/2] drm/amdgpu: add the sensor value of VCN activity

2024-03-07 Thread Wang, Yang(Kevin)
You'd better implement 'update_attr' callback function to make sure that this node is only exposed when it is valid. Best Regards, Kevin -Original Message- From: amd-gfx On Behalf Of Xiaojian Du Sent: Thursday, March 7, 2024 4:51 PM To: amd-gfx@lists.freedesktop.org Cc: Deucher,

Re: [PATCH] drm/amdgpu: fix use-after-free bug

2024-03-07 Thread Christian König
Am 07.03.24 um 13:01 schrieb vitaly.pros...@amd.com: From: Vitaly Prosyak The bug can be triggered by sending a single amdgpu_gem_userptr_ioctl to the AMDGPU DRM driver on any ASICs with an invalid address and size. The bug was reported by Joonkyo Jung . For example the following code:

Re: [PATCH] drm/amdgpu: add vm fault information to devcoredump

2024-03-07 Thread Khatri, Sunil
On 3/7/2024 6:10 PM, Christian König wrote: Am 07.03.24 um 09:37 schrieb Khatri, Sunil: On 3/7/2024 1:47 PM, Christian König wrote: Am 06.03.24 um 19:19 schrieb Sunil Khatri: Add page fault information to the devcoredump. Output of devcoredump: AMDGPU Device Coredump version: 1

Re: [PATCH] drm/amdgpu: add vm fault information to devcoredump

2024-03-07 Thread Christian König
Am 07.03.24 um 09:37 schrieb Khatri, Sunil: On 3/7/2024 1:47 PM, Christian König wrote: Am 06.03.24 um 19:19 schrieb Sunil Khatri: Add page fault information to the devcoredump. Output of devcoredump: AMDGPU Device Coredump version: 1 kernel: 6.7.0-amd-staging-drm-next module:

Re: [PATCH v8 1/3] drm/buddy: Implement tracking clear page feature

2024-03-07 Thread Paneer Selvam, Arunpravin
Hi Matthew, On 3/6/2024 11:19 PM, Matthew Auld wrote: On 04/03/2024 16:32, Arunpravin Paneer Selvam wrote: - Add tracking clear page feature. - Driver should enable the DRM_BUDDY_CLEARED flag if it    successfully clears the blocks in the free path. On the otherhand,    DRM buddy marks each

[PATCH] drm/amdgpu: fix use-after-free bug

2024-03-07 Thread vitaly.prosyak
From: Vitaly Prosyak The bug can be triggered by sending a single amdgpu_gem_userptr_ioctl to the AMDGPU DRM driver on any ASICs with an invalid address and size. The bug was reported by Joonkyo Jung . For example the following code: static void Syzkaller1(int fd) { struct

[PATCH 2/2] drm/amdgpu: add VCN sensor value for SMU 13.0.4

2024-03-07 Thread Xiaojian Du
This will add VCN sensor value for SMU 13.0.4. Signed-off-by: Xiaojian Du --- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_4_ppt.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_4_ppt.c

[PATCH 1/2] drm/amdgpu: add the sensor value of VCN activity

2024-03-07 Thread Xiaojian Du
This will add the sensor value of VCN activity. Signed-off-by: Xiaojian Du --- .../gpu/drm/amd/include/kgd_pp_interface.h| 1 + drivers/gpu/drm/amd/pm/amdgpu_pm.c| 28 +++ 2 files changed, 29 insertions(+) diff --git

Re: [PATCH] drm/amdgpu: add vm fault information to devcoredump

2024-03-07 Thread Khatri, Sunil
On 3/7/2024 1:47 PM, Christian König wrote: Am 06.03.24 um 19:19 schrieb Sunil Khatri: Add page fault information to the devcoredump. Output of devcoredump: AMDGPU Device Coredump version: 1 kernel: 6.7.0-amd-staging-drm-next module: amdgpu time: 29.725011811 process_name:

Re: [PATCH] drm/amd: Drop abm_level property

2024-03-07 Thread Xaver Hugl
Am Mi., 6. März 2024 um 18:19 Uhr schrieb Mario Limonciello : > So the idea being if the compositor isn't using it we let > power-profiles-daemon (or any other software) take control via sysfs and > if the compositor does want to control it then it then it writes a DRM > cap and we destroy the

Re: [PATCH] drm/amd: Drop abm_level property

2024-03-07 Thread Xaver Hugl
Like already mentioned in the power profiles daemon repository, I don't think this makes sense. This is a display setting, which compositors have interest in controlling, for example to: - disable it in a bright environment, because afaiu it reduces the maximum screen brightness - disable it

Re: [PATCH] drm/amdgpu: fix use-after-free bug

2024-03-07 Thread Christian König
Am 07.03.24 um 02:55 schrieb vitaly.pros...@amd.com: From: Vitaly Prosyak The bug can be triggered by sending a single amdgpu_gem_userptr_ioctl to the AMDGPU DRM driver on any ASICs with an invalid address and size. The bug was reported by Joonkyo Jung . For example the following code:

Re: [PATCH] drm/amdgpu: add vm fault information to devcoredump

2024-03-07 Thread Christian König
Am 06.03.24 um 19:19 schrieb Sunil Khatri: Add page fault information to the devcoredump. Output of devcoredump: AMDGPU Device Coredump version: 1 kernel: 6.7.0-amd-staging-drm-next module: amdgpu time: 29.725011811 process_name: soft_recovery_p PID: 1720 Ring timed out details IP