Re: [PATCH 3/3] drm/amdgpu/pm: store power state per instance

2025-02-11 Thread Lazar, Lijo
On 2/11/2025 5:01 AM, Alex Deucher wrote: > Simplify the driver logic. We support multiple instances > now so reflect that in the driver state. > > Fixes: ff69bba05f08 ("drm/amd/pm: add inst to dpm_set_powergating_by_smu") > Signed-off-by: Alex Deucher > Cc: Boyuan Zhang > --- > drivers/gpu

Re: [PATCH 2/3] drm/amdgpu/pm: fix UVD handing in amdgpu_dpm_set_powergating_by_smu()

2025-02-11 Thread Lazar, Lijo
On 2/11/2025 5:01 AM, Alex Deucher wrote: > UVD and VCN were split into separate dpm helpers in commit > ff69bba05f08 ("drm/amd/pm: add inst to dpm_set_powergating_by_smu") > but the check at the top was still included UVD from an earlier > version of the patch. Fix the check. This description

Re: [PATCH v6 0/9] Add jump table support for objtool on LoongArch

2025-02-11 Thread Huacai Chen
On Wed, Feb 12, 2025 at 7:30 AM Josh Poimboeuf wrote: > > On Tue, Feb 11, 2025 at 07:59:57PM +0800, Huacai Chen wrote: > > Hi, Josh, > > > > On Tue, Feb 11, 2025 at 5:26 AM Josh Poimboeuf wrote: > > > > > > On Mon, Feb 10, 2025 at 02:07:43PM +0800, Tiezhu Yang wrote: > > > > On 01/15/2025 09:34 A

Re: [PATCH 1/3] drm/amdgpu/vcn5.0.1: use correct dpm helper

2025-02-11 Thread Lazar, Lijo
On 2/11/2025 5:01 AM, Alex Deucher wrote: > The VCN and UVD helpers were split in > commit ff69bba05f08 ("drm/amd/pm: add inst to dpm_set_powergating_by_smu") > However, this happened in parallel to the vcn 5.0.1 > development so it was missed there. > > Fixes: 346492f30ce3 ("drm/amdgpu: Add VC

[PATCH] drm/amdgpu: Enable ACA by default for psp v13_0_12

2025-02-11 Thread Candice Li
Enable ACA by default for psp v13_0_12. Signed-off-by: Candice Li Reviewed-by: Hawking Zhang Reviewed-by: Yang Wang --- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/am

[PATCH] drm/amdgpu: Optimize the enablement of GECC

2025-02-11 Thread Candice Li
Enable GECC only when the default memory ECC mode or the module parameter amdgpu_ras_enable is activated. Signed-off-by: Candice Li --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + .../gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c | 18 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c

Re: [PATCH] objtool: remove duplicate case value R_PPC64_REL32

2025-02-11 Thread Josh Poimboeuf
On Tue, Feb 11, 2025 at 10:19:57PM +0800, Kexy Biscuit wrote: > In arch/powerpc/include/uapi/asm/elf.h, R_PPC64_REL32 is defined as a > macro to R_PPC_REL32, makes the case value here being duplicate and > creates the following error... > > arch/powerpc/decode.c: In function ‘arch_reloc_size’: > a

Re: [PATCH v6 0/9] Add jump table support for objtool on LoongArch

2025-02-11 Thread Josh Poimboeuf
On Tue, Feb 11, 2025 at 07:59:57PM +0800, Huacai Chen wrote: > Hi, Josh, > > On Tue, Feb 11, 2025 at 5:26 AM Josh Poimboeuf wrote: > > > > On Mon, Feb 10, 2025 at 02:07:43PM +0800, Tiezhu Yang wrote: > > > On 01/15/2025 09:34 AM, Josh Poimboeuf wrote: > > > > On Sat, Jan 11, 2025 at 02:57:42PM +0

Re: [PATCH] drm/amdkfd: Fix pasid value leak

2025-02-11 Thread Felix Kuehling
On 2025-02-11 17:54, Xiaogang.Chen wrote: > From: Xiaogang Chen > > Curret kfd does not allocate pasid values, instead uses pasid value for each > vm from graphic driver. So should not prevent graphic driver from releasing > pasid values since the values are allocated by graphic driver, not kfd

[PATCH] drm/amdkfd: Fix pasid value leak

2025-02-11 Thread Xiaogang . Chen
From: Xiaogang Chen Curret kfd does not allocate pasid values, instead uses pasid value for each vm from graphic driver. So should not prevent graphic driver from releasing pasid values since the values are allocated by graphic driver, not kfd driver anymore. This patch does not stop graphic driv

Re: [PATCH v3] drm/amd/display/dc: Refactor remove duplications on command_table files

2025-02-11 Thread Alex Deucher
On Fri, Feb 7, 2025 at 6:13 PM Luan Icaro Pinto Arcanjo wrote: > > From: Luan Arcanjo > > All dce command_table_helper's shares a copy-pasted collection > of copy-pasted functions, which are: phy_id_to_atom, > clock_source_id_to_atom_phy_clk_src_id, and engine_bp_to_atom. > > This patch removes t

RE: [PATCH 2/2] drm/amdgpu/mes: Add cleaner shader fence address handling in MES for GFX12

2025-02-11 Thread Liu, Shaoyun
[AMD Official Use Only - AMD Internal Distribution Only] I believe this could be a mistake , from MES side , the set_hw_resource_1 should always be called no matter it's unified or none-unified . I think we should remove it for the unified check at first place . Regards Shaoyun.liu -Orig

Re: [PATCH 2/3] drm/amdgpu: Pop jobs from the queue more robustly

2025-02-11 Thread Tvrtko Ursulin
On 11/02/2025 10:21, Christian König wrote: Am 11.02.25 um 11:08 schrieb Philipp Stanner: On Tue, 2025-02-11 at 09:22 +0100, Christian König wrote: Am 06.02.25 um 17:40 schrieb Tvrtko Ursulin: Replace a copy of DRM scheduler's to_drm_sched_job with a copy of a newly added __drm_sched_entity_

Re: [PATCH 2/3] drm/amdgpu: Pop jobs from the queue more robustly

2025-02-11 Thread Philipp Stanner
On Tue, 2025-02-11 at 09:22 +0100, Christian König wrote: > Am 06.02.25 um 17:40 schrieb Tvrtko Ursulin: > > Replace a copy of DRM scheduler's to_drm_sched_job with a copy of a > > newly > > added __drm_sched_entity_queue_pop. > > > > This allows breaking the hidden dependency that queue_node has

Re: [PATCH v4] drm/sched: Use struct for drm_sched_init() params

2025-02-11 Thread Danilo Krummrich
On Tue, Feb 11, 2025 at 12:14:23PM +0100, Philipp Stanner wrote: > drm_sched_init() has a great many parameters and upcoming new > functionality for the scheduler might add even more. Generally, the > great number of parameters reduces readability and has already caused > one missnaming, addressed

[PATCH] objtool: remove duplicate case value R_PPC64_REL32

2025-02-11 Thread Kexy Biscuit
In arch/powerpc/include/uapi/asm/elf.h, R_PPC64_REL32 is defined as a macro to R_PPC_REL32, makes the case value here being duplicate and creates the following error... arch/powerpc/decode.c: In function ‘arch_reloc_size’: arch/powerpc/decode.c:114:9: error: duplicate case value 114 | ca

Re: [PATCH v4] drm/sched: Use struct for drm_sched_init() params

2025-02-11 Thread Lizhi Hou
On 2/11/25 03:14, Philipp Stanner wrote: drm_sched_init() has a great many parameters and upcoming new functionality for the scheduler might add even more. Generally, the great number of parameters reduces readability and has already caused one missnaming, addressed in: commit 6f1cacf4eba7 ("d

[PATCH] drm/amd/display: Add sanity checks for drm_edid_raw()

2025-02-11 Thread Takashi Iwai
When EDID is retrieved via drm_edid_raw(), it doesn't guarantee to return proper EDID bytes the caller wants: it may be either NULL (that leads to an Oops) or with too long bytes over the fixed size raw_edid array (that may lead to memory corruption). The latter was reported actually when connecte

Re: [PATCH 2/2] drm/amdgpu/mes: Add cleaner shader fence address handling in MES for GFX12

2025-02-11 Thread Alex Deucher
On Mon, Feb 10, 2025 at 8:48 PM Liu, Shaoyun wrote: > > [AMD Official Use Only - AMD Internal Distribution Only] > > Why only free the mem when unified mes is enabled , I remembered that > set_hw_resource_1 will also be called in none-unified mes mode . mes_v12_0_set_hw_resources_1() is current

Re: [PATCH] drm/amdgpu: Unlocked unmap only clear page table leaves

2025-02-11 Thread Philip Yang
On 2025-02-11 05:34, Christian König wrote: Am 20.01.25 um 16:59 schrieb Philip Yang: On 2025-01-15 06:01, Christian König wrote: Am 14.01.25 um 15:53 schrieb Philip Yang:

Re: [PATCH 2/3] drm/amdgpu/pm: fix UVD handing in amdgpu_dpm_set_powergating_by_smu()

2025-02-11 Thread Alex Deucher
Ping on this series? This fixes a regression. Alex On Mon, Feb 10, 2025 at 6:42 PM Alex Deucher wrote: > > UVD and VCN were split into separate dpm helpers in commit > ff69bba05f08 ("drm/amd/pm: add inst to dpm_set_powergating_by_smu") > but the check at the top was still included UVD from an e

RE: [PATCH] drm/amdkfd: Fix the deadlock in svm_range_restore_work

2025-02-11 Thread Deng, Emily
[AMD Official Use Only - AMD Internal Distribution Only] Hi Philip, Upon further consideration, removing amdgpu_amdkfd_unreserve_mem_limit is challenging because it is paired with amdgpu_amdkfd_reserve_mem_limit in svm_migrate_ram_to_vram. However, this pairing does introduce issues, as it

Re: [PATCH v6 0/9] Add jump table support for objtool on LoongArch

2025-02-11 Thread Huacai Chen
Hi, Josh, On Tue, Feb 11, 2025 at 5:26 AM Josh Poimboeuf wrote: > > On Mon, Feb 10, 2025 at 02:07:43PM +0800, Tiezhu Yang wrote: > > On 01/15/2025 09:34 AM, Josh Poimboeuf wrote: > > > On Sat, Jan 11, 2025 at 02:57:42PM +0800, Tiezhu Yang wrote: > > > > Hi Josh and Peter, > > > > > > > > On 12/17

[PATCH v4] drm/sched: Use struct for drm_sched_init() params

2025-02-11 Thread Philipp Stanner
drm_sched_init() has a great many parameters and upcoming new functionality for the scheduler might add even more. Generally, the great number of parameters reduces readability and has already caused one missnaming, addressed in: commit 6f1cacf4eba7 ("drm/nouveau: Improve variable name in nouveau_

RE: [PATCH] drm/amdkfd: Fix the deadlock in svm_range_restore_work

2025-02-11 Thread Deng, Emily
[AMD Official Use Only - AMD Internal Distribution Only] From: Yang, Philip Sent: Tuesday, February 11, 2025 6:54 AM To: Deng, Emily ; Chen, Xiaogang ; amd-gfx@lists.freedesktop.org Subject: Re: [PATCH] drm/amdkfd: Fix the deadlock in svm_range_restore_work On 2025-02-10 02:51, Deng, Emily

Re: [PATCH] drm/amdgpu: Unlocked unmap only clear page table leaves

2025-02-11 Thread Christian König
Am 20.01.25 um 16:59 schrieb Philip Yang: On 2025-01-15 06:01, Christian König wrote: Am 14.01.25 um 15:53 schrieb Philip Yang: SVM migration unmap pages from GPU and then update mapping to GPU to recover page fault. Currently unmap clears the PDE entry for range length >= huge page and fr

Re: [PATCH 2/3] drm/amdgpu: Pop jobs from the queue more robustly

2025-02-11 Thread Christian König
Am 11.02.25 um 11:08 schrieb Philipp Stanner: On Tue, 2025-02-11 at 09:22 +0100, Christian König wrote: Am 06.02.25 um 17:40 schrieb Tvrtko Ursulin: Replace a copy of DRM scheduler's to_drm_sched_job with a copy of a newly added __drm_sched_entity_queue_pop. This allows breaking the hidden dep

[PATCH] drm/amdgpu: Add support for page queue scheduling

2025-02-11 Thread jesse.zh...@amd.com
This patch updates the sdma engine to support scheduling for the page queue. The main changes include: - Introduce a new variable `page` to handle the page queue if it exists. - Update the scheduling logic to conditionally set the `sched.ready` flag for both the sdma gfx queue and the page queue

Re: [PATCH 1/1] drm/amdgpu: add sdma page queue irq processing for sdma442

2025-02-11 Thread Lazar, Lijo
On 2/11/2025 12:09 PM, Le Ma wrote: > Add the trap irq processing for page queue of sdma442 > > Signed-off-by: Le Ma Reviewed-by: Lijo Lazar Maybe good to add a WARN_ON(!adev->sdma.has_page_queue) Thanks, Lijo > --- > drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c | 3 +++ > 1 file changed, 3 i

Re: [PATCH 3/3] drm/sched: Remove a hole from struct drm_sched_job

2025-02-11 Thread Christian König
Am 06.02.25 um 17:40 schrieb Tvrtko Ursulin: We can re-order some struct members and take u32 credits outside of the pointer sandwich and also for the last_dependency member we can get away with an unsigned int since for dependency we use xa_limit_32b. Pahole report before: /* size: 160

Re: [PATCH 2/3] drm/amdgpu: Pop jobs from the queue more robustly

2025-02-11 Thread Christian König
Am 06.02.25 um 17:40 schrieb Tvrtko Ursulin: Replace a copy of DRM scheduler's to_drm_sched_job with a copy of a newly added __drm_sched_entity_queue_pop. This allows breaking the hidden dependency that queue_node has to be the first element in struct drm_sched_job. A comment is also added with

Re: [PATCH] drm/amdgpu: Modify the seq64 VM cache policy

2025-02-11 Thread Christian König
Am 11.02.25 um 07:10 schrieb Arunpravin Paneer Selvam: The seq64 VM cache policy should be set to UC (Uncached) to match with userqueue fence address kernel mapped memory's cache settings. Signed-off-by: Arunpravin Paneer Selvam Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu

Re: [PATCH v2 1/7] drm/amdgpu: Per-instance init func for JPEG4_0_3

2025-02-11 Thread Christian König
Am 11.02.25 um 05:09 schrieb Sundararaju, Sathishkumar: Hi Christian, On 2/11/2025 12:52 AM, Christian König wrote: Am 10.02.25 um 15:25 schrieb Sathishkumar S: Add helper functions to handle per-instance and per-core initialization and deinitialization in JPEG4_0_3. Signed-off-by: Sathishku

Re: [PATCH V5 1/2] drm/amdgpu/mes: Add cleaner shader fence address handling in MES for GFX11

2025-02-11 Thread Christian König
Am 10.02.25 um 22:19 schrieb Alex Deucher: From: Srinivasan Shanmugam This commit introduces enhancements to the handling of the cleaner shader fence in the AMDGPU MES driver: - The MES (Microcode Execution Scheduler) now sends a PM4 packet to the KIQ (Kernel Interface Queue) to request the