[linux-next:master] BUILD REGRESSION bc63de6e6ba0b16652c5fb4b9c9916b9e7ca1f23

2023-12-08 Thread kernel test robot
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master branch HEAD: bc63de6e6ba0b16652c5fb4b9c9916b9e7ca1f23 Add linux-next specific files for 20231208 Error/Warning reports: https://lore.kernel.org/oe-kbuild-all/202312081716.luuhsns4-...@intel.com https

[PATCH 1/2] drm/amdgpu: increase hmm range get pages timeout

2023-12-08 Thread James Zhu
When application tries to allocate all system memory and cause memory to swap out. Needs more time for hmm_range_fault to validate the remaining page for allocation. To be safe, increase timeout value to 1 second for 64MB range. Signed-off-by: James Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_hmm.

[PATCH 2/2] drm/amdgpu: make an improvement on amdgpu_hmm_range_get_pages

2023-12-08 Thread James Zhu
Needn't do schedule for each hmm_range_fault, and use cond_resched to replace schedule. Signed-off-by: James Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_hmm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_hmm.c b/drivers/gpu/drm/amd/amdgpu/a

[PATCH V2] drm/amdgpu/sdma5.2: add begin/end_use ring callbacks

2023-12-08 Thread Alex Deucher
Add begin/end_use ring callbacks to disallow GFXOFF when SDMA work is submitted and allow it again afterward. This should avoid corner cases where GFXOFF is erroneously entered when SDMA is still active. For now just allow/disallow GFXOFF in the begin and end helpers until we root cause the issue

Re: [PATCH 1/3] drm/amdgpu/sdma: add begin_use/end_use helpers

2023-12-08 Thread Alex Deucher
On Fri, Dec 8, 2023 at 5:19 PM Alex Deucher wrote: > > Add helper functions to disallow GFXOFF while SDMA has work. > This should avoid corner cases where GFXOFF is erroneously > entered when SDMA is still active. For now just allow/disallow > GFXOFF in the begin and end helpers until we root cau

RE: [PATCH 2/3] drm/amdgpu/sdma5.0: add begin/end_use ring callbacks

2023-12-08 Thread Deucher, Alexander
[Public] > -Original Message- > From: Deucher, Alexander > Sent: Friday, December 8, 2023 5:19 PM > To: amd-gfx@lists.freedesktop.org > Cc: Deucher, Alexander > Subject: [PATCH 2/3] drm/amdgpu/sdma5.0: add begin/end_use ring > callbacks > > Add begin/end_use ring callbacks to disallow GF

Re: [PATCH 1/3] drm/amdgpu/sdma: add begin_use/end_use helpers

2023-12-08 Thread Mario Limonciello
On 12/8/2023 16:19, Alex Deucher wrote: Add helper functions to disallow GFXOFF while SDMA has work. This should avoid corner cases where GFXOFF is erroneously entered when SDMA is still active. For now just allow/disallow GFXOFF in the begin and end helpers until we root cause the issue. This

[PATCH 3/3] drm/amdgpu/sdma5.2: add begin/end_use ring callbacks

2023-12-08 Thread Alex Deucher
Add begin/end_use ring callbacks to disallow GFXOFF when SDMA work is submitted and allow it again afterward. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c b/drivers/gpu/drm/amd

[PATCH 2/3] drm/amdgpu/sdma5.0: add begin/end_use ring callbacks

2023-12-08 Thread Alex Deucher
Add begin/end_use ring callbacks to disallow GFXOFF when SDMA work is submitted and allow it again afterward. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c b/drivers/gpu/drm/amd

[PATCH 1/3] drm/amdgpu/sdma: add begin_use/end_use helpers

2023-12-08 Thread Alex Deucher
Add helper functions to disallow GFXOFF while SDMA has work. This should avoid corner cases where GFXOFF is erroneously entered when SDMA is still active. For now just allow/disallow GFXOFF in the begin and end helpers until we root cause the issue. This should not impact power as SDMA usage is p

RE: [PATCH] drm/amdgpu: xgmi_fill_topology_info

2023-12-08 Thread Kim, Jonathan
[Public] > -Original Message- > From: Chander, Vignesh > Sent: Thursday, December 7, 2023 7:42 PM > To: amd-gfx@lists.freedesktop.org > Cc: Lazar, Lijo ; Luo, Zhigang > ; Kim, Jonathan ; > Chander, Vignesh > Subject: [PATCH] drm/amdgpu: xgmi_fill_topology_info > > 1. Use the mirrored top

Re: [PATCH 1/2] drm/amdgpu: fix tear down order in amdgpu_vm_pt_free

2023-12-08 Thread Alex Deucher
On Fri, Dec 8, 2023 at 7:55 AM Christian König wrote: > > When freeing PD/PT with shadows it can happen that the shadow > destruction races with detaching the PD/PT from the VM causing a NULL > pointer dereference in the invalidation code. > > Fix this by detaching the the PD/PT from the VM first

[pull] amdgpu, amdkfd, radeon drm-next-6.8

2023-12-08 Thread Alex Deucher
Hi Dave, Sima, More updates for 6.8. The following changes since commit 5edfd7d94b0310b74136b666551f1d23711ed445: Merge tag 'amd-drm-next-6.8-2023-12-01' of https://gitlab.freedesktop.org/agd5f/linux into drm-next (2023-12-05 12:11:41 +1000) are available in the Git repository at: https:

Re: [PATCH 2/2] drm/amdgpu: Enable clear page functionality

2023-12-08 Thread Alex Deucher
On Fri, Dec 8, 2023 at 5:07 AM Christian König wrote: > > Am 07.12.23 um 16:11 schrieb Arunpravin Paneer Selvam: > > Add clear page support in vram memory region. > > The first patch looks good, but this here needs quite some work. > > > > > Signed-off-by: Arunpravin Paneer Selvam > > --- > > d

Re: [PATCH 1/2] drm/amdgpu/debugfs: fix error code when smc register accessors are NULL

2023-12-08 Thread Alex Deucher
On Fri, Dec 8, 2023 at 8:24 AM Christian König wrote: > > The second patch never made it into my inbox, but the first one is > Reviewed-by: Christian König . Thanks. Patch 2: https://patchwork.freedesktop.org/patch/569132/ Alex > > Christian. > > Am 07.12.23 um 18:39 schrieb Alex Deucher: > >

Re: [PATCH linux-next] drm/amd/display: replace kzalloc and memcpy with kmemdup

2023-12-08 Thread Christophe JAILLET
Le 08/12/2023 à 03:44, yang.gua...@zte.com.cn a écrit : From: Yang Guang Convert kzalloc/memcpy operations to memdup makes for cleaner code and avoids memcpy() failures Hi, usually, function's names are written with () in commit description. (i.e. kzalloc()/memcpy()). memdup should be kme

Re: [PATCH] drm/amdgpu: Enable tunneling on high-priority compute queues

2023-12-08 Thread Alex Deucher
On Fri, Dec 8, 2023 at 12:27 PM Joshua Ashton wrote: > > FWIW, we are shipping this right now in SteamOS Preview channel > (probably going to Stable soon) and it seems to be working as expected > and fixing issues there in instances we need to composite, compositor > work we are forced to do would

RE: [PATCH] drm/amdgpu: xgmi_fill_topology_info

2023-12-08 Thread Luo, Zhigang
[AMD Official Use Only - General] Reviewed-by: Zhigang Luo -Original Message- From: Chander, Vignesh Sent: Thursday, December 7, 2023 7:42 PM To: amd-gfx@lists.freedesktop.org Cc: Lazar, Lijo ; Luo, Zhigang ; Kim, Jonathan ; Chander, Vignesh Subject: [PATCH] drm/amdgpu: xgmi_fill_topo

Re: [PATCH] drm/amdgpu: Enable tunneling on high-priority compute queues

2023-12-08 Thread Joshua Ashton
FWIW, we are shipping this right now in SteamOS Preview channel (probably going to Stable soon) and it seems to be working as expected and fixing issues there in instances we need to composite, compositor work we are forced to do would take longer than the compositor redzone to vblank. Previo

Re: [PATCH] drm/amdgpu: Enable tunneling on high-priority compute queues

2023-12-08 Thread Marek Olšák
On Fri, Dec 8, 2023 at 9:57 AM Christian König wrote: > Am 08.12.23 um 12:43 schrieb Friedrich Vock: > > On 08.12.23 10:51, Christian König wrote: > >> Well longer story short Alex and I have been digging up the > >> documentation for this and as far as we can tell this isn't correct. > > Huh. I

Re: [PATCH] drm/amdgpu: Enable tunneling on high-priority compute queues

2023-12-08 Thread Olsak, Marek
[AMD Official Use Only - General] Christian, firmware has nothing to do with it and doesn't control it. That was a wrong group of people to ping. It's only implemented in the SPI and tested by the SPI team and PAL team. Marek From: Koenig, Christian Sent: Decem

Re: [PATCH] drm/amdgpu: Enable tunneling on high-priority compute queues

2023-12-08 Thread Christian König
Am 08.12.23 um 12:43 schrieb Friedrich Vock: On 08.12.23 10:51, Christian König wrote: Well longer story short Alex and I have been digging up the documentation for this and as far as we can tell this isn't correct. Huh. I initially talked to Marek about this, adding him in Cc. Yeah, from the

Re: [PATCH] drm/amdgpu: Enable tunneling on high-priority compute queues

2023-12-08 Thread Marek Olšák
It's correct according to our documentation. Reviewed-by: Marek Olšák Marek On Fri, Dec 8, 2023 at 5:47 AM Christian König wrote: > Well longer story short Alex and I have been digging up the > documentation for this and as far as we can tell this isn't correct. > > You need to do quite a bit

[PATCH] drm/amd/display: Fix memory leak in dm_set_writeback()

2023-12-08 Thread Harshit Mogalapalli
'wb_info' needs to be freed on error paths or it would leak the memory. Smatch pointed this out. Fixes: c81e13b929df ("drm/amd/display: Hande writeback request from userspace") Signed-off-by: Harshit Mogalapalli --- This is based on static analysis and only compile tested --- drivers/gpu/drm/am

Re: [PATCH 1/2] drm/amdgpu/debugfs: fix error code when smc register accessors are NULL

2023-12-08 Thread Christian König
The second patch never made it into my inbox, but the first one is Reviewed-by: Christian König . Christian. Am 07.12.23 um 18:39 schrieb Alex Deucher: Ping on this series? Alex On Mon, Nov 27, 2023 at 5:52 PM Alex Deucher wrote: Should be -EOPNOTSUPP. Fixes: 5104fdf50d32 ("drm/amdgpu: Fi

[PATCH 2/2] drm/amdgpu: warn when there are still mappings when a BO is destroyed v2

2023-12-08 Thread Christian König
This can only happen when there is a reference counting bug. v2: fix typo Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c

[PATCH 1/2] drm/amdgpu: fix tear down order in amdgpu_vm_pt_free

2023-12-08 Thread Christian König
When freeing PD/PT with shadows it can happen that the shadow destruction races with detaching the PD/PT from the VM causing a NULL pointer dereference in the invalidation code. Fix this by detaching the the PD/PT from the VM first and then freeinguthe shadow instead. Signed-off-by: Christian Kön

Re: [PATCH] drm/amdgpu: Enable tunneling on high-priority compute queues

2023-12-08 Thread Friedrich Vock
On 08.12.23 10:51, Christian König wrote: Well longer story short Alex and I have been digging up the documentation for this and as far as we can tell this isn't correct. Huh. I initially talked to Marek about this, adding him in Cc. You need to do quite a bit more before you can turn on this

Re: [PATCH] drm/amdkfd: Fix sparse __rcu annotation warnings

2023-12-08 Thread Christian König
Am 07.12.23 um 20:14 schrieb Felix Kuehling: On 2023-12-05 17:20, Felix Kuehling wrote: Properly mark kfd_process->ef as __rcu and consistently access it with rcu_dereference_protected. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202312052245.yfpbsgnh-...@int

Re: [PATCH 2/2] drm/amdgpu: Enable clear page functionality

2023-12-08 Thread Christian König
Am 07.12.23 um 16:11 schrieb Arunpravin Paneer Selvam: Add clear page support in vram memory region. The first patch looks good, but this here needs quite some work. Signed-off-by: Arunpravin Paneer Selvam --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c| 13 +++-- .../gpu/drm/amd/amdg

Re: [PATCH] drm/amdgpu: Enable tunneling on high-priority compute queues

2023-12-08 Thread Christian König
Well longer story short Alex and I have been digging up the documentation for this and as far as we can tell this isn't correct. You need to do quite a bit more before you can turn on this feature. What userspace side do you refer to? Regards, Christian. Am 08.12.23 um 09:19 schrieb Friedric

[RFC PATCH 01/12] arch: Add ARCH_HAS_KERNEL_FPU_SUPPORT

2023-12-08 Thread Samuel Holland
Several architectures provide an API to enable the FPU and run floating-point SIMD code in kernel space. However, the function names, header locations, and semantics are inconsistent across architectures, and FPU support may be gated behind other Kconfig options. Provide a standard way for archite

Re: [PATCH 3/3] drm/amd/display: Support DRM_AMD_DC_FP on RISC-V

2023-12-08 Thread Samuel Holland
Hi Nathan, On 2023-11-29 6:42 PM, Nathan Chancellor wrote: > On Thu, Nov 23, 2023 at 02:23:01PM +, Conor Dooley wrote: >> On Tue, Nov 21, 2023 at 07:05:15PM -0800, Samuel Holland wrote: >>> RISC-V uses kernel_fpu_begin()/kernel_fpu_end() like several other >>> architectures. Enabling hardware

[RFC PATCH 12/12] selftests/fpu: Allow building on other architectures

2023-12-08 Thread Samuel Holland
Now that ARCH_HAS_KERNEL_FPU_SUPPORT provides a common way to compile and run floating-point code, this test is no longer x86-specific. Signed-off-by: Samuel Holland --- lib/Kconfig.debug | 2 +- lib/Makefile| 25 ++--- lib/test_fpu_glue.c | 5 - 3 files chan

[RFC PATCH 06/12] LoongArch: Implement ARCH_HAS_KERNEL_FPU_SUPPORT

2023-12-08 Thread Samuel Holland
LoongArch already provides kernel_fpu_begin() and kernel_fpu_end() in asm/fpu.h, so it only needs to add kernel_fpu_available() and export the CFLAGS adjustments. Signed-off-by: Samuel Holland --- arch/loongarch/Kconfig | 1 + arch/loongarch/Makefile | 5 - arch/loongarch

[RFC PATCH 07/12] powerpc: Implement ARCH_HAS_KERNEL_FPU_SUPPORT

2023-12-08 Thread Samuel Holland
PowerPC provides an equivalent to the common kernel-mode FPU API, but in a different header and using different function names. The PowerPC API also requires a non-preemptible context. Add a wrapper header, and export the CFLAGS adjustments. Signed-off-by: Samuel Holland --- arch/powerpc/Kconfi

Re: [PATCH] drm/amdgpu: drop the long-double-128 powerpc check/hack

2023-12-08 Thread Michael Ellerman
Christophe Leroy writes: > Le 31/03/2023 à 12:53, Michael Ellerman a écrit : >> "Daniel Kolesa" writes: >>> Commit c653c591789b ("drm/amdgpu: Re-enable DCN for 64-bit powerpc") >>> introduced this check as a workaround for the driver not building >>> with toolchains that default to 64-bit long do

[RFC PATCH 04/12] arm64: Implement ARCH_HAS_KERNEL_FPU_SUPPORT

2023-12-08 Thread Samuel Holland
arm64 provides an equivalent to the common kernel-mode FPU API, but in a different header and using different function names. Add a wrapper header, and export CFLAGS adjustments as found in lib/raid6/Makefile. Signed-off-by: Samuel Holland --- arch/arm64/Kconfig | 1 + arch/arm64/Mak

[RFC PATCH 11/12] selftests/fpu: Move FP code to a separate translation unit

2023-12-08 Thread Samuel Holland
This ensures no compiler-generated floating-point code can appear outside kernel_fpu_{begin,end}() sections, and some architectures enforce this separation. Signed-off-by: Samuel Holland --- lib/Makefile| 3 ++- lib/{test_fpu.c => test_fpu_glue.c} | 32 +

[PATCH linux-next] drm/amd/display: replace kzalloc and memcpy with kmemdup

2023-12-08 Thread yang.guang5
From: Yang Guang Convert kzalloc/memcpy operations to memdup makes for cleaner code and avoids memcpy() failures Signed-off-by: Chen Haonan --- drivers/gpu/drm/amd/display/dc/core/dc.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/amd/display/d

[RFC PATCH 05/12] lib/raid6: Use CC_FLAGS_FPU for NEON CFLAGS

2023-12-08 Thread Samuel Holland
Now that CC_FLAGS_FPU is exported and can be used anywhere in the source tree, use it instead of duplicating the flags here. Signed-off-by: Samuel Holland --- lib/raid6/Makefile | 31 --- 1 file changed, 8 insertions(+), 23 deletions(-) diff --git a/lib/raid6/Makefi

[RFC PATCH 00/12] Unified cross-architecture kernel-mode FPU API

2023-12-08 Thread Samuel Holland
This series supersedes my earier RISC-V specific series[1]. This series unifies the kernel-mode FPU API across several architectures by wrapping the existing functions (where needed) in consistently-named functions placed in a consistent header location, with mostly the same semantics: they can be

[RFC PATCH 02/12] ARM: Implement ARCH_HAS_KERNEL_FPU_SUPPORT

2023-12-08 Thread Samuel Holland
ARM provides an equivalent to the common kernel-mode FPU API, but in a different header and using different function names. Add a wrapper header, and export CFLAGS adjustments as found in lib/raid6/Makefile. Signed-off-by: Samuel Holland --- arch/arm/Kconfig | 1 + arch/arm/Makefile

Re: [PATCH 1/3] riscv: Add support for kernel-mode FPU

2023-12-08 Thread Samuel Holland
Hi Christoph, On 2023-11-22 2:33 AM, Christoph Hellwig wrote: > On Tue, Nov 21, 2023 at 07:05:13PM -0800, Samuel Holland wrote: >> +static inline void kernel_fpu_begin(void) >> +{ >> +preempt_disable(); >> +fstate_save(current, task_pt_regs(current)); >> +csr_set(CSR_SSTATUS, SR_FS); >

[RFC PATCH 10/12] drm/amd/display: Use ARCH_HAS_KERNEL_FPU_SUPPORT

2023-12-08 Thread Samuel Holland
Now that all previously-supported architectures select ARCH_HAS_KERNEL_FPU_SUPPORT, this code can depend on that symbol instead of the existing list of architectures. It can also take advantage of the common kernel-mode FPU API and method of adjusting CFLAGS. Signed-off-by: Samuel Holland --- d

[RFC PATCH 08/12] x86: Implement ARCH_HAS_KERNEL_FPU_SUPPORT

2023-12-08 Thread Samuel Holland
x86 already provides kernel_fpu_begin() and kernel_fpu_end(), but in a different header. Add a wrapper header, and export the CFLAGS adjustments as found in lib/Makefile. Signed-off-by: Samuel Holland --- arch/x86/Kconfig | 1 + arch/x86/Makefile | 20 a

[RFC PATCH 03/12] ARM: crypto: Use CC_FLAGS_FPU for NEON CFLAGS

2023-12-08 Thread Samuel Holland
Now that CC_FLAGS_FPU is exported and can be used anywhere in the source tree, use it instead of duplicating the flags here. Signed-off-by: Samuel Holland --- arch/arm/lib/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefil

Re: [PATCH 3/3] drm/amd/display: Support DRM_AMD_DC_FP on RISC-V

2023-12-08 Thread Samuel Holland
Hi Christoph, On 2023-11-22 2:40 AM, Christoph Hellwig wrote: >> -select DRM_AMD_DC_FP if (X86 || LOONGARCH || (PPC64 && ALTIVEC) || >> (ARM64 && KERNEL_MODE_NEON && !CC_IS_CLANG)) >> +select DRM_AMD_DC_FP if ARM64 && KERNEL_MODE_NEON && !CC_IS_CLANG >> +select DRM_AMD_DC_FP if PPC64

[RFC PATCH 09/12] riscv: Add support for kernel-mode FPU

2023-12-08 Thread Samuel Holland
This is motivated by the amdgpu DRM driver, which needs floating-point code to support recent hardware. That code is not performance-critical, so only provide a minimal non-preemptible implementation for now. Use a similar trick as ARM to force placing floating-point code in a separate translation

Re: [PATCH] drm/amdgpu: Enable tunneling on high-priority compute queues

2023-12-08 Thread Friedrich Vock
Friendly ping on this one. Userspace side got merged, so would be great to land this patch too :) On 02.12.23 01:17, Friedrich Vock wrote: This improves latency if the GPU is already busy with other work. This is useful for VR compositors that submit highly latency-sensitive compositing work on