RE: [PATCH] drm/amd/pm: parse pp_handle under appropriate conditions

2023-05-05 Thread Chen, Guchun
[AMD Official Use Only - General] > -Original Message- > From: Quan, Evan > Sent: Saturday, May 6, 2023 9:51 AM > To: Chen, Guchun ; amd- > g...@lists.freedesktop.org; Deucher, Alexander > ; Zhang, Hawking > ; Lazar, Lijo ; Koenig, > Christian ; Pan, Xinhui > Cc: Limonciello, Mario >

[PATCH v3] drm/amd/pm: parse pp_handle under appropriate conditions

2023-05-05 Thread Guchun Chen
amdgpu_dpm_is_overdrive_supported is a common API across all asics, so we should cast pp_handle into correct structure under different power frameworks. v2: using return directly to simplify code v3: SI asic does not carry od_enabled member in pp_handle, and update Fixes tag Link:

RE: [PATCH] drm/amd/pm: parse pp_handle under appropriate conditions

2023-05-05 Thread Quan, Evan
[AMD Official Use Only - General] +Mario I believe the comment below from Mario points the right direction to suppress the "UBSAN: invalid-load..." warnings. https://gitlab.freedesktop.org/drm/amd/-/issues/2541#note_1898035 However, it might be not right to simply drop the line below since the

Re: [RFC PATCH 0/4] Add support for DRM cgroup memory accounting.

2023-05-05 Thread Tejun Heo
Hello, On Wed, May 03, 2023 at 10:34:56AM +0200, Maarten Lankhorst wrote: > RFC as I'm looking for comments. > > For long running compute, it can be beneficial to partition the GPU memory > between cgroups, so each cgroup can use its maximum amount of memory without > interfering with other

Re: [PATCH] drm/amdgpu: remove unneeded semicolon

2023-05-05 Thread Alex Deucher
Applied. Thanks! Alex On Fri, May 5, 2023 at 3:43 AM Jiapeng Chong wrote: > > No functional modification involved. > > ./drivers/gpu/drm/amd/amdgpu/nbio_v7_9.c:146:2-3: Unneeded semicolon. > > Reported-by: Abaci Robot > Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4871 >

Re: [PATCH V2] drm/amdgpu/display: Enable DC_FP for LoongArch

2023-05-05 Thread Alex Deucher
On Fri, May 5, 2023 at 2:39 PM WANG Xuerui wrote: > > On 5/6/23 02:00, Alex Deucher wrote: > > On Fri, May 5, 2023 at 1:57 PM WANG Xuerui wrote: > >> > >> On a side note, I had to modprobe amdgpu with runpm=0, otherwise my > >> dmesg gets flooded with PSP getting resumed every 8~10 seconds or

Re: [PATCH V2] drm/amdgpu/display: Enable DC_FP for LoongArch

2023-05-05 Thread WANG Xuerui
On 5/6/23 02:00, Alex Deucher wrote: On Fri, May 5, 2023 at 1:57 PM WANG Xuerui wrote: On a side note, I had to modprobe amdgpu with runpm=0, otherwise my dmesg gets flooded with PSP getting resumed every 8~10 seconds or so. I currently have none of the connectors plugged in. I didn't notice

Re: [PATCH V2] drm/amdgpu/display: Enable DC_FP for LoongArch

2023-05-05 Thread Alex Deucher
t; >> index 1743ca0a3641..86f4c0e04654 100644 > >> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/dc_fpu.c > >> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/dc_fpu.c > >> @@ -33,6 +33,8 @@ > >> #include > >> #elif defined(CONFIG_ARM64) > >> #include

Re: [PATCH V2] drm/amdgpu/display: Enable DC_FP for LoongArch

2023-05-05 Thread WANG Xuerui
kernel_fpu_begin(); This is going to conflict with commit b1bcdd409d2d ("drm/amd/display: Disable migration to ensure consistency of per-CPU variable"), which is present in next-20230505. Resolution is trivial though.   #elif defined(CONFIG_PPC64)   if (cpu_has_fea

Re: [PATCH] drm/amd/amdgpu: Fix assingment in if condition in amdgpu_irq.c

2023-05-05 Thread Christian König
Am 05.05.23 um 16:59 schrieb Srinivasan Shanmugam: Assignments in if condition are less readable and error-prone. Fixes below error & warnings reported by checkpatch" ERROR: do not use assignment in if condition + } else if ((src = adev->irq.client[client_id].sources[src_id])) {

[PATCH] drm/amd/amdgpu: Fix assingment in if condition in amdgpu_irq.c

2023-05-05 Thread Srinivasan Shanmugam
Assignments in if condition are less readable and error-prone. Fixes below error & warnings reported by checkpatch" ERROR: do not use assignment in if condition + } else if ((src = adev->irq.client[client_id].sources[src_id])) { WARNING: braces {} are not necessary for any arm of this

Re: [Intel-gfx] [RFC PATCH 2/4] drm/cgroup: Add memory accounting to DRM cgroup

2023-05-05 Thread Maarten Lankhorst
I just now noticed the other comments. Wiill address them. On 2023-05-03 17:31, Tvrtko Ursulin wrote: On 03/05/2023 09:34, Maarten Lankhorst wrote: Based roughly on the rdma and misc cgroup controllers, with a lot of the accounting code borrowed from rdma. The interface is simple: - populate

Re: [PATCH V2] drm/amdgpu/display: Enable DC_FP for LoongArch

2023-05-05 Thread Hamza Mahfooz
Hey Huacai, On 5/5/23 07:32, Huacai Chen wrote: Now LoongArch provides kernel_fpu_begin() and kernel_fpu_end() in commit 2b3bd32ea3a22ea2d ("LoongArch: Provide kernel fpu functions"), so we can enable DC_FP for DCN devices. Have you had the chance to test how well this is working on actual

Re: [PATCH] drm/amdgpu: Fix vram recover doesn't work after whole GPU reset

2023-05-05 Thread Hamza Mahfooz
On 5/4/23 23:46, Lin.Cao wrote: v1: Vmbo->shadow is used to back vram bo up when vram lost. So that we should set shadow as vmbo->shadow to recover vmbo->bo v2: Modify if(vmbo->shadow) shadow = vmbo->shadow as if(!vmbo->shadow) continue; Fix: 'commit e18aaea733da ("drm/amdgpu: move shadow_list

[PATCH] drm/amdgpu: remove unneeded semicolon

2023-05-05 Thread Jiapeng Chong
No functional modification involved. ./drivers/gpu/drm/amd/amdgpu/nbio_v7_9.c:146:2-3: Unneeded semicolon. Reported-by: Abaci Robot Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4871 Signed-off-by: Jiapeng Chong --- drivers/gpu/drm/amd/amdgpu/nbio_v7_9.c | 2 +- 1 file changed, 1

Re: [linux-next:master] BUILD REGRESSION 145e5cddfe8b4bf607510b2dcf630d95f4db420f

2023-05-05 Thread Lorenzo Stoakes
On Fri, May 05, 2023 at 10:47:58AM +0800, kernel test robot wrote: > tree/branch: > https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master > branch HEAD: 145e5cddfe8b4bf607510b2dcf630d95f4db420f Add linux-next > specific files for 20230504 > > Error/Warning reports: > >

[PATCH V2] drm/amdgpu/display: Enable DC_FP for LoongArch

2023-05-05 Thread Huacai Chen
Now LoongArch provides kernel_fpu_begin() and kernel_fpu_end() in commit 2b3bd32ea3a22ea2d ("LoongArch: Provide kernel fpu functions"), so we can enable DC_FP for DCN devices. Signed-off-by: WANG Xuerui Signed-off-by: Huacai Chen --- V2: Update commit message to add the commit which provides

Re: [PATCH] drm/amdgpu: install stub fence into potential unused fence pointers

2023-05-05 Thread Christian König
Am 05.05.23 um 14:44 schrieb Lang Yu: When using cpu to update page tables, vm update fences are unused. Install stub fence into these fence pointers instead of NULL to avoid NULL dereference when calling dma_fence_wait() on them. Suggested-by: Christian König Signed-off-by: Lang Yu

[PATCH] drm/amdgpu: install stub fence into potential unused fence pointers

2023-05-05 Thread Lang Yu
When using cpu to update page tables, vm update fences are unused. Install stub fence into these fence pointers instead of NULL to avoid NULL dereference when calling dma_fence_wait() on them. Suggested-by: Christian König Signed-off-by: Lang Yu --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 6

Re: [PATCH] drm/amdgpu: avoid null dereference of fence when using cpu to update page tables

2023-05-05 Thread Lang Yu
On 05/05/ , Christian König wrote: > Am 05.05.23 um 11:10 schrieb Lang Yu: > > Using cpu to update page tables is sychronous, no need to wait fence > > and it is NULL in such a case. > > Good catch, be we usually install the stub into fence pointers when they are > unused. See

Re: [PATCH] drm/amdgpu: avoid null dereference of fence when using cpu to update page tables

2023-05-05 Thread Christian König
Am 05.05.23 um 11:10 schrieb Lang Yu: Using cpu to update page tables is sychronous, no need to wait fence and it is NULL in such a case. Good catch, be we usually install the stub into fence pointers when they are unused. See dma_fence_get_stub(). Christian. Signed-off-by: Lang Yu ---

[PATCH] drm/amdgpu: avoid null dereference of fence when using cpu to update page tables

2023-05-05 Thread Lang Yu
Using cpu to update page tables is sychronous, no need to wait fence and it is NULL in such a case. Signed-off-by: Lang Yu --- drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c

RE: [PATCH] drm/amd/pm: parse pp_handle under appropriate conditions

2023-05-05 Thread Chen, Guchun
> -Original Message- > From: Lazar, Lijo > Sent: Friday, May 5, 2023 5:00 PM > To: Chen, Guchun ; amd- > g...@lists.freedesktop.org; Deucher, Alexander > ; Zhang, Hawking > ; Quan, Evan ; Koenig, > Christian ; Pan, Xinhui > Subject: Re: [PATCH] drm/amd/pm: parse pp_handle under

Re: [PATCH] drm/amd/pm: parse pp_handle under appropriate conditions

2023-05-05 Thread Lazar, Lijo
On 5/5/2023 1:54 PM, Guchun Chen wrote: amdgpu_dpm_is_overdrive_supported is a common API across all asics, so we should cast pp_handle into correct structure under different power frameworks. Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2541 Fixes: ebfc253335af("drm/amd/pm: do not

Re: [PATCH] drm/amdgpu: set default num_kcq to 2 under sriov

2023-05-05 Thread Christian König
Am 05.05.23 um 08:39 schrieb YuBiao Wang: The number of kernel queues has impact on the latency under sriov usecase. So to reduce the latency we set the default num_kcq = 2 under sriov if not set manually. Signed-off-by: YuBiao Wang Reviewed-by: Christian König ---

[PATCH] drm/amd/pm: parse pp_handle under appropriate conditions

2023-05-05 Thread Guchun Chen
amdgpu_dpm_is_overdrive_supported is a common API across all asics, so we should cast pp_handle into correct structure under different power frameworks. Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2541 Fixes: ebfc253335af("drm/amd/pm: do not expose the smu_context structure used

Re: [PATCH] drm/amdgpu: Fix vram recover doesn't work after whole GPU reset

2023-05-05 Thread Christian König
Am 05.05.23 um 05:46 schrieb Lin.Cao: v1: Vmbo->shadow is used to back vram bo up when vram lost. So that we should set shadow as vmbo->shadow to recover vmbo->bo v2: Modify if(vmbo->shadow) shadow = vmbo->shadow as if(!vmbo->shadow) continue; Fix: 'commit e18aaea733da ("drm/amdgpu: move

Re: [PATCH 2/2] drm/amdgpu: adjust vmhub flush tlb iteration to fit the new GFXHUB/MMHUB layout

2023-05-05 Thread Christian König
Am 04.05.23 um 17:50 schrieb Yifan Zhang: tlb flush has to be changed for the new mmhub layout Signed-off-by: Yifan Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c | 16 drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c | 10 +++--- 2 files changed, 19 insertions(+), 7

[PATCH] drm/amdgpu/display: Enable DC_FP for LoongArch

2023-05-05 Thread Huacai Chen
Now LoongArch provides kernel_fpu_begin() and kernel_fpu_end() so we can enable DC_FP for DCN devices. Signed-off-by: WANG Xuerui Signed-off-by: Huacai Chen --- drivers/gpu/drm/amd/display/Kconfig| 2 +- drivers/gpu/drm/amd/display/amdgpu_dm/dc_fpu.c | 6 --

[PATCH] drm/amdgpu: set default num_kcq to 2 under sriov

2023-05-05 Thread YuBiao Wang
The number of kernel queues has impact on the latency under sriov usecase. So to reduce the latency we set the default num_kcq = 2 under sriov if not set manually. Signed-off-by: YuBiao Wang --- drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 3 +++ 1 file changed, 3 insertions(+) diff --git