RE: [PATCH V2] drm/amdgpu: Fix ras mode2 reset failure in ras aca mode

2024-04-24 Thread Wang, Yang(Kevin)
[AMD Official Use Only - General] Reviewed-by: Yang Wang Best Regards, Kevin -Original Message- From: Chai, Thomas Sent: Wednesday, April 24, 2024 1:52 PM To: amd-gfx@lists.freedesktop.org Cc: Chai, Thomas ; Zhang, Hawking ; Zhou1, Tao ; Li, Candice ; Wang, Yang(Kevin) ; Yang,

Re: [PATCH v5 2/6] drm/amdgpu: Handle sg size limit for contiguous allocation

2024-04-24 Thread Christian König
Am 23.04.24 um 17:28 schrieb Philip Yang: Define macro MAX_SG_SEGMENT_SIZE 2GB, because struct scatterlist length is unsigned int, and some users of it cast to a signed int, so every segment of sg table is limited to size 2GB maximum. For contiguous VRAM allocation, don't limit the max buddy

RE: [PATCH 1/2] drm/amdgpu: fix double free err_addr pointer warnings

2024-04-24 Thread Zhou, Bob
[Public] Ping Regards, Bob -Original Message- From: Bob Zhou Sent: 2024年4月23日 13:33 To: amd-gfx@lists.freedesktop.org; Deucher, Alexander ; Koenig, Christian Cc: Zhou, Bob Subject: [PATCH 1/2] drm/amdgpu: fix double free err_addr pointer warnings In

Re: [PATCH] drm/amdgpu: Fix two reset triggered in a row

2024-04-24 Thread Christian König
Am 23.04.24 um 20:05 schrieb Felix Kuehling: On 2024-04-23 01:50, Christian König wrote: Am 22.04.24 um 21:45 schrieb Yunxiang Li: Reset request from KFD is missing a check for if a reset is already in progress, this causes a second reset to be triggered right after the previous one finishes.

RE: [PATCH 3/4] drm/amdgpu: Using uninitialized value new_state.jpeg when calling adev->vcn.pause_dpg_mode

2024-04-24 Thread Zhang, Jesse(Jie)
[AMD Official Use Only - General] Please ignore this patch: For vcn_v1, it override the idle work handler and initialize new_state.jpeg at the function vcn_v1_0_idle_work_handler. /* Override the work func */ adev->vcn.idle_work.work.func = vcn_v1_0_idle_work_handler; -Original

Re: [PATCH v5 4/6] drm/amdkfd: Evict BO itself for contiguous allocation

2024-04-24 Thread Philip Yang
On 2024-04-23 18:15, Felix Kuehling wrote: On 2024-04-23 11:28, Philip Yang wrote: 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

RE: [PATCH 28/46] drm/amd/display: Enable RCO for PHYSYMCLK in DCN35

2024-04-24 Thread Li, Roman
[Public] > -Original Message- > From: Wayne Lin > Sent: Wednesday, April 24, 2024 4:49 AM > To: amd-gfx@lists.freedesktop.org > Cc: Wentland, Harry ; Li, Sun peng (Leo) > ; Siqueira, Rodrigo ; > Pillai, Aurabindo ; Li, Roman > ; Lin, Wayne ; Gutierrez, > Agustin ; Chung, ChiaHsuan (Tom)

[PATCH v3] drm/amdgpu: add return result for amdgpu_i2c_{get/put}_byte

2024-04-24 Thread Bob Zhou
After amdgpu_i2c_get_byte fail, amdgpu_i2c_put_byte shouldn't be conducted to put wrong value. So return and check the i2c transfer result. Signed-off-by: Bob Zhou Suggested-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c | 47 +++-- 1 file changed, 28

Re: [PATCH v3] drm/amdgpu: add return result for amdgpu_i2c_{get/put}_byte

2024-04-24 Thread Christian König
Am 24.04.24 um 11:36 schrieb Bob Zhou: After amdgpu_i2c_get_byte fail, amdgpu_i2c_put_byte shouldn't be conducted to put wrong value. So return and check the i2c transfer result. Signed-off-by: Bob Zhou Suggested-by: Christian König Reviewed-by: Christian König ---

Re: [PATCH] drm/amd/display: re-indent dc_power_down_on_boot()

2024-04-24 Thread Christian König
Am 24.04.24 um 15:20 schrieb Dan Carpenter: On Wed, Apr 24, 2024 at 03:11:08PM +0200, Christian König wrote: Am 24.04.24 um 13:41 schrieb Dan Carpenter: These lines are indented too far. Clean the whitespace. Signed-off-by: Dan Carpenter --- drivers/gpu/drm/amd/display/dc/core/dc.c | 7

[PATCH 2/3] drm/amdgpu: Initialize timestamp for some legacy SOCs

2024-04-24 Thread Ma Jun
Initialize the interrupt timestamp for some legacy SOCs to fix the coverity issue "Uninitialized scalar variable" Signed-off-by: Ma Jun Suggested-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 8 1 file changed, 8 insertions(+) diff --git

[PATCH 3/3] drm/amdgpu: Fix the uninitialized variable warning

2024-04-24 Thread Ma Jun
Initialize the phy_id to 0 to fix the warning of "Using uninitialized value phy_id" Signed-off-by: Ma Jun --- drivers/gpu/drm/amd/amdgpu/amdgpu_securedisplay.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_securedisplay.c

[PATCH 1/3] drm/amdgpu: Fix uninitialized variable warning in amdgpu_afmt_acr

2024-04-24 Thread Ma Jun
Assign value to clock to fix the warning below: "Using uninitialized value res. Field res.clock is uninitialized" Signed-off-by: Ma Jun --- drivers/gpu/drm/amd/amdgpu/amdgpu_afmt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_afmt.c

Re: [PATCH 2/3] drm/amdgpu: Initialize timestamp for some legacy SOCs

2024-04-24 Thread Christian König
Am 24.04.24 um 12:03 schrieb Ma Jun: Initialize the interrupt timestamp for some legacy SOCs to fix the coverity issue "Uninitialized scalar variable" Signed-off-by: Ma Jun Suggested-by: Christian König Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 8

RE: [PATCH] drm/amdgpu: Fix two reset triggered in a row

2024-04-24 Thread Li, Yunxiang (Teddy)
[Public] > We have the KFD, FLR, the per engine one in the scheduler and IIRC one more > for the CP (illegal operation and register write). > > I'm not sure about the CP one, but all others should be handled correctly > with the V2 patch as far as I can see. Where can I find the CP one?

Re: [PATCH] drm/amd/display: re-indent dc_power_down_on_boot()

2024-04-24 Thread Christian König
Am 24.04.24 um 13:41 schrieb Dan Carpenter: These lines are indented too far. Clean the whitespace. Signed-off-by: Dan Carpenter --- drivers/gpu/drm/amd/display/dc/core/dc.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c

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

2024-04-24 Thread Philip Yang
On 2024-04-23 18:17, Felix Kuehling wrote: On 2024-04-23 11:28, Philip Yang wrote: RDMA device with limited scatter-gather ability requires contiguous VRAM buffer allocation for RDMA peer direct support.

Re: [PATCH v3] drm/amdgpu: fix uninitialized scalar variable warning

2024-04-24 Thread Christian König
Am 23.04.24 um 16:31 schrieb Tim Huang: From: Tim Huang Clear warning that uses uninitialized value fw_size. Signed-off-by: Tim Huang Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

Re: [PATCH v6 0/5] Best effort contiguous VRAM allocation

2024-04-24 Thread Felix Kuehling
The series is Reviewed-by: Felix Kuehling On 2024-04-24 11:27, Philip Yang wrote: 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

[RFC PATCH 15/18] drm/amdgpu: Set a default priority for user/kernel BOs

2024-04-24 Thread Friedrich Vock
Reserve the highest priority for the kernel, and choose a balanced value as userspace default. Userspace is intended to be able to modify these later to mark buffers as important/unimportant. Signed-off-by: Friedrich Vock --- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c| 1 +

[RFC PATCH 12/18] drm/ttm: Do not evict BOs with higher priority

2024-04-24 Thread Friedrich Vock
This makes buffer eviction significantly more stable by avoiding ping-ponging caused by low-priority buffers evicting high-priority buffers and vice versa. Signed-off-by: Friedrich Vock --- drivers/gpu/drm/ttm/ttm_bo.c | 9 +++-- drivers/gpu/drm/ttm/ttm_resource.c | 5 +++--

[RFC PATCH 05/18] drm/ttm: Add option to evict no BOs in operation

2024-04-24 Thread Friedrich Vock
When undoing evictions because of decreased memory pressure, it makes no sense to try evicting other buffers. Signed-off-by: Friedrich Vock --- drivers/gpu/drm/ttm/ttm_bo.c | 2 ++ include/drm/ttm/ttm_bo.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/drivers/gpu/drm/ttm/ttm_bo.c

[RFC PATCH 18/18] drm/amdgpu: Bump minor version

2024-04-24 Thread Friedrich Vock
Indicates support for EVICTED_VRAM queries and AMDGPU_GEM_OP_SET_PRIORITY Signed-off-by: Friedrich Vock --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c

[RFC PATCH 13/18] drm/ttm: Implement ttm_bo_update_priority

2024-04-24 Thread Friedrich Vock
Used to dynamically adjust priorities of buffers at runtime, to react to changes in memory pressure/usage patterns. Signed-off-by: Friedrich Vock --- drivers/gpu/drm/ttm/ttm_bo.c | 17 + include/drm/ttm/ttm_bo.h | 2 ++ 2 files changed, 19 insertions(+) diff --git

[RFC PATCH 14/18] drm/ttm: Consider BOs placed in non-favorite locations evicted

2024-04-24 Thread Friedrich Vock
If we didn't get the favorite placement because it was full, we should try moving it into the favorite placement once there is space. Signed-off-by: Friedrich Vock --- drivers/gpu/drm/ttm/ttm_bo.c | 28 +++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git

[RFC PATCH 10/18] drm/amdgpu: Don't add GTT to initial domains after failing to allocate VRAM

2024-04-24 Thread Friedrich Vock
This adds GTT to the "preferred domains" of this buffer object, which will also prevent any attempts at moving the buffer back to VRAM if there is space. If VRAM is full, GTT will already be chosen as a fallback. Signed-off-by: Friedrich Vock --- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c| 4

[RFC PATCH 01/18] drm/ttm: Add tracking for evicted memory

2024-04-24 Thread Friedrich Vock
These utilities will be used to keep track of what buffers have been evicted from any particular place, to try and decide when to try undoing the eviction. Signed-off-by: Friedrich Vock --- drivers/gpu/drm/ttm/ttm_device.c | 1 + drivers/gpu/drm/ttm/ttm_resource.c | 14 ++

[RFC PATCH 07/18] drm/amdgpu: Add TTM uneviction control functions

2024-04-24 Thread Friedrich Vock
Try unevicting only VRAM/GTT BOs. Signed-off-by: Friedrich Vock --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 50 + 1 file changed, 50 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c index

[RFC PATCH 08/18] drm/amdgpu: Don't try moving BOs to preferred domain before submit

2024-04-24 Thread Friedrich Vock
TTM now takes care of moving buffers to the best possible domain. Signed-off-by: Friedrich Vock --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 2 - drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 191 + drivers/gpu/drm/amd/amdgpu/amdgpu_cs.h | 4 -

[RFC PATCH 00/18] TTM interface for managing VRAM oversubscription

2024-04-24 Thread Friedrich Vock
Hi everyone, recently I've been looking into remedies for apps (in particular, newer games) that experience significant performance loss when they start to hit VRAM limits, especially on older or lower-end cards that struggle to fit both desktop apps and all the game data into VRAM at once. The

[RFC PATCH 04/18] drm/ttm: Add driver funcs for uneviction control

2024-04-24 Thread Friedrich Vock
Provides fine-grained control for drivers over which buffers should be considered when attempting to undo evictions. Signed-off-by: Friedrich Vock --- include/drm/ttm/ttm_device.h | 23 +++ 1 file changed, 23 insertions(+) diff --git a/include/drm/ttm/ttm_device.h

[RFC PATCH 09/18] drm/amdgpu: Don't mark VRAM as a busy placement for VRAM|GTT resources

2024-04-24 Thread Friedrich Vock
We will never try evicting things from VRAM for these resources anyway. This affects TTM buffer uneviction logic, which would otherwise try to move these buffers into VRAM (clashing with VRAM-only allocations). Signed-off-by: Friedrich Vock --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 13

[RFC PATCH 06/18] drm/ttm: Add public buffer eviction/uneviction functions

2024-04-24 Thread Friedrich Vock
For now, they are only used internally inside TTM, but this will change with the introduction of dynamic buffer priorities. Signed-off-by: Friedrich Vock --- drivers/gpu/drm/ttm/ttm_bo.c | 168 ++- include/drm/ttm/ttm_bo.h | 6 ++ 2 files changed, 172

[RFC PATCH 02/18] drm/ttm: Add per-BO eviction tracking

2024-04-24 Thread Friedrich Vock
Make each buffer object aware of whether it has been evicted or not. Signed-off-by: Friedrich Vock --- drivers/gpu/drm/ttm/ttm_bo.c | 1 + include/drm/ttm/ttm_bo.h | 11 +++ 2 files changed, 12 insertions(+) diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c

[RFC PATCH 03/18] drm/ttm: Implement BO eviction tracking

2024-04-24 Thread Friedrich Vock
For each buffer object, remember evictions and try undoing them if memory pressure gets lower again. Signed-off-by: Friedrich Vock --- drivers/gpu/drm/ttm/ttm_bo.c | 28 +++- drivers/gpu/drm/ttm/ttm_bo_util.c | 3 +++ 2 files changed, 30 insertions(+), 1

Re: [PATCH 1/2] drm/amdgpu: fix double free err_addr pointer warnings

2024-04-24 Thread Deucher, Alexander
[AMD Official Use Only - General] Acked-by: Alex Deucher From: Bob Zhou Sent: Tuesday, April 23, 2024 1:32 AM To: amd-gfx@lists.freedesktop.org ; Deucher, Alexander ; Koenig, Christian Cc: Zhou, Bob Subject: [PATCH 1/2] drm/amdgpu: fix double free err_addr

[PATCH] drm/amd/display: Avoid -Wenum-float-conversion in add_margin_and_round_to_dfs_grainularity()

2024-04-24 Thread Nathan Chancellor
f (divider < DFS_DIVIDER_RANGE_2_START) { --- base-commit: d60dc4dd72412d5d9566fdf391e4202b05f88912 change-id: 20240424-amdgpu-display-dcn401-enum-float-conversion-c09cc1826ea2 Best regards, -- Nathan Chancellor

[RFC PATCH 11/18] drm/ttm: Bump BO priority count

2024-04-24 Thread Friedrich Vock
For adjustable priorities by userspace, it is nice to have a bit more granularity. Signed-off-by: Friedrich Vock --- include/drm/ttm/ttm_resource.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/drm/ttm/ttm_resource.h b/include/drm/ttm/ttm_resource.h index

[RFC PATCH 16/18] drm/amdgpu: Implement SET_PRIORITY GEM op

2024-04-24 Thread Friedrich Vock
Used by userspace to adjust buffer priorities in response to changes in application demand and memory pressure. Signed-off-by: Friedrich Vock --- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 20 include/uapi/drm/amdgpu_drm.h | 1 + 2 files changed, 21 insertions(+)

[RFC PATCH 17/18] drm/amdgpu: Implement EVICTED_VRAM query

2024-04-24 Thread Friedrich Vock
Used by userspace to gauge the severity of memory overcommit and make prioritization decisions based on it. Used by userspace to gauge the severity of memory overcommit and make prioritization decisions based on it. Signed-off-by: Friedrich Vock --- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 3

RE: [PATCH 3/3] drm/amdgpu: Fix the uninitialized variable warning

2024-04-24 Thread Deucher, Alexander
[AMD Official Use Only - General] > -Original Message- > From: Ma, Jun > Sent: Wednesday, April 24, 2024 6:04 AM > To: amd-gfx@lists.freedesktop.org; Koenig, Christian > ; Deucher, Alexander > > Cc: Ma, Jun > Subject: [PATCH 3/3] drm/amdgpu: Fix the uninitialized variable warning > >

Re: [PATCH] drm/amdgpu: Fix buffer size in gfx_v9_4_3_init_ cp_compute_microcode() and rlc_microcode()

2024-04-24 Thread Lazar, Lijo
On 4/23/2024 7:13 AM, Srinivasan Shanmugam wrote: > The buffer size is determined by the declaration char fw_name[30]; This > means fw_name can hold up to 30 characters, including the null character > that marks the end of the string. > > The string to be written is "amdgpu/%s_mec.bin" or

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

2024-04-24 Thread Lyude Paul
For the nouveau bits: Reviewed-by: Lyude Paul On Mon, 2024-04-22 at 15:10 +0300, Jani Nikula wrote: > Surprisingly many places depend on debugfs.h to be included via > drm_print.h. Fix them. > > v3: Also fix armada, ite-it6505, imagination, msm, sti, vc4, and xe > > v2: Also fix ivpu and

[PATCH 1/2] drm/amd/display: Add frame_warn_flag to dml2_core_shared.o

2024-04-24 Thread Nathan Chancellor
When building with tip of tree Clang, there are some new instances of -Wframe-larger-than from the new display code (which become fatal with CONFIG_WERROR=y): drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml21/src/dml2_core/dml2_core_shared.c:754:6: error: stack frame size (2488) exceeds

[PATCH 2/2] drm/amd/display: Fix CFLAGS for dml2_core_dcn4_calcs.o

2024-04-24 Thread Nathan Chancellor
-Wframe-larger-than=2048 is a part of both CFLAGS and CFLAGS_REMOVE for dml2_core_dcn4_calcs.o, which means that it ultimately gets removed altogether for 64-bit targets, as 2048 is the default FRAME_WARN value for 64-bit platforms, resulting in no -Wframe-larger-than coverage for this file.

[pull] amdgpu, amdkfd drm-fixes-6.9

2024-04-24 Thread Alex Deucher
Hi Dave, Sima, Fixes for 6.9. The following changes since commit ed30a4a51bb196781c8058073ea720133a65596f: Linux 6.9-rc5 (2024-04-21 12:35:54 -0700) are available in the Git repository at: https://gitlab.freedesktop.org/agd5f/linux.git tags/amd-drm-fixes-6.9-2024-04-24 for you to fetch

[PATCH v6 2/5] drm/amdgpu: Handle sg size limit for contiguous allocation

2024-04-24 Thread Philip Yang
Define macro AMDGPU_MAX_SG_SEGMENT_SIZE 2GB, because struct scatterlist length is unsigned int, and some users of it cast to a signed int, so every segment of sg table is limited to size 2GB maximum. For contiguous VRAM allocation, don't limit the max buddy block size in order to get contiguous

[PATCH v6 0/5] Best effort contiguous VRAM allocation

2024-04-24 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 v6 3/5] drm/amdgpu: Evict BOs from same process for contiguous allocation

2024-04-24 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 v6 1/5] drm/amdgpu: Support contiguous VRAM allocation

2024-04-24 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 v6 5/5] drm/amdkfd: Bump kfd version for contiguous VRAM allocation

2024-04-24 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 v6 4/5] drm/amdkfd: Evict BO itself for contiguous allocation

2024-04-24 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. v6: user context should use interruptible call (Felix) Signed-off-by: Philip Yang ---

Re: [PATCH] drm/amdkfd: Enforce queue BO's adev

2024-04-24 Thread Alex Deucher
On Wed, Apr 24, 2024 at 1:57 PM Harish Kasiviswanathan wrote: > > Queue buffer, though it is in system memory, has to be created using the > correct amdgpu device. Enforce this as the BO needs to mapped to the > GART for MES Hardware scheduler to access it. > > Signed-off-by: Harish

RE: [PATCH 1/3] drm/amdgpu: Fix uninitialized variable warning in amdgpu_afmt_acr

2024-04-24 Thread Deucher, Alexander
[AMD Official Use Only - General] > -Original Message- > From: Ma, Jun > Sent: Wednesday, April 24, 2024 6:04 AM > To: amd-gfx@lists.freedesktop.org; Koenig, Christian > ; Deucher, Alexander > > Cc: Ma, Jun > Subject: [PATCH 1/3] drm/amdgpu: Fix uninitialized variable warning in >

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

2024-04-24 Thread Deucher, Alexander
[Public] > -Original Message- > From: Jani Nikula > Sent: Wednesday, April 24, 2024 9:55 AM > To: dri-de...@lists.freedesktop.org > Cc: Andrzej Hajda ; Maxime Ripard > ; Jacek Lawrynowicz > ; Stanislaw Gruszka > ; Oded Gabbay ; > Russell King ; David Airlie ; Daniel > Vetter ; Neil

[PATCH] drm/amdkfd: Enforce queue BO's adev

2024-04-24 Thread Harish Kasiviswanathan
Queue buffer, though it is in system memory, has to be created using the correct amdgpu device. Enforce this as the BO needs to mapped to the GART for MES Hardware scheduler to access it. Signed-off-by: Harish Kasiviswanathan --- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 5 + 1 file

[PATCH 0/2] drm/amd/display: Use frame_warn_flag consistently in dml2 Makefile

2024-04-24 Thread Nathan Chancellor
-id: 20240424-amdgpu-dml2-fix-frame-larger-than-dcn401-48ff7e1f51ea Best regards, -- Nathan Chancellor

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

2024-04-24 Thread Lucas De Marchi
On Mon, Apr 22, 2024 at 03:10:10PM GMT, Jani Nikula wrote: drivers/gpu/drm/xe/xe_debugfs.c | 1 + drivers/gpu/drm/xe/xe_gt_debugfs.c | 2 ++ drivers/gpu/drm/xe/xe_uc_debugfs.c | 2 ++ Acked-by: Lucas De Marchi thanks Lucas De Marchi

Re: [PATCH] drm/amdkfd: Enforce queue BO's adev

2024-04-24 Thread Felix Kuehling
On 2024-04-24 13:40, Harish Kasiviswanathan wrote: Queue buffer, though it is in system memory, has to be created using the correct amdgpu device. Enforce this as the BO needs to mapped to the GART for MES Hardware scheduler to access it. Signed-off-by: Harish Kasiviswanathan I guess this

Re: [PATCH 2/2] drm/amd/display: Fix CFLAGS for dml2_core_dcn4_calcs.o

2024-04-24 Thread Pillai, Aurabindo
[AMD Official Use Only - General] Thanks for the fix. Reviewed-by: Aurabindo Pillai -- Regards, Jay From: Nathan Chancellor Sent: Wednesday, April 24, 2024 2:19 PM To: Wentland, Harry ; Li, Sun peng (Leo) ; Siqueira, Rodrigo ; Deucher, Alexander ; Koenig,

[linux-next:master] BUILD REGRESSION 5e4f84f18c4ee9b0ccdc19e39b7de41df21699dd

2024-04-24 Thread kernel test robot
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master branch HEAD: 5e4f84f18c4ee9b0ccdc19e39b7de41df21699dd Add linux-next specific files for 20240424 Error/Warning reports: https://lore.kernel.org/oe-kbuild-all/202404242144.8931hnhx-...@intel.com https

RE: [PATCH 11/15] drm/amdgpu: prepare to handle pasid poison consumption

2024-04-24 Thread Zhang, Hawking
[AMD Official Use Only - General] +void amdgpu_amdkfd_ras_pasid_poison_consumption_handler(struct amdgpu_device *adev, + enum amdgpu_ras_block block, uint16_t pasid, + pasid_notify pasid_fn, void *data, uint32_t reset); So we ultimately switch to

RE: [PATCH V2] drm/amdgpu: Fix ras mode2 reset failure in ras aca mode

2024-04-24 Thread Wang, Yang(Kevin)
[AMD Official Use Only - General] >> Alternatively, we need to explore the opportunity to centralize legacy ras >> and aca ras implementation in the same API. Take sysfs create/remove >> interface for example, legacy RAS and ACA RAS do share the same logic, just >> have different filesystem

[PATCH] drm/amdgpu: fix potential resource leak warning

2024-04-24 Thread Tim Huang
From: Tim Huang Clear resource leak warning that when the prepare fails, the allocated amdgpu job object will never be released. Signed-off-by: Tim Huang --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c | 5 + 1 file changed, 5 insertions(+) diff --git

RE: [PATCH V2] drm/amdgpu: Fix ras mode2 reset failure in ras aca mode

2024-04-24 Thread Zhang, Hawking
[AMD Official Use Only - General] The patch is Reviewed-by: Hawking Zhang Kevin, Thomas, Alternatively, we need to explore the opportunity to centralize legacy ras and aca ras implementation in the same API. Take sysfs create/remove interface for example, legacy RAS and ACA RAS do share the

RE: [PATCH 04/15] drm/amdgpu: add poison creation handler

2024-04-24 Thread Chai, Thomas
[AMD Official Use Only - General] OK, I will do this. - Best Regards, Thomas -Original Message- From: Zhang, Hawking Sent: Thursday, April 25, 2024 10:33 AM To: Chai, Thomas ; amd-gfx@lists.freedesktop.org Cc: Chai, Thomas ; Zhou1, Tao ; Li, Candice ; Wang,

RE: [PATCH 04/15] drm/amdgpu: add poison creation handler

2024-04-24 Thread Zhang, Hawking
[AMD Official Use Only - General] Is it okay to drop below static function and just implement the logic in poison creation handler leveraging the ras query api: amdgpu_ras_query_error_status. It seems to me the static function may not be able to be used for other IP blocks. Regards, Hawking

RE: [PATCH 06/15] drm/amdgpu: umc v12_0 converts error address

2024-04-24 Thread Zhang, Hawking
[AMD Official Use Only - General] I might lose some context here. Can you please elaborate why we don't leverage the existing umc_v12_0_convert_error_address implementation? Regards, Hawking -Original Message- From: Chai, Thomas Sent: Thursday, April 18, 2024 10:58 To:

RE: [PATCH 11/15] drm/amdgpu: prepare to handle pasid poison consumption

2024-04-24 Thread Chai, Thomas
[AMD Official Use Only - General] - Best Regards, Thomas -Original Message- From: Zhang, Hawking Sent: Thursday, April 25, 2024 11:01 AM To: Chai, Thomas ; amd-gfx@lists.freedesktop.org Cc: Zhou1, Tao ; Li, Candice ; Wang, Yang(Kevin) ; Yang, Stanley Subject: RE:

RE: [PATCH 06/15] drm/amdgpu: umc v12_0 converts error address

2024-04-24 Thread Chai, Thomas
[AMD Official Use Only - General] amdgpu_umc_fill_error_record is called in umc_v12_0_convert_error_address directly to prepare for page retirement, The new path need to check if these converted pages already exist before filling the error page, umc_v12_0_convert_error_address is not suitable

[PATCH] drm/amdgpu: fix overflowed array index read warning

2024-04-24 Thread Tim Huang
From: Tim Huang Clear warning that cast operation might have overflowed. Signed-off-by: Tim Huang --- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c

Re: [PATCH v2] drm/amdgpu: add return result for amdgpu_i2c_{get/put}_byte

2024-04-24 Thread Christian König
Am 24.04.24 um 09:52 schrieb Bob Zhou: After amdgpu_i2c_get_byte fail, amdgpu_i2c_put_byte shouldn't be conducted to put wrong value. So return and check the i2c transfer result. Signed-off-by: Bob Zhou Looks good in general, just some coding style comments below. ---

[PATCH 06/46] drm/amd/display: Skip finding free audio for unknown engine_id

2024-04-24 Thread Wayne Lin
From: Alex Hung [WHY] ENGINE_ID_UNKNOWN = -1 and can not be used as an array index. Plus, it also means it is uninitialized and does not need free audio. [HOW] Skip and return NULL. This fixes 2 OVERRUN issues reported by Coverity. Reviewed-by: Rodrigo Siqueira Acked-by: Wayne Lin

[PATCH 07/46] drm/amd/display: Fix overlapping copy within dml_core_mode_programming

2024-04-24 Thread Wayne Lin
From: Hersen Wu [WHY] _lib->mp.Watermark and >Watermark are the same address. memcpy may lead to unexpected behavior. [HOW] memmove should be used. Reviewed-by: Rodrigo Siqueira Acked-by: Wayne Lin Reviewed-by: Alex Hung Signed-off-by: Hersen Wu ---

[PATCH 09/46] drm/amd/display: ASSERT when failing to find index by plane/stream id

2024-04-24 Thread Wayne Lin
From: Alex Hung [WHY] find_disp_cfg_idx_by_plane_id and find_disp_cfg_idx_by_stream_id returns an array index and they return -1 when not found; however, -1 is not a valid index number. [HOW] When this happens, call ASSERT(), and return a positive number (which is fewer than callers' array

[PATCH 08/46] drm/amd/display: Do not return negative stream id for array

2024-04-24 Thread Wayne Lin
From: Alex Hung [WHY] resource_stream_to_stream_idx returns an array index and it return -1 when not found; however, -1 is not a valid array index number. [HOW] When this happens, call ASSERT(), and return a zero instead. This fixes an OVERRUN and an NEGATIVE_RETURNS issues reported by

[PATCH 11/46] drm/amd/display: Improve registers write

2024-04-24 Thread Wayne Lin
From: Rodrigo Siqueira Add REG_SEQ_SUBMIT and REG_SEQ_WAIT_DONE to optimize the burst write for the regama lut. Acked-by: Wayne Lin Signed-off-by: Rodrigo Siqueira --- drivers/gpu/drm/amd/display/dc/dpp/dcn10/dcn10_dpp_cm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

[PATCH 10/46] drm/amd/display: Remove unnecessary files

2024-04-24 Thread Wayne Lin
[Why & How] We accidentally upstream unnecessary files. Remove them. Reviewed-by: Tom Chung Signed-off-by: Wayne Lin --- drivers/gpu/drm/amd/display/dc/dpp/dcn10/CMakeLists.txt | 6 -- drivers/gpu/drm/amd/display/dc/dpp/dcn20/CMakeLists.txt | 5 -

[PATCH 13/46] drm/amd/display: Adjust codestyle for dcn31 and hdcp_msg

2024-04-24 Thread Wayne Lin
From: Rodrigo Siqueira This commit just update the code style in two if conditions and in an static array. Acked-by: Wayne Lin Signed-off-by: Rodrigo Siqueira --- drivers/gpu/drm/amd/display/dc/dml/dcn31/dcn31_fpu.c | 8 drivers/gpu/drm/amd/display/dc/hdcp/hdcp_msg.c | 2 +- 2

[PATCH 14/46] drm/amd/display: Add VCO speed parameter for DCN31 FPU

2024-04-24 Thread Wayne Lin
From: Rodrigo Siqueira Add VCO speed parameters in the bounding box array. Acked-by: Wayne Lin Signed-off-by: Rodrigo Siqueira --- drivers/gpu/drm/amd/display/dc/dml/dcn31/dcn31_fpu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/display/dc/dml/dcn31/dcn31_fpu.c

[PATCH 4/4 V2] drm/amdgpu: Using uninitialized value *size when calling amdgpu_vce_cs_reloc

2024-04-24 Thread Jesse Zhang
Initialize the size before calling amdgpu_vce_cs_reloc, such as case 0x0301. V2: To really improve the handling we would actually need to have a separate value of 0x.(Christian) Signed-off-by: Jesse Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 2 +- 1 file changed, 1

[PATCH 15/46] drm/amd/display: Adjust functions prefix for some of the dcn301 fpu functions

2024-04-24 Thread Wayne Lin
From: Rodrigo Siqueira Add dcn301_fpu prefix to some of the FPU function with the required adjustments. Acked-by: Wayne Lin Signed-off-by: Rodrigo Siqueira --- .../amd/display/dc/dml/dcn301/dcn301_fpu.c| 4 ++-- .../amd/display/dc/dml/dcn301/dcn301_fpu.h| 7 +++

[PATCH 12/46] drm/amd/display: Add missing SMU version

2024-04-24 Thread Wayne Lin
From: Rodrigo Siqueira This commit add PP_SMU_VER_VG to the pp_smu_ver list. Acked-by: Wayne Lin Signed-off-by: Rodrigo Siqueira --- drivers/gpu/drm/amd/display/dc/dm_pp_smu.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/dm_pp_smu.h

Re: [PATCH 4/4 V2] drm/amdgpu: Using uninitialized value *size when calling amdgpu_vce_cs_reloc

2024-04-24 Thread Christian König
Am 24.04.24 um 10:41 schrieb Jesse Zhang: Initialize the size before calling amdgpu_vce_cs_reloc, such as case 0x0301. V2: To really improve the handling we would actually need to have a separate value of 0x.(Christian) Signed-off-by: Jesse Zhang ---

[PATCH 00/46] DC Patches April 29, 2024

2024-04-24 Thread Wayne Lin
This DC patchset brings improvements in multiple areas. In summary, we highlight: - Disable seamless boot on 128b/132b encoding - Change ASSR disable sequence to avoid corruption - Fix few IPS problems - Enable Replay for DCN315 - Fix few ODM problems - Fix FEC_READY write timing - Fix few FPO

[PATCH 01/46] drm/amd/display: Do cursor programming with rest of pipe

2024-04-24 Thread Wayne Lin
From: Harry Wentland Cursors are always programmed independently of updates on other planes. When atomic commits program cursor and surface updates together the cursor update might be locked out by the surface update and not take effect. To combat this program cursor and surface updates

[PATCH 03/46] drm/amd/display: Add NULL pointer check for kzalloc

2024-04-24 Thread Wayne Lin
From: Hersen Wu [Why & How] Check return pointer of kzalloc before using it. Reviewed-by: Alex Hung Acked-by: Wayne Lin Signed-off-by: Hersen Wu --- .../gpu/drm/amd/display/dc/clk_mgr/dcn30/dcn30_clk_mgr.c | 8 .../gpu/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c | 8

[PATCH 02/46] drm/amd/display: Always use legacy way of setting cursor on DCE

2024-04-24 Thread Wayne Lin
From: Harry Wentland Some IGT tests fail with the new atomic cursor updates when running on older DCE-based ASICs. To work around these issues keep calling the amdgpu_dm_commit_cursors for each cursor update on DCE, even if those cursor updates coincide with other plane updates. Reviewed-by:

[PATCH 08/46] drm/amd/display: Do not return negative stream id for array

2024-04-24 Thread Wayne Lin
From: Alex Hung [WHY] resource_stream_to_stream_idx returns an array index and it return -1 when not found; however, -1 is not a valid array index number. [HOW] When this happens, call ASSERT(), and return a zero instead. This fixes an OVERRUN and an NEGATIVE_RETURNS issues reported by

[PATCH 07/46] drm/amd/display: Fix overlapping copy within dml_core_mode_programming

2024-04-24 Thread Wayne Lin
From: Hersen Wu [WHY] _lib->mp.Watermark and >Watermark are the same address. memcpy may lead to unexpected behavior. [HOW] memmove should be used. Reviewed-by: Rodrigo Siqueira Acked-by: Wayne Lin Reviewed-by: Alex Hung Signed-off-by: Hersen Wu ---

[PATCH 06/46] drm/amd/display: Skip finding free audio for unknown engine_id

2024-04-24 Thread Wayne Lin
From: Alex Hung [WHY] ENGINE_ID_UNKNOWN = -1 and can not be used as an array index. Plus, it also means it is uninitialized and does not need free audio. [HOW] Skip and return NULL. This fixes 2 OVERRUN issues reported by Coverity. Reviewed-by: Rodrigo Siqueira Acked-by: Wayne Lin

[PATCH 09/46] drm/amd/display: ASSERT when failing to find index by plane/stream id

2024-04-24 Thread Wayne Lin
From: Alex Hung [WHY] find_disp_cfg_idx_by_plane_id and find_disp_cfg_idx_by_stream_id returns an array index and they return -1 when not found; however, -1 is not a valid index number. [HOW] When this happens, call ASSERT(), and return a positive number (which is fewer than callers' array

[PATCH 05/46] drm/amd/display: Check pipe offset before setting vblank

2024-04-24 Thread Wayne Lin
From: Alex Hung pipe_ctx has a size of MAX_PIPES so checking its index before accessing the array. This fixes an OVERRUN issue reported by Coverity. Reviewed-by: Rodrigo Siqueira Acked-by: Wayne Lin Signed-off-by: Alex Hung --- .../drm/amd/display/dc/irq/dce110/irq_service_dce110.c| 8

[PATCH 04/46] drm/amd/display: Check index msg_id before read or write

2024-04-24 Thread Wayne Lin
From: Alex Hung [WHAT] msg_id is used as an array index and it cannot be a negative value, and therefore cannot be equal to MOD_HDCP_MESSAGE_ID_INVALID (-1). [HOW] Check whether msg_id is valid before reading and setting. This fixes 4 OVERRUN issues reported by Coverity. Reviewed-by: Rodrigo

[PATCH 10/46] drm/amd/display: Remove unnecessary files

2024-04-24 Thread Wayne Lin
[Why & How] We accidentally upstream unnecessary files. Remove them. Reviewed-by: Tom Chung Signed-off-by: Wayne Lin --- drivers/gpu/drm/amd/display/dc/dpp/dcn10/CMakeLists.txt | 6 -- drivers/gpu/drm/amd/display/dc/dpp/dcn20/CMakeLists.txt | 5 -

[PATCH 11/46] drm/amd/display: Improve registers write

2024-04-24 Thread Wayne Lin
From: Rodrigo Siqueira Add REG_SEQ_SUBMIT and REG_SEQ_WAIT_DONE to optimize the burst write for the regama lut. Acked-by: Wayne Lin Signed-off-by: Rodrigo Siqueira --- drivers/gpu/drm/amd/display/dc/dpp/dcn10/dcn10_dpp_cm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

[PATCH 12/46] drm/amd/display: Add missing SMU version

2024-04-24 Thread Wayne Lin
From: Rodrigo Siqueira This commit add PP_SMU_VER_VG to the pp_smu_ver list. Acked-by: Wayne Lin Signed-off-by: Rodrigo Siqueira --- drivers/gpu/drm/amd/display/dc/dm_pp_smu.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/dm_pp_smu.h

[PATCH 17/46] drm/amd/display: Update some of the dcn303 parameters

2024-04-24 Thread Wayne Lin
From: Rodrigo Siqueira Adjust to update some of the dcn303 parameters. Acked-by: Wayne Lin Signed-off-by: Rodrigo Siqueira --- .../amd/display/dc/resource/dcn303/dcn303_resource.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git

[PATCH 18/46] drm/amd/display: Remove legacy code in DC

2024-04-24 Thread Wayne Lin
From: Rodrigo Siqueira This commit just remove some trivial legacy code in some of the DC files. Acked-by: Wayne Lin Signed-off-by: Rodrigo Siqueira --- drivers/gpu/drm/amd/display/dc/dml/dcn31/dcn31_fpu.c | 12 drivers/gpu/drm/amd/display/dc/hwss/Makefile | 6 --

[PATCH 14/46] drm/amd/display: Add VCO speed parameter for DCN31 FPU

2024-04-24 Thread Wayne Lin
From: Rodrigo Siqueira Add VCO speed parameters in the bounding box array. Acked-by: Wayne Lin Signed-off-by: Rodrigo Siqueira --- drivers/gpu/drm/amd/display/dc/dml/dcn31/dcn31_fpu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/display/dc/dml/dcn31/dcn31_fpu.c

  1   2   >