Re: [PATCH] drm/debugfs: fix memory leak in drm_debugfs_remove_files()

2023-12-28 Thread Stanislaw Gruszka
axiong Tian Reviewed-by: Stanislaw Gruszka > --- > drivers/gpu/drm/drm_debugfs.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/gpu/drm/drm_debugfs.c b/drivers/gpu/drm/drm_debugfs.c > index f4715a67e340..4d299152c302 100644 > --- a/drivers/gpu/drm/drm_debug

Re: [PATCH 3/8] accel/ivpu: Stop job_done_thread on suspend

2023-11-13 Thread Stanislaw Gruszka
t; On Sat, 28 Oct 2023 at 18:00, Stanislaw Gruszka > wrote: > > > > Stop job_done thread when going to suspend. Use kthread_park() instead > > of kthread_stop() to avoid memory allocation and potential failure > > on resume. > > > > Use separate functio

Re: [PATCH 0/8] accel/ivpu: Update for -next 2023-10-28

2023-10-31 Thread Stanislaw Gruszka
On Sat, Oct 28, 2023 at 05:59:28PM +0200, Stanislaw Gruszka wrote: > Various driver updates: > - MMU page tables handling optimizations > - Rebrand to NPU > - FW profiling frequency knob > - job done thread suspend handling > > This is based on top of pre

[PATCH 4/4] accel/ivpu: Use GEM shmem helper for all buffers

2023-10-31 Thread Stanislaw Gruszka
From: Jacek Lawrynowicz Use struct drm_gem_shmem_object as a base for struct ivpu_bo. This cuts by 50% the buffer management code. Signed-off-by: Jacek Lawrynowicz Reviewed-by: Jeffrey Hugo Signed-off-by: Stanislaw Gruszka --- drivers/accel/ivpu/Kconfig| 2 +- drivers/accel/ivpu

[PATCH 3/4] accel/ivpu: Remove support for uncached buffers

2023-10-31 Thread Stanislaw Gruszka
of DRM_IVPU_BO_UNCACHED buffers was removed from user-space driver and will not be part of first UMD release. Signed-off-by: Jacek Lawrynowicz Reviewed-by: Jeffrey Hugo Signed-off-by: Stanislaw Gruszka --- drivers/accel/ivpu/ivpu_fw.c | 2 +- drivers/accel/ivpu/ivpu_gem.c | 3 --- include/uapi/drm/ivpu_accel.h

[PATCH 2/4] accel/ivpu: Fix locking in ivpu_bo_remove_all_bos_from_context()

2023-10-31 Thread Stanislaw Gruszka
. Also rename ivpu_bo_free_vpu_addr() to ivpu_bo_unbind() because this function does more then just free vpu_addr. Signed-off-by: Jacek Lawrynowicz Reviewed-by: Jeffrey Hugo Signed-off-by: Stanislaw Gruszka --- drivers/accel/ivpu/ivpu_drv.c | 7 +- drivers/accel/ivpu/ivpu_drv.h

[PATCH 1/4] accel/ivpu: Allocate vpu_addr in gem->open() callback

2023-10-31 Thread Stanislaw Gruszka
field. Signed-off-by: Jacek Lawrynowicz Reviewed-by: Jeffrey Hugo Signed-off-by: Stanislaw Gruszka --- drivers/accel/ivpu/ivpu_gem.c | 66 --- drivers/accel/ivpu/ivpu_gem.h | 1 - drivers/accel/ivpu/ivpu_mmu_context.c | 2 + 3 files changed, 32 insertions(

[PATCH 0/4] accel/ivpu: Use GEM shmem

2023-10-31 Thread Stanislaw Gruszka
Use GEM shmem for buffer management code; Previously sent as RFC: https://lore.kernel.org/dri-devel/20230901164842.178654-1-stanislaw.grus...@linux.intel.com/ Compared to RFC only changelog's were improved. Jacek Lawrynowicz (4): accel/ivpu: Allocate vpu_addr in gem->open() callback

Re: [PATCH 06/11] accel/ivpu: Change test_mode module param to bitmask

2023-10-30 Thread Stanislaw Gruszka
On Mon, Oct 30, 2023 at 08:05:28AM -0600, Jeffrey Hugo wrote: > On 10/28/2023 2:18 AM, Stanislaw Gruszka wrote: > > On Fri, Oct 27, 2023 at 08:47:11AM -0600, Jeffrey Hugo wrote: > > > On 10/25/2023 3:43 AM, Stanislaw Gruszka wrote: > > > > From: Karol Wachowski &

Re: [PATCH v2 00/11] accel/ivpu: Update for -next 2023-10-25

2023-10-30 Thread Stanislaw Gruszka
On Sat, Oct 28, 2023 at 03:34:04PM +0200, Stanislaw Gruszka wrote: > Various driver updates: > > - FW api update > - suspend/resume optimizations > - dynamic valtage and frequency mode knob > - new test modes > > v2: > - fix spelling mistakes pointed Jeffrey

Re: [PATCH] accel/qaic: Support for 0 resize slice execution in BO

2023-10-30 Thread Stanislaw Gruszka
no resize. > After this patch all the slice in BO should behave exactly like slice 2 in > above example. > > Refactor copy_partial_exec_reqs() to make it more readable and less > complex. > > Signed-off-by: Pranjal Ramajor Asha Kanojiya > Reviewed-by: Jeffrey Hugo > Signed-off-by: Jeffrey Hugo Reviewed-by: Stanislaw Gruszka

Re: [PATCH] accel/qaic: Quiet array bounds check on DMA abort message

2023-10-30 Thread Stanislaw Gruszka
ceptable. > > Reported-by: kernel test robot > Closes: > https://lore.kernel.org/oe-kbuild-all/202310182253.bcb9jcyj-...@intel.com/ > Signed-off-by: Carl Vanderlip > Reviewed-by: Pranjal Ramajor Asha Kanojiya > Reviewed-by: Jeffrey Hugo > Signed-off-by: Jeffrey Hugo Reviewed-by: Stanislaw Gruszka

Re: [PATCH] accel/ivpu: avoid build failure with CONFIG_PM=n

2023-10-30 Thread Stanislaw Gruszka
On Fri, Oct 27, 2023 at 05:26:23PM +0200, Arnd Bergmann wrote: > From: Arnd Bergmann > > The usage count of struct dev_pm_info is an implementation detail that > is only available if CONFIG_PM is enabled, so printing it in a debug message > causes a build failure in configurations without PM: >

[PATCH 8/8] accel/ivpu: Rename VPU to NPU in product strings

2023-10-28 Thread Stanislaw Gruszka
From: Jacek Lawrynowicz VPU was rebranded as NPU (Neural Processing Unit) so user facing strings have to be updated but the code remains as is and the module is still called intel_vpu.ko. Signed-off-by: Jacek Lawrynowicz Reviewed-by: Stanislaw Gruszka Signed-off-by: Stanislaw Gruszka

[PATCH 5/8] accel/ivpu: Print CMDQ errors after consumer timeout

2023-10-28 Thread Stanislaw Gruszka
From: Karol Wachowski Add checking of error reason bits in IVPU_MMU_CMDQ_CONS register when waiting for consumer timeout occurred. Signed-off-by: Karol Wachowski Reviewed-by: Stanislaw Gruszka Signed-off-by: Stanislaw Gruszka --- drivers/accel/ivpu/ivpu_mmu.c | 34

[PATCH 7/8] accel/ivpu: Simplify MMU SYNC command

2023-10-28 Thread Stanislaw Gruszka
From: Jacek Lawrynowicz CMD_SYNC does not need any args as we poll for completion anyway. Signed-off-by: Jacek Lawrynowicz Reviewed-by: Stanislaw Gruszka Signed-off-by: Stanislaw Gruszka --- drivers/accel/ivpu/ivpu_mmu.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git

[PATCH 6/8] accel/ivpu: Make DMA allocations for MMU600 write combined

2023-10-28 Thread Stanislaw Gruszka
a single write memory barrier to flush write-combined buffer to memory which simplifies the driver and significantly reduce time of map/unmap operations. Mapping time of 255 MB is reduced from 2.5 ms to 500 us. Signed-off-by: Karol Wachowski Reviewed-by: Stanislaw Gruszka Signed-off-by: Stanislaw

[PATCH 4/8] accel/ivpu: Abort pending rx ipc on reset

2023-10-28 Thread Stanislaw Gruszka
there is pending IPC processing or pending job. Reviewed-by: Karol Wachowski Signed-off-by: Stanislaw Gruszka --- drivers/accel/ivpu/ivpu_ipc.c | 20 +--- drivers/accel/ivpu/ivpu_ipc.h | 3 ++- drivers/accel/ivpu/ivpu_job.c | 1 + 3 files changed, 20 insertions(+), 4 deletions(-) diff

[PATCH 2/8] accel/ivpu: Assure device is off if power up sequence fail

2023-10-28 Thread Stanislaw Gruszka
We should not leave device half enabled if there is failure somewhere it power up sequence. Fix device init and resume paths. Reviewed-by: Karol Wachowski Signed-off-by: Stanislaw Gruszka --- drivers/accel/ivpu/ivpu_drv.c | 2 +- drivers/accel/ivpu/ivpu_pm.c | 30

[PATCH 1/8] accel/ivpu/40xx: Allow to change profiling frequency

2023-10-28 Thread Stanislaw Gruszka
it. For vpu37xx the implementation is empty as profiling frequency can only be changed on VPU4 or newer. Signed-off-by: Krystian Pradzynski Reviewed-by: Stanislaw Gruszka Signed-off-by: Stanislaw Gruszka --- drivers/accel/ivpu/ivpu_debugfs.c | 29 + drivers/accel/ivpu

[PATCH 0/8] accel/ivpu: Update for -next 2023-10-28

2023-10-28 Thread Stanislaw Gruszka
to change profiling frequency Stanislaw Gruszka (3): accel/ivpu: Assure device is off if power up sequence fail accel/ivpu: Stop job_done_thread on suspend accel/ivpu: Abort pending rx ipc on reset drivers/accel/ivpu/Kconfig| 9 +- drivers/accel/ivpu/ivpu_debugfs.c | 29

[PATCH 3/8] accel/ivpu: Stop job_done_thread on suspend

2023-10-28 Thread Stanislaw Gruszka
-by: Karol Wachowski Signed-off-by: Stanislaw Gruszka --- drivers/accel/ivpu/ivpu_drv.c | 2 ++ drivers/accel/ivpu/ivpu_ipc.c | 17 +++-- drivers/accel/ivpu/ivpu_job.c | 20 drivers/accel/ivpu/ivpu_job.h | 2 ++ 4 files changed, 35 insertions(+), 6 deletions

[PATCH v2 11/11] accel/ivpu: Add support for delayed D0i3 entry message

2023-10-28 Thread Stanislaw Gruszka
. If the driver does not wait for the VPU to enter IDLE state it could cause warm boot failures. Signed-off-by: Andrzej Kacprowski Reviewed-by: Stanislaw Gruszka Signed-off-by: Stanislaw Gruszka --- drivers/accel/ivpu/ivpu_drv.h | 10 +-- drivers/accel/ivpu/ivpu_fw.c | 48

[PATCH v2 10/11] accel/ivpu/37xx: Print warning when VPUIP is not idle during power down

2023-10-28 Thread Stanislaw Gruszka
Print warning if VPUIP is not idle during power down. Use warn log level also when we fail to enter reset state as this is not really an error but unexpected behavior. Reviewed-by: Krystian Pradzynski Signed-off-by: Stanislaw Gruszka --- drivers/accel/ivpu/ivpu_hw_37xx.c | 7 +-- 1 file

[PATCH v2 09/11] accel/ivpu: Introduce ivpu_ipc_send_receive_active()

2023-10-28 Thread Stanislaw Gruszka
for D0i3 entry IPC message addition in the separate change. Signed-off-by: Karol Wachowski Reviewed-by: Stanislaw Gruszka Signed-off-by: Stanislaw Gruszka --- drivers/accel/ivpu/ivpu_ipc.c | 33 ++--- drivers/accel/ivpu/ivpu_ipc.h | 8 +--- 2 files changed, 27

[PATCH v2 08/11] accel/ivpu: Pass D0i3 residency time to the VPU firmware

2023-10-28 Thread Stanislaw Gruszka
- this allows the VPU firmware to generate monotonic timestamps for the logs. Signed-off-by: Andrzej Kacprowski Reviewed-by: Stanislaw Gruszka Reviewed-by: Jeffrey Hugo Signed-off-by: Stanislaw Gruszka --- drivers/accel/ivpu/ivpu_fw.c | 17 - drivers/accel/ivpu

[PATCH v2 06/11] accel/ivpu: Change test_mode module param to bitmask

2023-10-28 Thread Stanislaw Gruszka
From: Karol Wachowski Change meaning of test_mode module parameter from integer value to bitmask allowing setting different test features with corresponding bits. Signed-off-by: Karol Wachowski Reviewed-by: Stanislaw Gruszka Reviewed-by: Jeffrey Hugo Signed-off-by: Stanislaw Gruszka

[PATCH v2 07/11] accel/ivpu/40xx: Capture D0i3 entry host and device timestamps

2023-10-28 Thread Stanislaw Gruszka
From: Andrzej Kacprowski The driver needs to capture the D0i3 entry timestamp to calculate D0i3 residency time. The D0i3 residency time and the VPU timestamp are passed to the firmware at D0i3 exit (warm boot). Signed-off-by: Andrzej Kacprowski Reviewed-by: Stanislaw Gruszka Reviewed

[PATCH v2 05/11] accel/ivpu: Add support for VPU_JOB_FLAGS_NULL_SUBMISSION_MASK

2023-10-28 Thread Stanislaw Gruszka
software and VPU firmware. Unlike the null hardware mode, the null submission mode will still work even if UMD uses VPU fences to track job completion. Signed-off-by: Andrzej Kacprowski Reviewed-by: Stanislaw Gruszka Reviewed-by: Jeffrey Hugo Signed-off-by: Stanislaw Gruszka --- drivers/accel

[PATCH v2 04/11] accel/ivpu: Remove reset from power up sequence

2023-10-28 Thread Stanislaw Gruszka
From: Karol Wachowski Setting a non-zero work point resets the IP hence IP_RESET trigger is redundant. Signed-off-by: Karol Wachowski Reviewed-by: Stanislaw Gruszka Reviewed-by: Jeffrey Hugo Signed-off-by: Stanislaw Gruszka --- drivers/accel/ivpu/ivpu_hw_37xx.c | 4 drivers/accel/ivpu

[PATCH v2 02/11] accel/ivpu: Remove unneeded drm_driver declaration

2023-10-28 Thread Stanislaw Gruszka
Cleanup drm_driver declaration leftover. Reviewed-by: Krystian Pradzynski Reviewed-by: Jeffrey Hugo Signed-off-by: Stanislaw Gruszka --- drivers/accel/ivpu/ivpu_drv.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/accel/ivpu/ivpu_drv.c b/drivers/accel/ivpu/ivpu_drv.c index

[PATCH v2 03/11] accel/ivpu: Add dvfs_mode file to debugfs

2023-10-28 Thread Stanislaw Gruszka
From: Tomasz Rusinowicz Add new debugfs file to set dvfs_mode FW boot parameter and restart the FW to allow experimenting with DVFS (dynamic voltage & frequency scaling). Signed-off-by: Tomasz Rusinowicz Reviewed-by: Jeffrey Hugo Signed-off-by: Stanislaw Gruszka --- drivers/accel/

[PATCH v2 01/11] accel/ivpu: Update FW API

2023-10-28 Thread Stanislaw Gruszka
From: Krystian Pradzynski Bump boot API to 4.20 Bump JSM API to 3.15 Signed-off-by: Krystian Pradzynski Reviewed-by: Stanislaw Gruszka Signed-off-by: Stanislaw Gruszka --- drivers/accel/ivpu/ivpu_jsm_msg.c | 17 ++ drivers/accel/ivpu/vpu_boot_api.h | 90 - drivers/accel/ivpu

[PATCH v2 00/11] accel/ivpu: Update for -next 2023-10-25

2023-10-28 Thread Stanislaw Gruszka
: Update FW API Stanislaw Gruszka (2): accel/ivpu: Remove unneeded drm_driver declaration accel/ivpu/37xx: Print warning when VPUIP is not idle during power down Tomasz Rusinowicz (1): accel/ivpu: Add dvfs_mode file to debugfs drivers/accel/ivpu/ivpu_debugfs.c | 28 +++ drivers/accel

Re: [PATCH 10/11] accel/ivpu: Add support for delayed D0i3 entry message

2023-10-28 Thread Stanislaw Gruszka
On Fri, Oct 27, 2023 at 09:07:22AM -0600, Jeffrey Hugo wrote: > > + if (!ivpu_hw_37xx_is_idle(vdev)) { > > + ivpu_warn(vdev, "VPU not idle during power down\n"); > > + if (ivpu_hw_37xx_ip_reset(vdev)) > > + ivpu_err(vdev, "Failed to reset the VPU\n"); > > +

Re: [PATCH 07/11] accel/ivpu: Introduce ivpu_ipc_send_receive_active()

2023-10-28 Thread Stanislaw Gruszka
On Fri, Oct 27, 2023 at 08:49:21AM -0600, Jeffrey Hugo wrote: > On 10/25/2023 3:43 AM, Stanislaw Gruszka wrote: > > From: Karol Wachowski > > > > Split ivpu_ipc_send_receive() implementation to have a version > > that does not call pm_runtime_resume_and_get().

Re: [PATCH 11/11] accel/ivpu: Wait for VPU to enter idle state after D0i3 entry message

2023-10-28 Thread Stanislaw Gruszka
On Fri, Oct 27, 2023 at 09:09:16AM -0600, Jeffrey Hugo wrote: > On 10/25/2023 3:43 AM, Stanislaw Gruszka wrote: > > From: Andrzej Kacprowski > > > > The VPU needs non zero time to enter IDLE state after responding to > > D0i3 entry message. If the driver does no

Re: [PATCH 06/11] accel/ivpu: Change test_mode module param to bitmask

2023-10-28 Thread Stanislaw Gruszka
On Fri, Oct 27, 2023 at 08:47:11AM -0600, Jeffrey Hugo wrote: > On 10/25/2023 3:43 AM, Stanislaw Gruszka wrote: > > From: Karol Wachowski > > > > Change meaning of test_mode module parameter from integer value > > to bitmask allowing setting different test features

Re: [PATCH 01/11] accel/ivpu: Update FW API

2023-10-28 Thread Stanislaw Gruszka
Hi On Fri, Oct 27, 2023 at 08:37:39AM -0600, Jeffrey Hugo wrote: > On 10/25/2023 3:43 AM, Stanislaw Gruszka wrote: > > From: Krystian Pradzynski > > > > Bump boot API to 4.20 > > Bump JSM API to 3.15 > > > > Signed-off-by: Krystian Pradzynski > > R

Re: [PATCH] accel/ivpu: Delete the TODO file

2023-10-26 Thread Stanislaw Gruszka
On Thu, Oct 19, 2023 at 12:43:54AM +0530, Deepak R Varma wrote: > The work items listed in the TODO file of this driver file are either > completed or dropped. The file is no more significant according > to the maintainers. Hence removing it from the sources. > > Suggested-by: St

Re: [PATCH] accel/ivpu/37xx: Fix missing VPUIP interrupts

2023-10-25 Thread Stanislaw Gruszka
On Tue, Oct 24, 2023 at 06:19:52PM +0200, Stanislaw Gruszka wrote: > From: Karol Wachowski > > Move sequence of masking and unmasking global interrupts from buttress > interrupt handler to generic one that handles both VPUIP and BTRS > interrupts. Unmasking global interrupts will

[PATCH 10/11] accel/ivpu: Add support for delayed D0i3 entry message

2023-10-25 Thread Stanislaw Gruszka
message sent from the host driver only when the driver is about to enter D0i3 - this reduces power consumption and latency for certain workloads, for example audio workloads that submit inference every 10 ms. Signed-off-by: Andrzej Kacprowski Reviewed-by: Stanislaw Gruszka Signed-off-by: Stanislaw

[PATCH 11/11] accel/ivpu: Wait for VPU to enter idle state after D0i3 entry message

2023-10-25 Thread Stanislaw Gruszka
From: Andrzej Kacprowski The VPU needs non zero time to enter IDLE state after responding to D0i3 entry message. If the driver does not wait for the VPU to enter IDLE state it could cause warm boot failures. Signed-off-by: Andrzej Kacprowski Reviewed-by: Stanislaw Gruszka Signed-off

[PATCH 03/11] accel/ivpu: Add dvfs_mode file to debugfs

2023-10-25 Thread Stanislaw Gruszka
From: Tomasz Rusinowicz Add new debugfs file to set dvfs_mode FW boot parameter and restart the FW to allow experimenting with DVFS (dynamic voltage & frequency scaling). Signed-off-by: Tomasz Rusinowicz Signed-off-by: Stanislaw Gruszka --- drivers/accel/ivpu/ivpu_debugfs.c

[PATCH 09/11] accel/ivpu/40xx: Capture D0i3 entry host and device timestamps

2023-10-25 Thread Stanislaw Gruszka
From: Andrzej Kacprowski The driver needs to capture the D0i3 entry timestamp to calculate D0i3 residency time. The D0i3 residency time and the VPU timestamp are passed to the firmware at D0i3 exit (warm boot). Signed-off-by: Andrzej Kacprowski Reviewed-by: Stanislaw Gruszka Signed-off

[PATCH 08/11] accel/ivpu: Pass D0i3 residency time to the VPU firmware

2023-10-25 Thread Stanislaw Gruszka
- this allows the VPU firmware to generate monotonic timestamps for the logs. Signed-off-by: Andrzej Kacprowski Reviewed-by: Stanislaw Gruszka Signed-off-by: Stanislaw Gruszka --- drivers/accel/ivpu/ivpu_fw.c | 17 - drivers/accel/ivpu/ivpu_hw.h | 2

[PATCH 07/11] accel/ivpu: Introduce ivpu_ipc_send_receive_active()

2023-10-25 Thread Stanislaw Gruszka
Reviewed-by: Stanislaw Gruszka Signed-off-by: Stanislaw Gruszka --- drivers/accel/ivpu/ivpu_ipc.c | 33 ++--- drivers/accel/ivpu/ivpu_ipc.h | 8 +--- 2 files changed, 27 insertions(+), 14 deletions(-) diff --git a/drivers/accel/ivpu/ivpu_ipc.c b/drivers/accel/ivpu

[PATCH 06/11] accel/ivpu: Change test_mode module param to bitmask

2023-10-25 Thread Stanislaw Gruszka
From: Karol Wachowski Change meaning of test_mode module parameter from integer value to bitmask allowing setting different test features with corresponding bits. Signed-off-by: Karol Wachowski Reviewed-by: Stanislaw Gruszka Signed-off-by: Stanislaw Gruszka --- drivers/accel/ivpu/ivpu_drv.c

[PATCH 02/11] accel/ivpu: Remove unneeded drm_driver dectaration

2023-10-25 Thread Stanislaw Gruszka
Cleanup drm_driver declaration leftover. Reviewed-by: Krystian Pradzynski Signed-off-by: Stanislaw Gruszka --- drivers/accel/ivpu/ivpu_drv.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/accel/ivpu/ivpu_drv.c b/drivers/accel/ivpu/ivpu_drv.c index 790603017653..346dd7fdcacb

[PATCH 01/11] accel/ivpu: Update FW API

2023-10-25 Thread Stanislaw Gruszka
From: Krystian Pradzynski Bump boot API to 4.20 Bump JSM API to 3.15 Signed-off-by: Krystian Pradzynski Reviewed-by: Stanislaw Gruszka Signed-off-by: Stanislaw Gruszka --- drivers/accel/ivpu/ivpu_jsm_msg.c | 17 ++ drivers/accel/ivpu/vpu_boot_api.h | 90 - drivers/accel/ivpu

[PATCH 00/11] accel/ivpu: Update to -next 2023-10-25

2023-10-25 Thread Stanislaw Gruszka
to bitmask accel/ivpu: Introduce ivpu_ipc_send_receive_active() Krystian Pradzynski (1): accel/ivpu: Update FW API Stanislaw Gruszka (1): accel/ivpu: Remove unneeded drm_driver dectaration Tomasz Rusinowicz (1): accel/ivpu: Add dvfs_mode file to debugfs drivers/accel/ivpu/ivpu_debugfs.c

[PATCH 05/11] accel/ivpu: Add support for VPU_JOB_FLAGS_NULL_SUBMISSION_MASK

2023-10-25 Thread Stanislaw Gruszka
software and VPU firmware. Unlike the null hardware mode, the null submission mode will still work even if UMD uses VPU fences to track job completion. Signed-off-by: Andrzej Kacprowski Reviewed-by: Stanislaw Gruszka Signed-off-by: Stanislaw Gruszka --- drivers/accel/ivpu/ivpu_drv.c | 2

[PATCH 04/11] accel/ivpu: Remove reset from power up sequence

2023-10-25 Thread Stanislaw Gruszka
From: Karol Wachowski Setting a non-zero work point resets the IP hence IP_RESET trigger is redundant. Signed-off-by: Karol Wachowski Reviewed-by: Stanislaw Gruszka Signed-off-by: Stanislaw Gruszka --- drivers/accel/ivpu/ivpu_hw_37xx.c | 4 drivers/accel/ivpu/ivpu_hw_40xx.c | 6

[PATCH v2] accel/ivpu: Disable PLL after VPU IP reset during FLR

2023-10-24 Thread Stanislaw Gruszka
From: Jacek Lawrynowicz IP reset has to followed by ivpu_pll_disable() to properly enter reset state. Fixes: 828d63042aec ("accel/ivpu: Don't enter d0i3 during FLR") Cc: sta...@vger.kernel.org Signed-off-by: Jacek Lawrynowicz Reviewed-by: Stanislaw Gruszka Signed-off-by: Stanisl

[PATCH] accel/ivpu/37xx: Fix missing VPUIP interrupts

2023-10-24 Thread Stanislaw Gruszka
to miss any VPUIP interrupt that comes after reading VPU_37XX_HOST_SS_ICB_STATUS_0 and before clearing all active interrupt sources. Signed-off-by: Karol Wachowski Reviewed-by: Stanislaw Gruszka Signed-off-by: Stanislaw Gruszka --- drivers/accel/ivpu/ivpu_hw_37xx.c | 11 +-- 1 file changed

[PATCH] accel/ivpu: Disable PLL after VPU IP reset during FLR

2023-10-23 Thread Stanislaw Gruszka
From: Jacek Lawrynowicz IP reset has to followed by ivpu_pll_disable() to properly enter reset state. Fixes: 828d63042aec ("accel/ivpu: Don't enter d0i3 during FLR") Cc: sta...@vger.kernel.org Signed-off-by: Jacek Lawrynowicz Reviewed-by: Stanislaw Gruszka Signed-off-by: Stanisl

Re: [PATCH 0/6] accel/ivpu: Update to -next 2023-10-20

2023-10-23 Thread Stanislaw Gruszka
On Fri, Oct 20, 2023 at 12:44:55PM +0200, Stanislaw Gruszka wrote: > Random changes across the driver. > > Karol Wachowski (1): > accel/ivpu: Read clock rate only if device is up > > Krystian Pradzynski (3): > accel/ivpu: Use ratelimited warn and err in IPC/JSM >

Re: [PATCH v2 2/2] accel/qaic: Support MHI QAIC_TIMESYNC channel

2023-10-22 Thread Stanislaw Gruszka
hat environment. > > Signed-off-by: Pranjal Ramajor Asha Kanojiya > Reviewed-by: Jeffrey Hugo > Reviewed-by: Carl Vanderlip > Signed-off-by: Jeffrey Hugo Reviewed-by: Stanislaw Gruszka

Re: [PATCH v2 1/2] accel/qaic: Add support for periodic timesync

2023-10-22 Thread Stanislaw Gruszka
gt; > Signed-off-by: Ajit Pal Singh > Signed-off-by: Pranjal Ramajor Asha Kanojiya > Reviewed-by: Jeffrey Hugo > Reviewed-by: Carl Vanderlip > Reviewed-by: Pranjal Ramajor Asha Kanojiya > Signed-off-by: Jeffrey Hugo Reviewed-by: Stanislaw Gruszka > @@

Re: [PATCH v2] accel/qaic: Enable 1 MSI fallback mode

2023-10-22 Thread Stanislaw Gruszka
ev_test/Avg_test)) > > Signed-off-by: Carl Vanderlip > Reviewed-by: Pranjal Ramajor Asha Kanojiya > Reviewed-by: Jeffrey Hugo > Signed-off-by: Jeffrey Hugo Reviewed-by: Stanislaw Gruszka

[PATCH 6/6] accel/ivpu/37xx: Remove support for FPGA and simics

2023-10-20 Thread Stanislaw Gruszka
We do not run 37xx VPU on non-silicon platforms any longer. Remove deprecated code to make it cleaner. Signed-off-by: Stanislaw Gruszka --- drivers/accel/ivpu/ivpu_hw_37xx.c | 57 +-- 1 file changed, 8 insertions(+), 49 deletions(-) diff --git a/drivers/accel/ivpu

[PATCH 5/6] accel/ivpu: Do no initialize parameters on power up

2023-10-20 Thread Stanislaw Gruszka
Initialize HW specific parameters only once. We do not have to do this on every power_up (performed during initialization and on resume). Move corresponding code to ->init_info() Signed-off-by: Stanislaw Gruszka --- drivers/accel/ivpu/ivpu_hw_37xx.c | 8 drivers/accel/i

[PATCH 4/6] accel/ivpu: Print IPC type string instead of number

2023-10-20 Thread Stanislaw Gruszka
From: Krystian Pradzynski Introduce ivpu_jsm_msg_type_to_str() helper to print type of IPC message. This will make reading logs and debugging IPC issues easier. Co-developed-by: Maciej Falkowski Signed-off-by: Maciej Falkowski Signed-off-by: Krystian Pradzynski Reviewed-by: Stanislaw Gruszka

[PATCH 3/6] accel/ivpu: Read clock rate only if device is up

2023-10-20 Thread Stanislaw Gruszka
From: Karol Wachowski Do not unnecessarily wake up device to read clock rate. Return 0 as clk_rate if device is suspended. Signed-off-by: Karol Wachowski Reviewed-by: Stanislaw Gruszka Signed-off-by: Stanislaw Gruszka --- drivers/accel/ivpu/ivpu_drv.c | 18 +- drivers/accel

[PATCH 2/6] accel/ivpu: Fix verbose version of REG_POLL macros

2023-10-20 Thread Stanislaw Gruszka
-by: Krystian Pradzynski Reviewed-by: Stanislaw Gruszka Signed-off-by: Stanislaw Gruszka --- drivers/accel/ivpu/ivpu_hw_reg_io.h | 32 drivers/accel/ivpu/ivpu_mmu.c | 47 + 2 files changed, 48 insertions(+), 31 deletions(-) diff --git a/drivers

[PATCH 1/6] accel/ivpu: Use ratelimited warn and err in IPC/JSM

2023-10-20 Thread Stanislaw Gruszka
Pradzynski Reviewed-by: Stanislaw Gruszka Signed-off-by: Stanislaw Gruszka --- drivers/accel/ivpu/ivpu_ipc.c | 29 - drivers/accel/ivpu/ivpu_jsm_msg.c | 18 ++ 2 files changed, 26 insertions(+), 21 deletions(-) diff --git a/drivers/accel/ivpu

[PATCH 0/6] accel/ivpu: Update to -next 2023-10-20

2023-10-20 Thread Stanislaw Gruszka
Stanislaw Gruszka (2): accel/ivpu: Do no initialize parameters on power up accel/ivpu/37xx: Remove support for FPGA and simics drivers/accel/ivpu/ivpu_drv.c | 18 ++- drivers/accel/ivpu/ivpu_hw_37xx.c | 63 -- drivers/accel/ivpu/ivpu_hw_40xx.c | 8 +-- drivers

Re: ivpu TODO list items

2023-10-20 Thread Stanislaw Gruszka
On Wed, Oct 18, 2023 at 10:49:15PM +0530, Deepak R Varma wrote: > > > > 2. Is it absolutely necessary for me to have a specialized hardware to > > > > test my > > > > patches? Is it limited to the 14thGen or above CPU or do I need more > > > > than that? > > Yes, I don't think someone can work

Re: [PATCH] accel/ivpu: Don't enter d0i3 during FLR

2023-10-19 Thread Stanislaw Gruszka
On Tue, Oct 17, 2023 at 10:43:07AM +0200, Stanislaw Gruszka wrote: > On Fri, Oct 06, 2023 at 09:25:29AM -0600, Jeffrey Hugo wrote: > > On 10/3/2023 12:42 AM, Stanislaw Gruszka wrote: > > > From: Jacek Lawrynowicz > > > > > > Fix a bug on some platforms where F

Re: [PATCH] accel/ivpu: Extend address range for MMU mmap

2023-10-19 Thread Stanislaw Gruszka
On Wed, Oct 18, 2023 at 01:01:13PM +0200, Stanislaw Gruszka wrote: > From: "Wludzik, Jozef" > > Allow to use whole address range in MMU context mmap which is up to 48 > bits. Return invalid argument from MMU context mmap in case address is > not aligned to MMU page s

Re: [PATCH] Revert "accel/ivpu: Use cached buffers for FW loading"

2023-10-19 Thread Stanislaw Gruszka
On Tue, Oct 17, 2023 at 02:13:53PM +0200, Stanislaw Gruszka wrote: > This reverts commit 645d694559cab36fe6a57c717efcfa27d9321396. > > The commit cause issues with memory access from the device side. > Switch back to write-combined memory mappings until the issues > will be pro

[PATCH] accel/ivpu: Extend address range for MMU mmap

2023-10-18 Thread Stanislaw Gruszka
isallowing to run large models on VPU4 Signed-off-by: Wludzik, Jozef Reviewed-by: Stanislaw Gruszka Signed-off-by: Stanislaw Gruszka --- drivers/accel/ivpu/ivpu_mmu_context.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/accel/ivpu/ivpu_mmu_context.c b/dri

Re: ivpu TODO list items

2023-10-18 Thread Stanislaw Gruszka
Hi On Tue, Oct 17, 2023 at 10:25:19PM +0530, Deepak R Varma wrote: > On Fri, Oct 13, 2023 at 12:54:43PM +0530, Deepak R Varma wrote: > > Hello, > > I am shortlisted as a mentee for the LF Mentorship program. I looked at the > > TODO > > file for the ivpu driver for my project tasks. Could you

[PATCH] Revert "accel/ivpu: Use cached buffers for FW loading"

2023-10-17 Thread Stanislaw Gruszka
ess() is modified. Reviewed-by: Karol Wachowski Signed-off-by: Stanislaw Gruszka --- drivers/accel/ivpu/ivpu_fw.c | 9 - drivers/accel/ivpu/ivpu_gem.h | 5 - 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/drivers/accel/ivpu/ivpu_fw.c b/drivers/accel/ivpu/ivpu_fw.c in

Re: [PATCH] accel/ivpu: Don't enter d0i3 during FLR

2023-10-17 Thread Stanislaw Gruszka
On Fri, Oct 06, 2023 at 09:25:29AM -0600, Jeffrey Hugo wrote: > On 10/3/2023 12:42 AM, Stanislaw Gruszka wrote: > > From: Jacek Lawrynowicz > > > > Fix a bug on some platforms where FLR causes complete system > > hang when CPU is low power states (C8 or above). > &

[PATCH] accel/ivpu: Don't enter d0i3 during FLR

2023-10-03 Thread Stanislaw Gruszka
From: Jacek Lawrynowicz Fix a bug on some platforms where FLR causes complete system hang when CPU is low power states (C8 or above). Fixes: 852be13f3bd3 ("accel/ivpu: Add PM support") Cc: sta...@vger.kernel.org Signed-off-by: Jacek Lawrynowicz Reviewed-by: Stanislaw Gruszka

Re: [PATCH 1/2] accel/ivpu: Update debugfs to latest changes in DRM

2023-09-27 Thread Stanislaw Gruszka
On Thu, Sep 07, 2023 at 09:26:09AM +0200, Stanislaw Gruszka wrote: > Use new drm debugfs helpers. This is needed after changes from > commit 78346ebf9f94 ("drm/debugfs: drop debugfs_init() for the render > and accel node v2"). Applied to drm-misc-next Thanks Stanislaw

Re: [PATCH 0/6] accel/ivpu: Fixes for linux-6.6-rc4

2023-09-27 Thread Stanislaw Gruszka
On Mon, Sep 25, 2023 at 02:11:31PM +0200, Stanislaw Gruszka wrote: > - dmesg flood fix > - HW power-on and interrupt handling fixes for VPU4 > - FW loading/mapping fix Pushed to drm-misc-fixes. I had to resolve conflict when rebuilding tip, hope everything is ok there. Thanks

[PATCH v2 6/6] accel/ivpu: Use cached buffers for FW loading

2023-09-26 Thread Stanislaw Gruszka
to missed wmb). Fixes: 02d5b0aacd05 ("accel/ivpu: Implement firmware parsing and booting") Signed-off-by: Karol Wachowski Reviewed-by: Stanislaw Gruszka Signed-off-by: Stanislaw Gruszka --- v2: Actually use DRM_IVPU_BO_CACHED instead of DRM_IVPU_BO_WC.. drivers/accel/ivpu/ivpu

[PATCH 3/2] accel/ivpu: Use local variable for debugfs root

2023-09-25 Thread Stanislaw Gruszka
Use local variable for debugfs root, just to make further changes easier. Signed-off-by: Stanislaw Gruszka --- I'll squash that patch into patch 1 drivers/accel/ivpu/ivpu_debugfs.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/accel/ivpu

[PATCH 6/6] accel/ivpu: Use cached buffers for FW loading

2023-09-25 Thread Stanislaw Gruszka
to missed wmb). Fixes: 02d5b0aacd05 ("accel/ivpu: Implement firmware parsing and booting") Signed-off-by: Karol Wachowski Reviewed-by: Stanislaw Gruszka Signed-off-by: Stanislaw Gruszka --- drivers/accel/ivpu/ivpu_fw.c | 8 +--- drivers/accel/ivpu/ivpu_gem.h | 5 + 2 files c

[PATCH 5/6] accel/ivpu/40xx: Fix missing VPUIP interrupts

2023-09-25 Thread Stanislaw Gruszka
any VPUIP interrupt that comes after reading VPU_40XX_HOST_SS_ICB_STATUS_0 and before clearing all active interrupt sources. Fixes: 79cdc56c4a54 ("accel/ivpu: Add initial support for VPU 4") Signed-off-by: Karol Wachowski Reviewed-by: Stanislaw Gruszka Signed-off-by: Stanisl

[PATCH 4/6] accel/ivpu/40xx: Disable frequency change interrupt

2023-09-25 Thread Stanislaw Gruszka
Stanislaw Gruszka Signed-off-by: Stanislaw Gruszka --- drivers/accel/ivpu/ivpu_hw_40xx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/accel/ivpu/ivpu_hw_40xx.c b/drivers/accel/ivpu/ivpu_hw_40xx.c index f4a251a58ca4..87b1085d44cf 100644 --- a/drivers/

[PATCH 3/6] accel/ivpu/40xx: Ensure clock resource ownership Ack before Power-Up

2023-09-25 Thread Stanislaw Gruszka
for the CLOCK_RESOURCE_OWN_ACK before proceeding with the remainder of the power-up sequence. Fixes: 79cdc56c4a54 ("accel/ivpu: Add initial support for VPU 4") Signed-off-by: Karol Wachowski Reviewed-by: Stanislaw Gruszka Signed-off-by: Stanislaw Gruszka --- drivers/accel/ivpu/ivpu

[PATCH 2/6] accel/ivpu: Don't flood dmesg with VPU ready message

2023-09-25 Thread Stanislaw Gruszka
From: Jacek Lawrynowicz Use ivpu_dbg() to print the VPU ready message so it doesn't pollute the dmesg. Signed-off-by: Jacek Lawrynowicz Reviewed-by: Stanislaw Gruszka Signed-off-by: Stanislaw Gruszka --- drivers/accel/ivpu/ivpu_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH 1/6] accel/ivpu: Do not use wait event interruptible

2023-09-25 Thread Stanislaw Gruszka
firmware to finish IPC processing. Fixes: 5d7422cfb498 ("accel/ivpu: Add IPC driver and JSM messages") Reviewed-by: Karol Wachowski Signed-off-by: Stanislaw Gruszka --- drivers/accel/ivpu/ivpu_ipc.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/

[PATCH 0/6] accel/ivpu: Fixes for linux-6.6-rc4

2023-09-25 Thread Stanislaw Gruszka
frequency change interrupt accel/ivpu/40xx: Fix missing VPUIP interrupts accel/ivpu: Use cached buffers for FW loading Stanislaw Gruszka (1): accel/ivpu: Do not use wait event interruptible drivers/accel/ivpu/ivpu_drv.c | 2 +- drivers/accel/ivpu/ivpu_fw.c | 8

Re: [PATCH] accel/ivpu: Annotate struct ivpu_job with __counted_by

2023-09-25 Thread Stanislaw Gruszka
; (for array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family > functions). > > As found with Coccinelle[1], add __counted_by for struct ivpu_job. > > [1] > https://github.com/kees/kernel-tools/blob/trunk/coccinelle/examples/counted_by.cocci > > Cc: Jacek

Re: [PATCH] accel/ivpu: Add Arrow Lake pci id

2023-09-24 Thread Stanislaw Gruszka
On Fri, Sep 22, 2023 at 09:24:08AM -0600, Jeffrey Hugo wrote: > On 9/22/2023 7:22 AM, Stanislaw Gruszka wrote: > > Enable VPU on Arrow Lake CPUs. > > > > Reviewed-by: Krystian Pradzynski > > Reviewed-by: Karol Wachowski > > Signed-off-by: Stanislaw Gruszka

[PATCH] accel/ivpu: Add Arrow Lake pci id

2023-09-22 Thread Stanislaw Gruszka
Enable VPU on Arrow Lake CPUs. Reviewed-by: Krystian Pradzynski Reviewed-by: Karol Wachowski Signed-off-by: Stanislaw Gruszka --- drivers/accel/ivpu/ivpu_drv.c | 1 + drivers/accel/ivpu/ivpu_drv.h | 2 ++ 2 files changed, 3 insertions(+) diff --git a/drivers/accel/ivpu/ivpu_drv.c b/drivers

Re: [RFC 3/4] accel/ivpu: Remove support for uncached buffers

2023-09-19 Thread Stanislaw Gruszka
On Mon, Sep 11, 2023 at 09:24:42AM -0600, Jeffrey Hugo wrote: > On 9/1/2023 10:48 AM, Stanislaw Gruszka wrote: > > From: Jacek Lawrynowicz > > > > Usages of DRM_IVPU_BO_UNCACHED should be replaced by DRM_IVPU_BO_WC. > > There is no functional benefi

Re: [RFC 1/4] accel/ivpu: Allocate vpu_addr in gem->open() callback

2023-09-19 Thread Stanislaw Gruszka
On Mon, Sep 11, 2023 at 09:19:03AM -0600, Jeffrey Hugo wrote: > On 9/1/2023 10:48 AM, Stanislaw Gruszka wrote: > > From: Jacek Lawrynowicz > > > > gem->open() is called during handle creation for a gem object. > > It is called during prime import and in BO_CREATE io

Re: [PATCH 0/7] accel/qaic: Extend uAPI to support undoing ATTACH_SLICE_BO

2023-09-17 Thread Stanislaw Gruszka
/accel/qaic/qaic_drv.c | 1 + > include/uapi/drm/qaic_accel.h | 24 +++- > 5 files changed, 175 insertions(+), 53 deletions(-) Do not see any serious issues with the set. Reviewed-by: Stanislaw Gruszka for the whole series.

Re: [PATCH 7/7] accel/qaic: Add QAIC_DETACH_SLICE_BO IOCTL

2023-09-17 Thread Stanislaw Gruszka
On Fri, Sep 01, 2023 at 11:22:47AM -0600, Jeffrey Hugo wrote: > From: Pranjal Ramajor Asha Kanojiya > > Once a BO is attached with slicing configuration that BO can only be used > for that particular setting. With this new feature user can detach slicing > configuration off an already sliced BO

Re: [PATCH 6/7] accel/qaic: Create a function to initialize BO

2023-09-17 Thread Stanislaw Gruszka
On Fri, Sep 01, 2023 at 11:22:46AM -0600, Jeffrey Hugo wrote: > From: Pranjal Ramajor Asha Kanojiya > > This makes sure that we have a single place to initialize and > re-initialize BO. > > Use this new API to cleanup release_dbc() > > We will need this for next patch to detach slicing to a

[PATCH 2/2] accel/ivpu: Compile ivpu_debugfs.c conditionally

2023-09-07 Thread Stanislaw Gruszka
Only compile ivpu_debugfs.c file with CONFIG_DEBUG_FS. Signed-off-by: Stanislaw Gruszka --- drivers/accel/ivpu/Makefile | 3 ++- drivers/accel/ivpu/ivpu_debugfs.h | 4 drivers/accel/ivpu/ivpu_drv.c | 2 -- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers

[PATCH 1/2] accel/ivpu: Update debugfs to latest changes in DRM

2023-09-07 Thread Stanislaw Gruszka
Use new drm debugfs helpers. This is needed after changes from commit 78346ebf9f94 ("drm/debugfs: drop debugfs_init() for the render and accel node v2"). Signed-off-by: Stanislaw Gruszka --- drivers/accel/ivpu/ivpu_debugfs.c | 50 +++ drivers/

Re: [PATCH] accel/habanalabs/gaudi2: Fix incorrect string length computation in gaudi2_psoc_razwi_get_engines()

2023-09-05 Thread Stanislaw Gruszka
tial negative > values for "PSOC_RAZWI_ENG_STR_SIZE - str_size") use scnprintf() > instead of snprintf(). > > Fixes: c0e6df916050 ("accel/habanalabs: fix address decode RAZWI handling") > Signed-off-by: Christophe JAILLET Reviewed-by: Stanislaw Gruszka

Re: [PATCH] accel/qaic: Use devm_drm_dev_alloc() instead of drm_dev_alloc()

2023-09-04 Thread Stanislaw Gruszka
would be device reset not require unregister/register. > + drm_dev_get(drm); > + drm_dev_unregister(drm); That looks odd. I guess there is use-after-free problem if you just do drm_dev_unregister(). Additional drm_dev_get() does not seems to be right solution, but I'm not 100% sure, so ... Reviewed-by: Stanislaw Gruszka Regards Stanislaw

Re: [PATCH] accel/qaic: Register for PCI driver at the beginning of module init

2023-09-04 Thread Stanislaw Gruszka
Pranjal Ramajor Asha Kanojiya > Reviewed-by: Carl Vanderlip > Reviewed-by: Jeffrey Hugo > Signed-off-by: Jeffrey Hugo Reviewed-by: Stanislaw Gruszka

  1   2   3   4   >