[PATCH v2 1/2] drm/print: drop include debugfs.h and include where needed

2024-04-18 Thread Jani Nikula
Surprisingly many places depend on debugfs.h to be included via drm_print.h. Fix them. v2: Also fix ivpu and vmwgfx Reviewed-by: Andrzej Hajda Acked-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20240410141434.157908-1-jani.nik...@intel.com Signed-off-by: Jani Nikula

Re: 答复: [PATCH v5.10] drm/amd/display: Wake DMCUB before executing GPINT commands

2024-04-18 Thread Greg KH
On Thu, Apr 18, 2024 at 03:19:46AM +, wangzhu wrote: > Hi Greg, thanks for your reply. Since there is no patch to fix CVE-2023-52624 > in linux-5.10, there is a patch in the linux-6.7 branch to fix it, its commit > is 2ef98c6d753a744e333b7e34b9cf687040fba57d ("drm/amd/display: Wake DMCUB >

Re: [PATCH v2 1/2] drm/print: drop include debugfs.h and include where needed

2024-04-18 Thread Robert Foss
Hey Jani, Thanks for doing this cleanup. On Thu, Apr 18, 2024 at 12:13 PM Jani Nikula wrote: > > Surprisingly many places depend on debugfs.h to be included via > drm_print.h. Fix them. > > v2: Also fix ivpu and vmwgfx > > Reviewed-by: Andrzej Hajda > Acked-by: Maxime Ripard > Link: >

[PATCH v2 0/6] Best effort contiguous VRAM allocation

2024-04-18 Thread Philip Yang
This patch series implement new KFD memory alloc flag for best effort contiguous VRAM allocation, to support peer direct access RDMA device with limited scatter-gather dma capability. v2: rebase on patch ("drm/amdgpu: Modify the contiguous flags behaviour") to avoid adding the new GEM flag

[PATCH v2 2/6] drm/amdgpu: Evict BOs from same process for contiguous allocation

2024-04-18 Thread Philip Yang
When TTM failed to alloc VRAM, TTM try evict BOs from VRAM to system memory then retry the allocation, this skips the KFD BOs from the same process because KFD require all BOs are resident for user queues. If TTM with TTM_PL_FLAG_CONTIGUOUS flag to alloc contiguous VRAM, allow TTM evict KFD BOs

[PATCH v2 4/6] drm/amdkfd: Increase KFD bo restore wait time

2024-04-18 Thread Philip Yang
TTM allocate contiguous VRAM may takes more than 1 second to evict BOs for larger size RDMA buffer. Because KFD restore bo worker reserves all KFD BOs, then TTM cannot hold the remainning KFD BOs lock to evict them, this causes TTM failed to alloc contiguous VRAM. Increase the KFD restore BO wait

[PATCH v2 6/6] drm/amdkfd: Bump kfd version for contiguous VRAM allocation

2024-04-18 Thread Philip Yang
Bump the kfd ioctl minor version to delcare the contiguous VRAM allocation flag support. Signed-off-by: Philip Yang --- include/uapi/linux/kfd_ioctl.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/uapi/linux/kfd_ioctl.h b/include/uapi/linux/kfd_ioctl.h index

[PATCH v2 5/6] drm/amdgpu: Skip dma map resource for null RDMA device

2024-04-18 Thread Philip Yang
To test RDMA using dummy driver on the system without NIC/RDMA device, the get/put dma pages pass in null device pointer, skip the dma map/unmap resource to avoid null pointer access. Signed-off-by: Philip Yang --- drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 33 +++- 1 file

[PATCH v2 1/6] drm/amdgpu: Support contiguous VRAM allocation

2024-04-18 Thread Philip Yang
RDMA device with limited scatter-gather ability requires contiguous VRAM buffer allocation for RDMA peer direct support. Add a new KFD alloc memory flag and store as bo alloc flag AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS. When pin this bo to export for RDMA peerdirect access, this will set

[PATCH v2 3/6] drm/amdkfd: Evict BO itself for contiguous allocation

2024-04-18 Thread Philip Yang
If the BO pages pinned for RDMA is not contiguous on VRAM, evict it to system memory first to free the VRAM space, then allocate contiguous VRAM space, and then move it from system memory back to VRAM. Signed-off-by: Philip Yang --- .../gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c| 17

RE: [PATCH 15/15] drm/amdgpu: Use new interface to reserve bad page

2024-04-18 Thread Chai, Thomas
[AMD Official Use Only - General] - Best Regards, Thomas -Original Message- From: Christian König Sent: Thursday, April 18, 2024 5:01 PM To: Chai, Thomas ; amd-gfx@lists.freedesktop.org Cc: Chai, Thomas ; Zhang, Hawking ; Zhou1, Tao ; Li, Candice ; Wang, Yang(Kevin) ;

Re: [PATCH v6.6] drm/amd/display: Wake DMCUB before executing GPINT commands

2024-04-18 Thread Alex Deucher
On Wed, Apr 17, 2024 at 11:14 PM wangzhu wrote: > > The CVE-2023-52624 is fixed in linux-6.7 stable, while it is not fixed in > 6.6, this commit is presented to fix it in linux-6.6 stable. Why is there a CVE in the first place? Is this actually an issue you have seen? It seems like you just

Re: [PATCH] drm/amdgpu: once more fix the call oder in amdgpu_ttm_move()

2024-04-18 Thread Alex Deucher
On Thu, Mar 21, 2024 at 10:37 AM Christian König wrote: > > Am 21.03.24 um 15:12 schrieb Tvrtko Ursulin: > > > > On 21/03/2024 12:43, Christian König wrote: > >> This reverts drm/amdgpu: fix ftrace event amdgpu_bo_move always move > >> on same heap. The basic problem here is that after the move

Re: [PATCH] drm/mst: Fix NULL pointer dereference at drm_dp_add_payload_part2

2024-04-18 Thread Harry Wentland
On 2024-03-07 01:29, Wayne Lin wrote: > [Why] > Commit: > - commit 5aa1dfcdf0a4 ("drm/mst: Refactor the flow for payload > allocation/removement") > accidently overwrite the commit > - commit 54d217406afe ("drm: use mgr->dev in drm_dbg_kms in > drm_dp_add_payload_part2") > which cause

[PATCH] drm/amdgpu: Fix leak when GPU memory allocation fails

2024-04-18 Thread Mukul Joshi
Free the sync object if the memory allocation fails for any reason. Signed-off-by: Mukul Joshi --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c

Re: [PATCH] drm/amdgpu: Fix leak when GPU memory allocation fails

2024-04-18 Thread Deucher, Alexander
[Public] Reviewed-by: Alex Deucher From: amd-gfx on behalf of Mukul Joshi Sent: Thursday, April 18, 2024 12:17 PM To: amd-gfx@lists.freedesktop.org Cc: Kuehling, Felix ; Joshi, Mukul Subject: [PATCH] drm/amdgpu: Fix leak when GPU memory allocation fails

Re: [PATCH v2 1/6] drm/amdgpu: Support contiguous VRAM allocation

2024-04-18 Thread Christian König
Am 18.04.24 um 15:57 schrieb Philip Yang: RDMA device with limited scatter-gather ability requires contiguous VRAM buffer allocation for RDMA peer direct support. Add a new KFD alloc memory flag and store as bo alloc flag AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS. When pin this bo to export for RDMA

Re: [PATCH] drm/amdgpu/mes11: print MES opcodes rather than numbers

2024-04-18 Thread Felix Kuehling
On 2024-04-17 15:53, Alex Deucher wrote: Makes it easier to review the logs when there are MES errors. v2: use dbg for emitted, add helpers for fetching strings v3: fix missing commas (Harish) Reviewed by Shaoyun.liu (v2) Signed-off-by: Alex Deucher ---

RE: [PATCH 3/3] drm/amdgpu/mes11: make fence waits synchronous

2024-04-18 Thread Liu, Shaoyun
[AMD Official Use Only - General] I think the only user for the MES is kernel driver and all the submission to MES need to be synced , driver already have the mes->ring_lock to ensure that . I don't know why there is a necessary to use separate fence per request . MES do update the API

Re: [PATCH] drm/amdgpu/vcn: fix unitialized variable warnings

2024-04-18 Thread Alex Deucher
On Thu, Apr 18, 2024 at 2:22 PM Pierre-Eric Pelloux-Prayer wrote: > > Init r to 0 to avoid returning an uninitialized value if we never > enter the loop. This case should never be hit in practive, but s/practive/practice/ > returning 0 doesn't hurt. s/returning/initializing to/ With that

[PATCH] drm/amdgpu: Update BO eviction priorities

2024-04-18 Thread Felix Kuehling
Make SVM BOs more likely to get evicted than other BOs. These BOs opportunistically use available VRAM, but can fall back relatively seamlessly to system memory. It also avoids SVM migrations evicting other, more important BOs as they will evict other SVM allocations first. Signed-off-by: Felix

[linux-next:master] BUILD REGRESSION 7b4f2bc91c15fdcf948bb2d9741a9d7d54303f8d

2024-04-18 Thread kernel test robot
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master branch HEAD: 7b4f2bc91c15fdcf948bb2d9741a9d7d54303f8d Add linux-next specific files for 20240418 Error/Warning reports: https://lore.kernel.org/oe-kbuild-all/202404190103.llm8ltup-...@intel.com Error

Re: [PATCH] drm/amdkfd: Fix eviction fence handling

2024-04-18 Thread Philip Yang
On 2024-04-17 23:14, Felix Kuehling wrote: Handle case that dma_fence_get_rcu_safe returns NULL. If restore work is already scheduled, only update its timer. The same work item cannot be queued twice, so undo the extra queue eviction. Fixes: 9a1c1339abf9

[PATCH] drm/amdgpu/vcn: fix unitialized variable warnings

2024-04-18 Thread Pierre-Eric Pelloux-Prayer
Init r to 0 to avoid returning an uninitialized value if we never enter the loop. This case should never be hit in practive, but returning 0 doesn't hurt. The same fix is applied to the 4 places using the same pattern. Signed-off-by: Pierre-Eric Pelloux-Prayer ---

Re: [PATCH] drm/amdkfd: Fix eviction fence handling

2024-04-18 Thread Ba, Gang
[AMD Official Use Only - General] Tested-by: Gang BA Reviewed-by: Gang BA From: Kuehling, Felix Sent: Wednesday, April 17, 2024 11:14 PM To: amd-gfx@lists.freedesktop.org Cc: Ba, Gang ; Prosyak, Vitaly Subject: [PATCH] drm/amdkfd: Fix eviction fence handling

RE: [PATCH] drm/amdgpu: Update BO eviction priorities

2024-04-18 Thread Joshi, Mukul
[AMD Official Use Only - General] Tested-by and Acked-by: Mukul Joshi > -Original Message- > From: amd-gfx On Behalf Of Felix > Kuehling > Sent: Thursday, April 18, 2024 2:07 PM > To: amd-gfx@lists.freedesktop.org > Cc: Joshi, Mukul ; Koenig, Christian > > Subject: [PATCH] drm/amdgpu:

Re: [PATCH v2] drm/amdkfd: make sure VM is ready for updating operations

2024-04-18 Thread Felix Kuehling
On 2024-04-11 4:11, Lang Yu wrote: When page table BOs were evicted but not validated before updating page tables, VM is still in evicting state, amdgpu_vm_update_range returns -EBUSY and restore_process_worker runs into a dead loop. v2: Split the BO validation and page table update into two

Re: [PATCH v2 1/6] drm/amdgpu: Support contiguous VRAM allocation

2024-04-18 Thread Philip Yang
On 2024-04-18 10:37, Christian König wrote: Am 18.04.24 um 15:57 schrieb Philip Yang: RDMA device with limited scatter-gather ability requires contiguous VRAM buffer allocation for RDMA peer direct support.

Re: [PATCH] drm/amdgpu/vpe: fix vpe dpm setup failed

2024-04-18 Thread Deucher, Alexander
[AMD Official Use Only - General] Acked-by: Alex Deucher From: Lee, Peyton Sent: Thursday, April 18, 2024 1:12 AM To: amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander ; Liu, HaoPing (Alan) ; Yu, Lang ; Lee, Peyton Subject: [PATCH] drm/amdgpu/vpe: fix vpe

RE: [PATCH] drm/amdgpu/vpe: fix vpe dpm setup failed

2024-04-18 Thread Yu, Lang
[Public] Reviewed-by: Lang Yu >-Original Message- >From: Lee, Peyton >Sent: Thursday, April 18, 2024 1:13 PM >To: amd-gfx@lists.freedesktop.org >Cc: Deucher, Alexander ; Liu, HaoPing (Alan) >; Yu, Lang ; Lee, Peyton > >Subject: [PATCH] drm/amdgpu/vpe: fix vpe dpm setup failed > >The

[PATCH 1/2] drm/amd/display: dynamically allocate dml2_configuration_options structures

2024-04-18 Thread Arnd Bergmann
From: Arnd Bergmann This structure is too large to fit on a stack, as shown by the newly introduced warnings from a recent code change: drivers/gpu/drm/amd/amdgpu/../display/dc/resource/dcn32/dcn32_resource.c: In function 'dcn32_update_bw_bounding_box':

[PATCH 2/2] drm/amd/display: fix graphics_object_id size

2024-04-18 Thread Arnd Bergmann
From: Arnd Bergmann The graphics_object_id structure is meant to fit into 32 bits, as it's passed by value in and out of functions. A recent change increased the size to 128 bits, so it's now always passed by reference, which is clearly not intended and ends up producing a compile-time warning:

Re: [PATCH v5 1/6] drm/amdgpu: add prototype for ip dump

2024-04-18 Thread Christian König
Am 17.04.24 um 17:45 schrieb Alex Deucher: On Wed, Apr 17, 2024 at 5:38 AM Sunil Khatri wrote: Add the prototype to dump ip registers for all ips of different asics and set them to NULL for now. Based on the requirement add a function pointer for each of them. Signed-off-by: Sunil Khatri ---

Re: [PATCH 15/15] drm/amdgpu: Use new interface to reserve bad page

2024-04-18 Thread Christian König
Am 18.04.24 um 04:58 schrieb YiPeng Chai: Use new interface to reserve bad page. Signed-off-by: YiPeng Chai --- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c

答复: [PATCH v5.10] drm/amd/display: Wake DMCUB before executing GPINT commands

2024-04-18 Thread wangzhu
Hi Greg, thanks for your reply. Since there is no patch to fix CVE-2023-52624 in linux-5.10, there is a patch in the linux-6.7 branch to fix it, its commit is 2ef98c6d753a744e333b7e34b9cf687040fba57d ("drm/amd/display: Wake DMCUB before executing GPINT commands"). When we apply this patch to

Re: [PATCH v6 3/5] drm: Add support to get EDID from ACPI

2024-04-18 Thread Geert Uytterhoeven
Hi Mario, On Thu, Feb 15, 2024 at 8:04 PM Mario Limonciello wrote: > On 2/15/2024 12:47, Ville Syrjälä wrote: > > On Thu, Feb 15, 2024 at 12:20:56PM -0600, Mario Limonciello wrote: > >> On 2/14/2024 17:13, Ville Syrjälä wrote: > >>> On Wed, Feb 14, 2024 at 03:57:54PM -0600, Mario Limonciello

Re: 答复: [PATCH v6.6] drm/amd/display: Wake DMCUB before executing GPINT commands

2024-04-18 Thread Greg KH
On Thu, Apr 18, 2024 at 01:51:33AM +, wangzhu wrote: > Hi Greg, thanks for your reply. Since there is no patch to fix CVE-2023-52624 > in linux-5.10, there is a patch in the linux-6.7 branch, its commit is > 2ef98c6d753a744e333b7e34b9cf687040fba57d ("drm/amd/display: Wake DMCUB before >

答复: [PATCH v6.6] drm/amd/display: Wake DMCUB before executing GPINT commands

2024-04-18 Thread wangzhu
The CVE-2023-52624 is fixed in linux-6.7 stable, while it is not fixed in 6.6, this commit is presented to fix it in linux-6.6 stable. -邮件原件- 发件人: Alex Deucher [mailto:alexdeuc...@gmail.com] 发送时间: 2024年4月18日 9:58 收件人: wangzhu 抄送: Greg KH ; harry.wentl...@amd.com; sunpeng...@amd.com;

答复: [PATCH v6.6] drm/amd/display: Wake DMCUB before executing GPINT commands

2024-04-18 Thread wangzhu
Hi Greg, thanks for your reply. Since there is no patch to fix CVE-2023-52624 in linux-5.10, there is a patch in the linux-6.7 branch, its commit is 2ef98c6d753a744e333b7e34b9cf687040fba57d ("drm/amd/display: Wake DMCUB before executing GPINT commands"). When we apply this patch to linux-5.10,

Re: [PATCH v5 2/6] drm/amdgpu: add support of gfx10 register dump

2024-04-18 Thread Christian König
Am 17.04.24 um 19:30 schrieb Alex Deucher: On Wed, Apr 17, 2024 at 1:01 PM Khatri, Sunil wrote: On 4/17/2024 10:21 PM, Alex Deucher wrote: On Wed, Apr 17, 2024 at 12:24 PM Lazar, Lijo wrote: [AMD Official Use Only - General] Yes, right now that API doesn't return anything. What I meant is