[PATCH 6/6] Documentation/amdgpu: Fix duplicate declaration

2024-07-15 Thread Rodrigo Siqueira
Address the below kernel doc warning: Documentation/gpu/amdgpu/display/display-manager:134: drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:3: WARNING: Duplicate C declaration, also defined at gpu/amdgpu/display/dcn-blocks:101. Declaration is '.. c:struct:: mpcc_blnd_cfg'. Documentation/gpu/amdgpu/dis

[PATCH 5/6] Documentation/gpu: Remove undocumented files from dcn-blockshubbub.h

2024-07-15 Thread Rodrigo Siqueira
The dchubbub.h and hubp.h do not have any meaningful documentation; for this reason, this commit removes those files from the dcn-blocks documentation. Cc: Alex Deucher Reported-by: Stephen Rothwell Signed-off-by: Rodrigo Siqueira --- Documentation/gpu/amdgpu/display/dcn-blocks.rst | 6 --

[PATCH 0/6] drm/amd/display: Address kernel doc warnings

2024-07-15 Thread Rodrigo Siqueira
This patchset fixes many of the kernel-doc warnings caused by the display documentation. This series addresses the following warnings: ./drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h:1: warning: no structured comments found ./drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h:1: warning: no structured

[PATCH 4/6] drm/amd/display: Add simple struct doc to remove doc build warning

2024-07-15 Thread Rodrigo Siqueira
This commit is a part of a series that addresses the following build warning for opp: ./drivers/gpu/drm/amd/display/dc/inc/hw/opp.h:1: warning: no structured comments found ./drivers/gpu/drm/amd/display/dc/inc/hw/dpp.h:1: warning: no structured comments found This commit fixes this issue by addin

[PATCH 1/6] drm/amd/display: Move DIO documentation to the right place

2024-07-15 Thread Rodrigo Siqueira
When building the kernel-doc, it complains with the below warning: ./drivers/gpu/drm/amd/display/dc/link/hwss/link_hwss_dio.h:1: warning: no structured comments found ./drivers/gpu/drm/amd/display/dc/link/hwss/link_hwss_dio.h:1: warning: no structured comments found This warning was caused by t

[PATCH 3/6] Documentation/gpu: Adjust DCN documentation paths

2024-07-15 Thread Rodrigo Siqueira
When building the kernel-doc, it has the following complaints: Documentation/gpu/amdgpu/display/dcn-blocks:23: drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h:3: WARNING: Duplicate C declaration, also defined at gpu/amdgpu/display/dcn-blocks:3. Declaration is '.. c:struct:: surface_flip_registers'.

[PATCH 2/6] Documentation/gpu: Remove ':export:' option from DCN documentation

2024-07-15 Thread Rodrigo Siqueira
This commit reduces, but does not fix, all the occurrences and some of the documentation warnings related to the 'no structured comments.' This was caused by the wrong use of the ':export:' option in the DCN kernel-doc, so this commit drops the usage of those options. Reported-by: Stephen Rothwell

Re: [PATCH] drm/amd: Bump KMS_DRIVER_MINOR version

2024-07-15 Thread Alex Deucher
On Thu, Jul 11, 2024 at 11:05 AM Aurabindo Pillai wrote: > > Increase the KMS minor version to indicate GFX12 DCC support since this > contains a major change in how DCC is managed across IPs like GFX, DCN > etc. This will be used mainly by userspace like Mesa to figure out > DCC support on GFX12

Re: [PATCH] drm: Fix documentation warning for read_mpcc_state in mpc.h

2024-07-15 Thread Aurabindo Pillai
On 7/12/24 1:45 PM, Abhishek Tamboli wrote: Add detail description for the read_mpcc_state function in the mpc_funcs struct to resolve the documentation warning. A kernel-doc warning was addressed: ./drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:547: warning: Function parameter or struct member

Re: [PATCH] drm/amd/display: Add function banner for idle_workqueue

2024-07-15 Thread Aurabindo Pillai
Reviewed-by: Aurabindo Pillai On 7/15/24 4:57 PM, roman...@amd.com wrote: From: Roman Li [Why] htmldocs warning: drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h: warning: Function parameter or struct member 'idle_workqueue' not described in 'amdgpu_display_manager'. [How] Add comment secti

[PATCH] drm/amd/display: Add function banner for idle_workqueue

2024-07-15 Thread Roman.Li
From: Roman Li [Why] htmldocs warning: drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h: warning: Function parameter or struct member 'idle_workqueue' not described in 'amdgpu_display_manager'. [How] Add comment section for idle_workqueue with param description. Reported-by: Stephen Rothwell

Re: [PATCH] drm/amd/display: Add doc entry for program_3dlut_size

2024-07-15 Thread Aurabindo Pillai
On 7/15/24 4:39 PM, Alex Hung wrote: Fixes the warning: Function parameter or struct member 'program_3dlut_size' not described in 'mpc_funcs' Signed-off-by: Alex Hung --- drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h | 14 ++ 1 file changed, 14 insertions(+) diff --git a/driv

[PATCH] drm/amd/display: Add doc entry for program_3dlut_size

2024-07-15 Thread Alex Hung
Fixes the warning: Function parameter or struct member 'program_3dlut_size' not described in 'mpc_funcs' Signed-off-by: Alex Hung --- drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h | 14 ++ 1 file changed, 14 insertions(+) diff --git a/drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h b/d

[PATCH] drm/amdkfd: change kfd/svm page fault drain handling

2024-07-15 Thread Xiaogang . Chen
From: Xiaogang Chen When app unmap vm ranges(munmap) kfd/svm starts drain pending page fault and not handle any incoming pages fault of this process until a deferred work item got executed by default system wq. The time period of "no page fault handling" is unpredicable. That adveser kfd performa

Re: [PATCH] drm/amd/display: fix doc entry for bb_from_dmub

2024-07-15 Thread Deucher, Alexander
[Public] Reviewed-by: Alex Deucher From: amd-gfx on behalf of Aurabindo Pillai Sent: Monday, July 15, 2024 3:12 PM To: amd-gfx@lists.freedesktop.org Cc: alexdeuc...@gmail.com ; Siqueira, Rodrigo ; Hung, Alex ; Pillai, Aurabindo Subject: [PATCH] drm/amd/disp

[PATCH] drm/amd/display: fix doc entry for bb_from_dmub

2024-07-15 Thread Aurabindo Pillai
Fixes the warning: Function parameter or struct member 'bb_from_dmub' not described in 'amdgpu_display_manager' Signed-off-by: Aurabindo Pillai --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/displ

Re: [PATCH 1/3] drm/amdgpu: Add empty HDP flush function to JPEG v4.0.3

2024-07-15 Thread Christian König
Am 15.07.24 um 17:08 schrieb Lazar, Lijo: On 7/15/2024 8:28 PM, Christian König wrote: Am 15.07.24 um 16:47 schrieb Jane Jian: From: Lijo Lazar JPEG v4.0.3 doesn't support HDP flush when RRMT is enabled. Instead, mmsch fw will do the flush. Signed-off-by: Lijo Lazar Signed-off-by: Jane Ji

Re: [PATCH 1/3] drm/amdgpu: Add empty HDP flush function to JPEG v4.0.3

2024-07-15 Thread Lazar, Lijo
On 7/15/2024 8:28 PM, Christian König wrote: > > > Am 15.07.24 um 16:47 schrieb Jane Jian: >> From: Lijo Lazar >> >> JPEG v4.0.3 doesn't support HDP flush when RRMT is enabled. Instead, >> mmsch fw will do the flush. >> >> Signed-off-by: Lijo Lazar >> Signed-off-by: Jane Jian >> --- >>   dr

Re: [PATCH 1/3] drm/amdgpu: Add empty HDP flush function to JPEG v4.0.3

2024-07-15 Thread Christian König
Am 15.07.24 um 16:47 schrieb Jane Jian: From: Lijo Lazar JPEG v4.0.3 doesn't support HDP flush when RRMT is enabled. Instead, mmsch fw will do the flush. Signed-off-by: Lijo Lazar Signed-off-by: Jane Jian --- drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_3.c | 9 + 1 file changed, 9 ins

[PATCH 2/3] drm/amdgpu: Add empty HDP flush function to VCN v4.0.3

2024-07-15 Thread Jane Jian
From: Lijo Lazar VCN 4.0.3 cannot trigger HDP flush with RRMT enabled. Instead, mmsch will do the HDP flush. Signed-off-by: Lijo Lazar Signed-off-by: Jane Jian --- drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/v

[PATCH 1/3] drm/amdgpu: Add empty HDP flush function to JPEG v4.0.3

2024-07-15 Thread Jane Jian
From: Lijo Lazar JPEG v4.0.3 doesn't support HDP flush when RRMT is enabled. Instead, mmsch fw will do the flush. Signed-off-by: Lijo Lazar Signed-off-by: Jane Jian --- drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_3.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/gpu/drm/amd/am

[PATCH 1/1] drm/amd/amdgpu: Add support for isp buffers

2024-07-15 Thread Pratap Nirujogi
Add support to create user BOs with MC address for isp using the dma-buf handle exported for the buffers allocated from system memory in isp driver. Export amdgpu_bo_create_kernel() and amdgpu_bo_free_kernel() as well for isp to allocate GTT internal buffers required for fw to run. Signed-off-by:

[PATCH 0/1] Add support for isp buffers

2024-07-15 Thread Pratap Nirujogi
Add support to create user BOs with MC address for isp using the dma-buf handle of the buffers allocated from system memory in isp driver. Steps followed: - Import using dma-buf to create user BO - Pin user BO to GTT domain - Get GPU MC address of BO - MC address is required for ISP WDMAs to wri

Re: [PATCH] drm/amd/pm: early return if disabling DPMS for GFX IP v11.5.2

2024-07-15 Thread Alex Deucher
On Sun, Jul 14, 2024 at 11:40 PM Tim Huang wrote: > > This was intended to add support for GFX IP v11.5.2, but it needs > to be applied to all GFX11 and subsequent APUs. Therefore the code > should be revised to accommodate this. > > Signed-off-by: Tim Huang Acked-by: Alex Deucher > --- > dri

Re: [PATCH v9 00/53] fix CONFIG_DRM_USE_DYNAMIC_DEBUG=y

2024-07-15 Thread Łukasz Bartosik
On Sat, Jul 13, 2024 at 11:45 PM wrote: > > On Fri, Jul 12, 2024 at 9:44 AM Łukasz Bartosik wrote: > > > > On Wed, Jul 3, 2024 at 12:14 AM wrote: > > > > > > On Tue, Jul 2, 2024 at 4:01 PM Luis Chamberlain wrote: > > > > > > > > On Tue, Jul 02, 2024 at 03:56:50PM -0600, Jim Cromie wrote: > > >

Re: [PATCH] drm/amdgpu: Mark amdgpu_bo as invalid after moved

2024-07-15 Thread Christian König
Hi Felix, yes that is a perfectly expected consequence. The last time we talked about it the problem to solve this was that amdgpu_vm_sdma_prepare() couldn't read the fences from a resv object which wasn't locked. That happens both during amdgpu_vm_handle_moved() as well as unlocked in vali

[PATCH 9/9] drm/amdkfd: Validate queue cwsr area and eop buffer size

2024-07-15 Thread Philip Yang
When creating KFD user compute queue, check if queue eop buffer size, cwsr area size, ctl stack size equal to the size of KFD node properities. Check the entire cwsr area which may split into multiple svm ranges aligned to gramularity boundary. Signed-off-by: Philip Yang Reviewed-by: Felix Kuehl

[PATCH 4/9] drm/amdkfd: Validate user queue buffers

2024-07-15 Thread Philip Yang
Find user queue rptr, ring buf, eop buffer and cwsr area BOs, and check BOs are mapped on the GPU with correct size and take the BO reference. Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 4 +++ drivers/gpu/drm/amd/amdkfd/kfd_queue.c | 38

[PATCH 5/9] drm/amdkfd: Ensure user queue buffers residency

2024-07-15 Thread Philip Yang
Add atomic queue_refcount to struct bo_va, return -EBUSY to fail unmap BO from the GPU if the bo_va queue_refcount is not zero. Create queue to increase the bo_va queue_refcount, destroy queue to decrease the bo_va queue_refcount, to ensure the queue buffers mapped on the GPU when queue is active.

[PATCH 8/9] drm/amdkfd: Store queue cwsr area size to node properties

2024-07-15 Thread Philip Yang
Use the queue eop buffer size, cwsr area size, ctl stack size calculation from Thunk, store the value to KFD node properties. Those will be used to validate queue eop buffer size, cwsr area size, ctl stack size when creating KFD user compute queue. Those will be exposed to user space via sysfs KF

[PATCH 7/9] drm/amdkfd: Validate user queue update

2024-07-15 Thread Philip Yang
Ensure update queue new ring buffer is mapped on GPU with correct size. Decrease queue old ring_bo queue_refcount and increase new ring_bo queue_refcount. Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling --- .../amd/amdkfd/kfd_process_queue_manager.c| 32 ++- 1 file c

[PATCH 3/9] drm/amdkfd: Refactor queue wptr_bo GART mapping

2024-07-15 Thread Philip Yang
Add helper function kfd_queue_acquire_buffers to get queue wptr_bo reference from queue write_ptr if it is mapped to the KFD node with expected size. Move wptr_bo to structure queue_properties from struct queue as queue is allocated after queue buffers are validated, then we can remove wptr_bo par

[PATCH 1/9] drm/amdkfd: kfd_bo_mapped_dev support partition

2024-07-15 Thread Philip Yang
Change amdgpu_amdkfd_bo_mapped_to_dev to use drm_priv as parameter instead of adev, to support spatial partition. This is only used by CRIU checkpoint restore now. No functional change. Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h |

[PATCH 6/9] drm/amdkfd: Validate user queue svm memory residency

2024-07-15 Thread Philip Yang
Queue CWSR area maybe registered to GPU as svm memory, create queue to ensure svm mapped to GPU with KFD_IOCTL_SVM_FLAG_GPU_ALWAYS_MAPPED flag. Add queue_refcount to struct svm_range, to track queue CWSR area usage. Because unmap mmu notifier callback return value is ignored, if application unmap

[PATCH 0/9] KFD user queue validation

2024-07-15 Thread Philip Yang
This patch series do additional queue buffers validation in the queue creation IOCTLS, fail the queue creation if buffers not mapped on the GPU with the expected size. Ensure queue buffers residency by tracking the GPUVM virtual addresses for queue buffers to return error if the user tries to free

[PATCH 2/9] drm/amdkfd: amdkfd_free_gtt_mem clear the correct pointer

2024-07-15 Thread Philip Yang
Pass pointer reference to amdgpu_bo_unref to clear the correct pointer, otherwise amdgpu_bo_unref clear the local variable, the original pointer not set to NULL, this could cause use-after-free bug. Signed-off-by: Philip Yang --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 14 +++---

RE: [PATCH 2/2] drm/amdgpu/mes12: add missing opcode string

2024-07-15 Thread Liu, Shaoyun
[AMD Official Use Only - AMD Internal Distribution Only] Reviewed-by : shaoyun. Liu -Original Message- From: amd-gfx On Behalf Of Alex Deucher Sent: Wednesday, July 10, 2024 9:44 AM To: Deucher, Alexander Cc: amd-gfx@lists.freedesktop.org Subject: Re: [PATCH 2/2] drm/amdgpu/mes12: add

[PATCH v4 2/3] drm/amdgpu: More efficient ring padding

2024-07-15 Thread Tvrtko Ursulin
From: Tvrtko Ursulin Having noticed that typically 200+ nops per submission are written into the ring, using a rather verbose one-nop-at-a-time-plus-ring-buffer- arithmetic as done in amdgpu_ring_write(), the obvious idea was to improve it by filling those nops in blocks. This patch therefore ad

Re: [PATCH 2/2] drm/amd/display: use drm_crtc_set_vblank_offdelay()

2024-07-15 Thread Daniel Vetter
On Wed, Jul 10, 2024 at 05:13:18PM -0400, Hamza Mahfooz wrote: > On 7/10/24 04:43, Daniel Vetter wrote: > > On Tue, Jul 09, 2024 at 10:02:08AM -0400, Hamza Mahfooz wrote: > > > On 7/9/24 06:09, Daniel Vetter wrote: > > > > On Tue, Jul 09, 2024 at 11:32:11AM +0200, Daniel Vetter wrote: > > > > > On

[bug report] drm/amd/display: Fix ineffective setting of max bpc property

2024-07-15 Thread Dan Carpenter
Hello Stylon Wang, Commit fa7041d9d2fc ("drm/amd/display: Fix ineffective setting of max bpc property") from Jun 12, 2020 (linux-next), leads to the following Smatch static checker warning: drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:7201 create_validate_stream_for_sink()

Re: [PATCH v9 27/52] selftests-dyndbg: check KCONFIG_CONFIG to avoid silly fails

2024-07-15 Thread jim . cromie
On Wed, Jul 10, 2024 at 2:23 PM Helen Koike wrote: > > > > On 02/07/2024 18:57, Jim Cromie wrote: > > Several tests are dependent upon config choices. Lets avoid failing > > where that is noise. > > ... > > > > test_mod_submod() recaps the bug found in DRM-CI where drivers werent > > If this fixes

[bug report] drm/amd/display: Add DCN3 HWSEQ

2024-07-15 Thread Dan Carpenter
Hello Bhawanpreet Lakha, Commit d99f13878d6f ("drm/amd/display: Add DCN3 HWSEQ") from May 21, 2020 (linux-next), leads to the following Smatch static checker warning: drivers/gpu/drm/amd/amdgpu/../display/dc/hwss/dcn30/dcn30_hwseq.c:401 dcn30_set_output_transfer_func() error: we

Re: [PATCH v9 00/53] fix CONFIG_DRM_USE_DYNAMIC_DEBUG=y

2024-07-15 Thread jim . cromie
On Fri, Jul 12, 2024 at 9:44 AM Łukasz Bartosik wrote: > > On Wed, Jul 3, 2024 at 12:14 AM wrote: > > > > On Tue, Jul 2, 2024 at 4:01 PM Luis Chamberlain wrote: > > > > > > On Tue, Jul 02, 2024 at 03:56:50PM -0600, Jim Cromie wrote: > > > > This fixes dynamic-debug support for DRM.debug, added v

RE: [PATCH V2] drm/amdgpu: add mutex to protect ras shared memory

2024-07-15 Thread Zhang, Hawking
[AMD Official Use Only - AMD Internal Distribution Only] Reviewed-by: Hawking Zhang Regards, Hawking -Original Message- From: Chai, Thomas Sent: Monday, July 15, 2024 14:04 To: amd-gfx@lists.freedesktop.org Cc: Zhang, Hawking ; Zhou1, Tao ; Li, Candice ; Wang, Yang(Kevin) ; Yang, Stan