Re: [PATCH v3 1/4] drm/amd: Add support for prepare() and complete() callbacks

2023-10-03 Thread Mario Limonciello
On 10/3/2023 16:22, Deucher, Alexander wrote: [Public] -Original Message- From: Limonciello, Mario Sent: Tuesday, October 3, 2023 5:17 PM To: Deucher, Alexander ; amd- g...@lists.freedesktop.org Cc: Wentland, Harry Subject: Re: [PATCH v3 1/4] drm/amd: Add support for prepare() and com

[PATCH 5/6] drm/amdgpu: Add new macro WREG32_RLC_XCC (v2)

2023-10-03 Thread Victor Lu
WREG32_RLC does not specify the correct XCC so the RLCG interface does not work. Define WREG32_RLC_XCC to be like WREG32_RLC but include a parameter to specify the XCC. v2: Add new macro WREG32_RLC_XCC instead of modifying exiting WREG32_RLC macro Original v1 title: "drm/amdgpu: Add xcc inst

[PATCH 6/6] drm/amdgpu: Use *REG32_RLC_XCC in gfx_v9_4_3.c (v2)

2023-10-03 Thread Victor Lu
gfx_v9_4_3_xcc_set_compute_eop_interrupt_state should use *REG32_RLC_XCC so CP_ME1_PIPE0_INT_CNTL registers can be accessed under SRIOV. v2: Use RREG32_RLC_XCC Original v1 title: "drm/amdgpu: Use *REG32_RLC in gfx_v9_4_3.c" Signed-off-by: Victor Lu --- drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c |

[PATCH 4/6] drm/amdgpu: Add xcc_inst param to amdgpu_virt_kiq_reg_write_reg_wait (v2)

2023-10-03 Thread Victor Lu
amdgpu_virt_kiq_reg_write_reg_wait is hardcoded to use MEC engine 0. Add xcc_inst as a parameter to allow it to use different MEC engines. v2: rebase Signed-off-by: Victor Lu --- drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 5 +++-- drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h | 3 ++- drivers/gpu/

[PATCH 3/6] drm/amdgpu: Use correct KIQ MEC engine for gfx9.4.3 (v2)

2023-10-03 Thread Victor Lu
amdgpu_kiq_wreg/rreg is hardcoded to use MEC engine 0. Add an xcc_id parameter to amdgpu_kiq_wreg/rreg, define W/RREG32_XCC and amdgpu_device_xcc_wreg/rreg to to use the new xcc_id parameter. v2: define amdgpu_device_xcc_wreg/rreg instead of changing parameters of amdgpu_device_wreg/rreg Sig

[PATCH 2/6] drm/amdgpu: Add xcc instance parameter to *REG32_SOC15_IP_NO_KIQ (v2)

2023-10-03 Thread Victor Lu
The WREG32/RREG32_SOC15_IP_NO_KIQ call is using XCC0's RLCG interface when programming other XCCs. Add xcc instance parameter to them. v2: rebase Signed-off-by: Victor Lu --- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 16 drivers/gpu/drm/amd/amdgpu/soc15_common.h | 6 +++---

[PATCH 1/6] drm/amdgpu: Add flag to enable indirect RLCG access for gfx v9.4.3

2023-10-03 Thread Victor Lu
The "rlcg_reg_access_supported" flag is missing. Add it back in. Signed-off-by: Victor Lu --- drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c index fbfe0a1c4b19..e7543bc

[PATCH v4] drm/amdkfd: Use partial migrations in GPU page faults

2023-10-03 Thread Xiaogang . Chen
From: Xiaogang Chen This patch implements partial migration in gpu page fault according to migration granularity(default 2MB) and not split svm range in cpu page fault handling. A svm range may include pages from both system ram and vram of one gpu now. These chagnes are expected to improve migra

[PATCH] drm/amdgpu: Annotate struct amdgpu_bo_list with __counted_by

2023-10-03 Thread Kees Cook
Prepare for the coming implementation by GCC and Clang of the __counted_by attribute. Flexible array members annotated with __counted_by can have their accesses bounds-checked at run-time via CONFIG_UBSAN_BOUNDS (for array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family functions). A

Re: [PATCH 1/2] drm/amd/display: Refactor dm_get_plane_scale helper

2023-10-03 Thread Hamza Mahfooz
On 10/2/23 10:16, Michel Dänzer wrote: From: Michel Dänzer Cleanup, no functional change intended. Signed-off-by: Michel Dänzer Seems like this series does indeed fix the issue, so I have applied it instead of the revert. --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 23 ++

Re: [PATCH v2] drm/amdkfd: Fix EXT_COHERENT memory allocation crash

2023-10-03 Thread Felix Kuehling
On 2023-10-03 16:50, Philip Yang wrote: If there is no VRAM domain, bo_node is NULL and this causes crash. Refactor the change, and use the module parameter as higher privilege. Need another patch to support override PTE flag on APU. Fixes: 55d7e2001c7e ("drm/amdgpu: Add EXT_COHERENT memory a

RE: [PATCH v3 1/4] drm/amd: Add support for prepare() and complete() callbacks

2023-10-03 Thread Deucher, Alexander
[Public] > -Original Message- > From: Limonciello, Mario > Sent: Tuesday, October 3, 2023 5:17 PM > To: Deucher, Alexander ; amd- > g...@lists.freedesktop.org > Cc: Wentland, Harry > Subject: Re: [PATCH v3 1/4] drm/amd: Add support for prepare() and > complete() callbacks > > On 10/3/202

Re: [PATCH v3 1/4] drm/amd: Add support for prepare() and complete() callbacks

2023-10-03 Thread Mario Limonciello
On 10/3/2023 16:11, Deucher, Alexander wrote: [Public] -Original Message- From: amd-gfx On Behalf Of Mario Limonciello Sent: Tuesday, October 3, 2023 4:55 PM To: amd-gfx@lists.freedesktop.org Cc: Wentland, Harry ; Limonciello, Mario Subject: [PATCH v3 1/4] drm/amd: Add support for pre

RE: [PATCH v3 1/4] drm/amd: Add support for prepare() and complete() callbacks

2023-10-03 Thread Deucher, Alexander
[Public] > -Original Message- > From: amd-gfx On Behalf Of Mario > Limonciello > Sent: Tuesday, October 3, 2023 4:55 PM > To: amd-gfx@lists.freedesktop.org > Cc: Wentland, Harry ; Limonciello, Mario > > Subject: [PATCH v3 1/4] drm/amd: Add support for prepare() and complete() > callbacks

[PATCH v3 4/4] drm/amd/display: make dc_set_power_state() return type `void` again

2023-10-03 Thread Mario Limonciello
As dc_set_power_state() no longer allocates memory, it's not necessary to have return types and check return code as it can't fail anymore. Change it back to `void`. Signed-off-by: Mario Limonciello --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 17 + drivers/gpu/drm/amd/

[PATCH v3 3/4] drm/amd/display: Destroy DC context while keeping DML

2023-10-03 Thread Mario Limonciello
If there is memory pressure at suspend time then dynamically allocating a large structure as part of DC suspend code will fail. Instead re-use the same structure and clear all members except those that should be maintained. Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2362 Signed-off-by:

[PATCH v3 2/4] drm/amd: Move evict resources suspend step to prepare()

2023-10-03 Thread Mario Limonciello
If the system is under high memory pressure, the resources may need to be evicted into swap instead. If the storage backing for swap is offlined during the suspend() step then such a call may fail. So instead move this step into prepare(), while leaving all other steps that put the GPU into a low

[PATCH v3 1/4] drm/amd: Add support for prepare() and complete() callbacks

2023-10-03 Thread Mario Limonciello
Linux PM core has a prepare() callback run before suspend and complete() callback ran after resume() for devices to use. Add plumbing to bring prepare() to amdgpu. The idea with the new vfuncs for amdgpu is that all IP blocks that memory allocations during suspend should do the allocation from th

[PATCH v3 0/4] Better handle memory pressure at suspend

2023-10-03 Thread Mario Limonciello
At suspend time if there is memory pressure then dynamically allocating memory will cause failures that don't clean up properly when trying suspend a second time. Move the bigger memory allocations into Linux PM prepare() callback and drop allocations that aren't really needed in DC code. v1: ht

Re: [PATCH v2] Revert "drm/amd/display: Enable Replay for static screen use cases"

2023-10-03 Thread Hamza Mahfooz
On 10/2/23 13:47, ivlip...@amd.com wrote: From: Ivan Lipski This reverts commit a92da5bc33ea99a861f6c422192af6072c145d2d. V2: Reword commit message [WHY] This commit caused regression in which eDP's with PSR support, but no Replay support (Sink support <= 0x03), failed enabling PSR and all IG

[PATCH v2] drm/amdkfd: Fix EXT_COHERENT memory allocation crash

2023-10-03 Thread Philip Yang
If there is no VRAM domain, bo_node is NULL and this causes crash. Refactor the change, and use the module parameter as higher privilege. Need another patch to support override PTE flag on APU. Fixes: 55d7e2001c7e ("drm/amdgpu: Add EXT_COHERENT memory allocation flags") Signed-off-by: Philip Yang

Re: [PATCH v2] Revert "drm/amd/display: Enable Replay for static screen use cases"

2023-10-03 Thread Lakha, Bhawanpreet
[AMD Official Use Only - General] You can revert it for now, but that is a bug as replay_feature_enabled should stop all replay related calls. From: LIPSKI, IVAN Sent: October 3, 2023 4:11 PM To: Lakha, Bhawanpreet ; Li, Sun peng (Leo) ; amd-gfx@lists.freedeskto

Re: [PATCH v2] Revert "drm/amd/display: Enable Replay for static screen use cases"

2023-10-03 Thread LIPSKI, IVAN
[AMD Official Use Only - General] Setting 'replay_feature_enabled' to false did not fix the issue, and PSR could not be enabled on an eDP without Replay support (Sink support 0x03 in my case). Thank you, Ivan Lipski From: Lakha, Bhawanpreet Sent: October 3,

Re: [PATCH 0/5] drm/amd/display: Remove migrate-disable and move memory allocation.

2023-10-03 Thread Harry Wentland
On 2023-10-02 06:58, Sebastian Andrzej Siewior wrote: > On 2023-09-22 07:33:26 [+0200], Christian König wrote: >> Am 21.09.23 um 16:15 schrieb Sebastian Andrzej Siewior: >>> Hi, >>> >>> I stumbled uppon the amdgpu driver via a bugzilla report. The actual fix >>> is #4 + #5 and the rest was made whi

Re: [PATCH 1/5] drm/amd/display: Remove migrate_en/dis from dc_fpu_begin().

2023-10-03 Thread Harry Wentland
On 2023-09-21 10:15, Sebastian Andrzej Siewior wrote: > This is a revert of the commit mentioned below while it is not wrong, as > in the kernel will explode, having migrate_disable() here it is > complete waste of resources. > > Additionally commit message is plain wrong the review tag does not m

[PATCH] drm/amdgpu: Enable SMU 13.0.0 optimizations when ROCm is active

2023-10-03 Thread Alex Deucher
When ROCm is active enable additional SMU 13.0.0 optimizations. This reuses the unused powersave profile on PMFW. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c b/d

Re: [PATCH] drm/amdkfd: Fix EXT_COHERENT memory allocation crash

2023-10-03 Thread Francis, David
[AMD Official Use Only - General] > If there is no VRAM domain, bo_node is NULL and this causes crash. Move > ​the EXT_COHERENT support change to VRAM domain path. > > Need another patch to support override PTE flag on APU. > > Fixes: 55d7e2001c7e ("drm/amdgpu: Add EXT_COHERENT memory allocation f

Re: [Patch v2 2/2] drm/amdgpu: Use ttm_pages_limit to override vram reporting

2023-10-03 Thread Bhardwaj, Rajneesh
On 10/3/2023 2:07 PM, Felix Kuehling wrote: On 2023-10-02 16:21, Rajneesh Bhardwaj wrote: On GFXIP9.4.3 APU, allow the memory reporting as per the ttm pages limit in NPS1 mode. Signed-off-by: Rajneesh Bhardwaj ---   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 17 -   drivers

Re: [Patch v2 2/2] drm/amdgpu: Use ttm_pages_limit to override vram reporting

2023-10-03 Thread Felix Kuehling
On 2023-10-02 16:21, Rajneesh Bhardwaj wrote: On GFXIP9.4.3 APU, allow the memory reporting as per the ttm pages limit in NPS1 mode. Signed-off-by: Rajneesh Bhardwaj --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 17 - drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 9 +

Re: [PATCH] drm/amdkfd: Fix EXT_COHERENT memory allocation crash

2023-10-03 Thread Felix Kuehling
On 2023-10-03 12:57, Philip Yang wrote: If there is no VRAM domain, bo_node is NULL and this causes crash. Move the EXT_COHERENT support change to VRAM domain path. Need another patch to support override PTE flag on APU. Fixes: 55d7e2001c7e ("drm/amdgpu: Add EXT_COHERENT memory allocation flags

RE: [PATCH] drm/amdkfd: Fix EXT_COHERENT memory allocation crash

2023-10-03 Thread Kasiviswanathan, Harish
[AMD Official Use Only - General] Acked-by: Harish Kasiviswanathan -Original Message- From: amd-gfx On Behalf Of Philip Yang Sent: Tuesday, October 3, 2023 12:57 PM To: amd-gfx@lists.freedesktop.org Cc: Yang, Philip ; Kuehling, Felix Subject: [PATCH] drm/amdkfd: Fix EXT_COHERENT memory

Re: [PATCH 1/5] drm/amdgpu: Move package type enum to amdgpu.h

2023-10-03 Thread Alex Deucher
Series is: Reviewed-by: Alex Deucher On Tue, Oct 3, 2023 at 1:02 PM Lazar, Lijo wrote: > > [AMD Official Use Only - General] > > Ping on this series. > > Since there is no alternate header to put device property other than > amdgpu.h, this can be moved also when appropriate split of header file

Re: [PATCH v2] Revert "drm/amd/display: Enable Replay for static screen use cases"

2023-10-03 Thread Lakha, Bhawanpreet
[AMD Official Use Only - General] yes, it will disable replay. From: Li, Sun peng (Leo) Sent: October 3, 2023 11:40 AM To: Lakha, Bhawanpreet ; LIPSKI, IVAN ; amd-gfx@lists.freedesktop.org Cc: Siqueira, Rodrigo ; Mahfooz, Hamza ; Wentland, Harry ; Deucher, Al

[PATCH] drm/amdkfd: Fix EXT_COHERENT memory allocation crash

2023-10-03 Thread Philip Yang
If there is no VRAM domain, bo_node is NULL and this causes crash. Move the EXT_COHERENT support change to VRAM domain path. Need another patch to support override PTE flag on APU. Fixes: 55d7e2001c7e ("drm/amdgpu: Add EXT_COHERENT memory allocation flags") Signed-off-by: Philip Yang --- driver

RE: [PATCH 1/5] drm/amdgpu: Move package type enum to amdgpu.h

2023-10-03 Thread Zhang, Hawking
[AMD Official Use Only - General] Alternatively, might just keep the PKG_TYPE definition in amdgpu_smuio.h Regards, Hawking -Original Message- From: Lazar, Lijo Sent: Wednesday, October 4, 2023 00:51 To: Lazar, Lijo ; amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander ; Zhang, Hawking

RE: [PATCH 1/5] drm/amdgpu: Move package type enum to amdgpu.h

2023-10-03 Thread Lazar, Lijo
[AMD Official Use Only - General] Ping on this series. Since there is no alternate header to put device property other than amdgpu.h, this can be moved also when appropriate split of header files are decided. Other than that any comments on this? Thanks, Lijo -Original Message- From:

Re: [PATCH v2] drm/amdgpu: fix ip count query for xcp partitions

2023-10-03 Thread Sundararaju, Sathishkumar
Hi Alex, My apology, I was under the impression that RB is a must. I understand now that ACK is good, checked with Leo after your response. Thank you. Regards, Sathish On 10/3/2023 10:01 PM, Alex Deucher wrote: On Tue, Oct 3, 2023 at 12:22 PM Sundararaju, Sathishkumar wrote: Hi , Kind

Re: [PATCH v2] drm/amdgpu: fix ip count query for xcp partitions

2023-10-03 Thread Alex Deucher
On Tue, Oct 3, 2023 at 12:22 PM Sundararaju, Sathishkumar wrote: > > Hi , > > Kind request to help review the change. Thank you. I acked this change back when you sent it out, but if it didn't come through for some reason: Acked-by: Alex Deucher > > Regards, > > Sathish > > On 9/21/2023 8:17 PM

Re: [PATCH v2 2/3] drm/amd: Move evict resources suspend step to prepare()

2023-10-03 Thread Mario Limonciello
On 10/3/2023 07:58, Deucher, Alexander wrote: [AMD Official Use Only - General] -Original Message- From: amd-gfx On Behalf Of Mario Limonciello Sent: Monday, October 2, 2023 6:45 PM To: amd-gfx@lists.freedesktop.org Cc: Wentland, Harry ; Limonciello, Mario Subject: [PATCH v2 2/3] drm/

[linux-next:master] BUILD REGRESSION c9f2baaa18b5ea8f006a2b3a616da9597c71d15e

2023-10-03 Thread kernel test robot
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master branch HEAD: c9f2baaa18b5ea8f006a2b3a616da9597c71d15e Add linux-next specific files for 20231003 Error/Warning reports: https://lore.kernel.org/oe-kbuild-all/202309122047.cri9yjrq-...@intel.com https

Re: [PATCH v2] drm/amdgpu: fix ip count query for xcp partitions

2023-10-03 Thread Sundararaju, Sathishkumar
Hi , Kind request to help review the change. Thank you. Regards, Sathish On 9/21/2023 8:17 PM, Alex Deucher wrote: On Thu, Sep 21, 2023 at 9:07 AM Sathishkumar S wrote: fix wrong ip count INFO on spatial partitions. update the query to return the instance count corresponding to the partitio

Re: [PATCH v3 09/32] drm/amd/display: add plane 3D LUT driver-specific properties

2023-10-03 Thread Melissa Wen
On 09/27, Harry Wentland wrote: > > > On 2023-09-25 15:49, Melissa Wen wrote: > > Add 3D LUT property for plane color transformations using a 3D lookup > > table. 3D LUT allows for highly accurate and complex color > > transformations and is suitable to adjust the balance between color > > channe

Re: [PATCH v2] Revert "drm/amd/display: Enable Replay for static screen use cases"

2023-10-03 Thread Leo Li
On 2023-10-03 11:23, Lakha, Bhawanpreet wrote: [AMD Official Use Only - General] Why not just set replay_feature_enabled = true; to false? Would that be the right fix? If so, we can send out a patch with that instead. - Leo ---

Re: [PATCH v2] Revert "drm/amd/display: Enable Replay for static screen use cases"

2023-10-03 Thread Lakha, Bhawanpreet
[AMD Official Use Only - General] Why not just set replay_feature_enabled = true; to false? From: Li, Sun peng (Leo) Sent: October 3, 2023 11:20 AM To: Lakha, Bhawanpreet ; LIPSKI, IVAN ; amd-gfx@lists.freedesktop.org Cc: Siqueira, Rodrigo ; Mahfooz, Hamza ; W

Re: [PATCH v2] Revert "drm/amd/display: Enable Replay for static screen use cases"

2023-10-03 Thread Leo Li
On 2023-10-03 11:13, Lakha, Bhawanpreet wrote: [AMD Official Use Only - General] Any reason for reverting this instead of looking into "amdgpu_dm_setup_replay()" and "replay_feature_enabled" to see why reply is being enabled? It causes a regression in amd_psr. Unless there's a quick fix,

Re: [PATCH v2] Revert "drm/amd/display: Enable Replay for static screen use cases"

2023-10-03 Thread Lakha, Bhawanpreet
[AMD Official Use Only - General] Any reason for reverting this instead of looking into "amdgpu_dm_setup_replay()" and "replay_feature_enabled" to see why reply is being enabled? Bhawan From: LIPSKI, IVAN Sent: October 2, 2023 1:47 PM To: amd-gfx@lists.freedesk

RE: [PATCH v2 2/3] drm/amd: Move evict resources suspend step to prepare()

2023-10-03 Thread Deucher, Alexander
[AMD Official Use Only - General] > -Original Message- > From: amd-gfx On Behalf Of Mario > Limonciello > Sent: Monday, October 2, 2023 6:45 PM > To: amd-gfx@lists.freedesktop.org > Cc: Wentland, Harry ; Limonciello, Mario > > Subject: [PATCH v2 2/3] drm/amd: Move evict resources suspend