Re: DRM Accel BoF at Linux Plumbers

2024-05-23 Thread Jacek Lawrynowicz
Hi, On 21.05.2024 17:10, Jeffrey Hugo wrote: > On 5/21/2024 8:41 AM, Tomeu Vizoso wrote: >> On Tue, May 21, 2024 at 2:12 PM Daniel Vetter wrote: >>> >>> On Sat, May 18, 2024 at 10:46:01AM +0200, Tomeu Vizoso wrote: Hi, I would like to use the chance at the next Plumbers to discuss

Re: [PATCH] drm/shmem-helper: Fix BUG_ON() on mmap(PROT_WRITE, MAP_PRIVATE)

2024-05-23 Thread Jacek Lawrynowicz
Hi, On 21.05.2024 14:58, Daniel Vetter wrote: > On Tue, 21 May 2024 at 14:38, Daniel Vetter wrote: >> >> On Mon, May 20, 2024 at 12:05:14PM +0200, Jacek Lawrynowicz wrote: >>> From: "Wachowski, Karol" >>> >>> Lack of check for copy-on-write

[PATCH] drm/shmem-helper: Fix BUG_ON() on mmap(PROT_WRITE, MAP_PRIVATE)

2024-05-20 Thread Jacek Lawrynowicz
rary for shmem backed GEM objects") Cc: Noralf Trønnes Cc: Eric Anholt Cc: Rob Herring Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Cc: # v5.2+ Signed-off-by: Wachowski, Karol Signed-off-by: J

Re: [PATCH 0/3] HW layer refactor

2024-05-17 Thread Jacek Lawrynowicz
Applied to drm-misc-next On 15.05.2024 13:30, Jacek Lawrynowicz wrote: > The NPU device consists of two parts: NPU buttress and NPU IP. > Buttress is a platform specific part that integrates the NPU IP with > the CPU. > NPU IP is the platform agnostic part that does t

[PATCH 3/3] accel/ivpu: Replace wake_thread with kfifo

2024-05-15 Thread Jacek Lawrynowicz
Use kfifo to pass IRQ sources to IRQ thread so it will be possible to use IRQ thread by multiple IRQ types. Signed-off-by: Jacek Lawrynowicz Reviewed-by: Wachowski, Karol --- drivers/accel/ivpu/ivpu_drv.c | 19 +-- drivers/accel/ivpu/ivpu_hw.c| 9 ++--- drivers/accel

[PATCH 1/3] accel/ivpu: Split IP and buttress headers

2024-05-15 Thread Jacek Lawrynowicz
From: "Wachowski, Karol" Move buttress registers to ivpu_hw_btrs_*_reg.h headers. This is an intermediate step before HW layer refactor. Signed-off-by: Wachowski, Karol Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/ivpu_hw_37xx.c | 153 drivers/

[PATCH 0/3] HW layer refactor

2024-05-15 Thread Jacek Lawrynowicz
IP 37XX could be integrated into MTL and LNL platforms. Jacek Lawrynowicz (1): accel/ivpu: Replace wake_thread with kfifo Wachowski, Karol (2): accel/ivpu: Split IP and buttress headers accel/ivpu: Split IP and buttress code drivers/accel/ivpu/Makefile |5 +- drivers

Re: [PATCH v2 00/12] accel/ivpu: Changes for 6.10

2024-05-14 Thread Jacek Lawrynowicz
Applied to drm-misc-next On 13.05.2024 14:04, Jacek Lawrynowicz wrote: > There are couple of major new features in this patchset: > * Hardware scheduler support (disabled by default) > * Profiling support > * Expose NPU busy time in sysfs > > Other then that, there ar

[PATCH v2 11/12] accel/ivpu: Increase reset counter when warm boot fails

2024-05-13 Thread Jacek Lawrynowicz
Failed warm boot causes a cold boot that looses FW state and is equivalent to a recovery or reset, so reset_counter should be incremented in order for this failure to be detected by tests. Signed-off-by: Jacek Lawrynowicz Reviewed-by: Jeffrey Hugo --- drivers/accel/ivpu/ivpu_pm.c | 1 + 1 file

[PATCH v2 12/12] accel/ivpu: Share NPU busy time in sysfs

2024-05-13 Thread Jacek Lawrynowicz
when there is no more jobs pending/executing. Signed-off-by: Tomasz Rusinowicz Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/Makefile | 3 +- drivers/accel/ivpu/ivpu_drv.c | 2 ++ drivers/accel/ivpu/ivpu_drv.h | 3 ++ drivers/accel/ivpu/ivpu_job.c | 23

[PATCH v2 10/12] accel/ivpu: Configure fw logging using debugfs

2024-05-13 Thread Jacek Lawrynowicz
From: Tomasz Rusinowicz Add fw_dyndbg file that can be used to control FW logging. Signed-off-by: Tomasz Rusinowicz Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/ivpu_debugfs.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/drivers/accel/ivpu

[PATCH v2 08/12] accel/ivpu: Add NPU profiling support

2024-05-13 Thread Jacek Lawrynowicz
DRM_IVPU_CAP_METRIC_STREAMER driver capability. Signed-off-by: Tomasz Rusinowicz Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/Makefile | 3 +- drivers/accel/ivpu/ivpu_drv.c | 14 +- drivers/accel/ivpu/ivpu_drv.h | 3 + drivers/accel/ivpu/ivpu_jsm_msg.c | 98 ++ drivers/accel

[PATCH v2 09/12] accel/ivpu: Add force snoop module parameter

2024-05-13 Thread Jacek Lawrynowicz
From: "Wachowski, Karol" Add module parameter that enforces snooping for all NPU accesses, both through MMU PTEs mappings and through TCU page table walk override register bits for MMU page walks / configuration access. Signed-off-by: Wachowski, Karol Signed-off-by: Jacek Lawrynowicz

[PATCH v2 03/12] accel/ivpu: Create priority based command queues

2024-05-13 Thread Jacek Lawrynowicz
From: "Wachowski, Karol" Create multiple command queues per engine with different priorities. The cmdqs are created on-demand and they support 4 priority levels. These priorities will later be used by the HWS (hardware scheduler). Signed-off-by: Wachowski, Karol Signed-off

[PATCH v2 07/12] accel/ivpu: Add resume engine support

2024-05-13 Thread Jacek Lawrynowicz
From: "Wachowski, Karol" Create debugfs interface that triggers sending resume engine IPC command to VPU. It is used to test engine resume functionality in driver user space tests. Signed-off-by: Wachowski, Karol Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/ivpu_debu

[PATCH v2 06/12] accel/ivpu: Implement support for hardware scheduler

2024-05-13 Thread Jacek Lawrynowicz
ver in HWS mode has to send a couple additional messages to initialize HWS and describe command queue priorities. Signed-off-by: Wachowski, Karol Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/ivpu_drv.c | 20 - drivers/accel/ivpu/ivpu_fw.c | 7 ++ drivers/accel/ivpu/ivpu_j

[PATCH v2 04/12] accel/ivpu: Implement support for preemption buffers

2024-05-13 Thread Jacek Lawrynowicz
From: "Wachowski, Karol" Allocate per-context preemption buffers that are required by HWS. There are two preemption buffers: * primary - allocated in user memory range (PIOVA accessible) * secondary - allocated in shave memory range Signed-off-by: Wachowski, Karol Signed-off

[PATCH v2 05/12] accel/ivpu: Add HWS JSM messages

2024-05-13 Thread Jacek Lawrynowicz
From: "Wachowski, Karol" Add JSM messages that will be used to implement hardware scheduler. Most of these messages are used to create and manage HWS specific command queues. Signed-off-by: Wachowski, Karol Signed-off-by: Jacek Lawrynowicz Reviewed-by: Jeffrey Hugo --- drivers/

[PATCH v2 02/12] accel/ivpu: Add sched_mode module param

2024-05-13 Thread Jacek Lawrynowicz
From: "Wachowski, Karol" This param will be used to enable/disable HWS (hardware scheduler). The HWS is a FW side feature and may not be available on all HW generations and FW versions. Signed-off-by: Wachowski, Karol Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/ivpu_drv

[PATCH v2 01/12] accel/ivpu: Update VPU FW API headers

2024-05-13 Thread Jacek Lawrynowicz
Update JSM API to 3.16.0. Signed-off-by: Jacek Lawrynowicz Reviewed-by: Jeffrey Hugo --- drivers/accel/ivpu/vpu_jsm_api.h | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/drivers/accel/ivpu/vpu_jsm_api.h b/drivers/accel/ivpu/vpu_jsm_api.h index e46f3531211a

[PATCH v2 00/12] accel/ivpu: Changes for 6.10

2024-05-13 Thread Jacek Lawrynowicz
/20240508132106.2387464-1-jacek.lawrynow...@linux.intel.com Jacek Lawrynowicz (2): accel/ivpu: Update VPU FW API headers accel/ivpu: Increase reset counter when warm boot fails Tomasz Rusinowicz (3): accel/ivpu: Add NPU profiling support accel/ivpu: Configure fw logging using debugfs accel

Re: [PATCH 12/12] accel/ivpu: Share NPU busy time in sysfs

2024-05-13 Thread Jacek Lawrynowicz
Hi, On 13.05.2024 12:45, Tvrtko Ursulin wrote: > > On 13/05/2024 11:22, Jacek Lawrynowicz wrote: >> Hi, >> >> On 10.05.2024 18:55, Jeffrey Hugo wrote: >>> On 5/8/2024 7:29 AM, Jacek Lawrynowicz wrote: >>>> From: Tomasz Rusinowicz >>>> &g

Re: [PATCH 12/12] accel/ivpu: Share NPU busy time in sysfs

2024-05-13 Thread Jacek Lawrynowicz
Hi, On 10.05.2024 18:55, Jeffrey Hugo wrote: > On 5/8/2024 7:29 AM, Jacek Lawrynowicz wrote: >> From: Tomasz Rusinowicz >> >> The driver tracks the time spent by NPU executing jobs >> and shares it through sysfs `npu_busy_time_us` file. >> It can be the

Re: [PATCH 08/12] accel/ivpu: Add NPU profiling support

2024-05-13 Thread Jacek Lawrynowicz
Hi, On 10.05.2024 18:46, Jeffrey Hugo wrote: > On 5/8/2024 7:21 AM, Jacek Lawrynowicz wrote: >> From: Tomasz Rusinowicz >> >> Implement time based Metric Streamer profiling UAPI. >> >> This is a generic mechanism allowing user mode tools to sample >>

Re: [PATCH 07/12] accel/ivpu: Add resume engine support

2024-05-13 Thread Jacek Lawrynowicz
Hi, On 10.05.2024 18:42, Jeffrey Hugo wrote: > On 5/8/2024 7:21 AM, Jacek Lawrynowicz wrote: >> From: "Wachowski, Karol" >> >> Create debugfs interface that triggers sending resume engine IPC >> command to VPU. > > Why?  Who would use this and for w

Re: [PATCH 06/12] accel/ivpu: Implement support for hardware scheduler

2024-05-13 Thread Jacek Lawrynowicz
Hi, On 10.05.2024 18:41, Jeffrey Hugo wrote: > On 5/8/2024 7:21 AM, Jacek Lawrynowicz wrote: >> +#define IVPU_FOCUS_PRESENT_TIMER_MS 1000 >> + >>   static char *ivpu_firmware; >>   module_param_named_unsafe(firmware, ivpu_firmware, charp, 0644); >>   MODULE_

Re: [PATCH 02/12] accel/ivpu: Add sched_mode module param

2024-05-13 Thread Jacek Lawrynowicz
Hi, On 10.05.2024 18:30, Jeffrey Hugo wrote: > On 5/8/2024 7:20 AM, Jacek Lawrynowicz wrote: >> From: "Wachowski, Karol" >> >> This param will be used to enable/disable HWS (hardware scheduler). >> The HWS is a FW side feature and may not be available on

Re: [PATCH 10/12] accel/ivpu: Configure fw logging using debugfs

2024-05-08 Thread Jacek Lawrynowicz
Hi, Please ignore this patch. It got here by mistake. There is another one sent as a part of a patchset. On 08.05.2024 15:25, Jacek Lawrynowicz wrote: > From: Tomasz Rusinowicz > > Add fw_dyndbg file that can be used to control FW logging. > > Signed-off-by: Tomasz Rusinowic

[PATCH 12/12] accel/ivpu: Share NPU busy time in sysfs

2024-05-08 Thread Jacek Lawrynowicz
when there is no more jobs pending/executing. Signed-off-by: Tomasz Rusinowicz Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/Makefile | 3 +- drivers/accel/ivpu/ivpu_drv.c | 2 ++ drivers/accel/ivpu/ivpu_drv.h | 3 ++ drivers/accel/ivpu/ivpu_job.c | 23

[PATCH 11/12] accel/ivpu: Increase reset counter when warm boot fails

2024-05-08 Thread Jacek Lawrynowicz
Failed warm boot causes a cold boot that looses FW state and is equivalent to a recovery or reset, so reset_counter should be incremented in order for this failure to be detected by tests. Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/ivpu_pm.c | 1 + 1 file changed, 1 insertion

[PATCH 10/12] accel/ivpu: Configure fw logging using debugfs

2024-05-08 Thread Jacek Lawrynowicz
From: Tomasz Rusinowicz Add fw_dyndbg file that can be used to control FW logging. Signed-off-by: Tomasz Rusinowicz Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/ivpu_debugfs.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/drivers/accel/ivpu

[PATCH 10/12] accel/ivpu: Configure fw logging using debugfs

2024-05-08 Thread Jacek Lawrynowicz
From: Tomasz Rusinowicz Add fw_dyndbg file that can be used to control FW logging. Signed-off-by: Tomasz Rusinowicz Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/ivpu_debugfs.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/drivers/accel/ivpu

[PATCH 03/12] accel/ivpu: Create priority based command queues

2024-05-08 Thread Jacek Lawrynowicz
From: "Wachowski, Karol" Create multiple command queues per engine with different priorities. The cmdqs are created on-demand and they support 4 priority levels. These priorities will later be used by the HWS (hardware scheduler). Signed-off-by: Wachowski, Karol Signed-off

[PATCH 09/12] accel/ivpu: Add force snoop module parameter

2024-05-08 Thread Jacek Lawrynowicz
From: "Wachowski, Karol" Add module parameter that enforces snooping for all NPU accesses, both through MMU PTEs mappings and through TCU page table walk override register bits for MMU page walks / configuration access. Signed-off-by: Wachowski, Karol Signed-off-by: Jacek L

[PATCH 06/12] accel/ivpu: Implement support for hardware scheduler

2024-05-08 Thread Jacek Lawrynowicz
ver in HWS mode has to send a couple additional messages to initialize HWS and describe command queue priorities. Signed-off-by: Wachowski, Karol Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/ivpu_drv.c | 20 - drivers/accel/ivpu/ivpu_fw.c | 9 ++ drivers/accel/ivpu/ivpu_j

[PATCH 05/12] accel/ivpu: Add HWS JSM messages

2024-05-08 Thread Jacek Lawrynowicz
From: "Wachowski, Karol" Add JSM messages that will be used to implement hardware scheduler. Most of these messages are used to create and manage HWS specific command queues. Signed-off-by: Wachowski, Karol Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/ivpu_drv.h

[PATCH 02/12] accel/ivpu: Add sched_mode module param

2024-05-08 Thread Jacek Lawrynowicz
From: "Wachowski, Karol" This param will be used to enable/disable HWS (hardware scheduler). The HWS is a FW side feature and may not be available on all HW generations and FW versions. Signed-off-by: Wachowski, Karol Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/ivpu_drv

[PATCH 04/12] accel/ivpu: Implement support for preemption buffers

2024-05-08 Thread Jacek Lawrynowicz
From: "Wachowski, Karol" Allocate per-context preemption buffers that are required by HWS. There are two preemption buffers: * primary - allocated in user memory range (PIOVA accessible) * secondary - allocated in shave memory range Signed-off-by: Wachowski, Karol Signed-off

[PATCH 08/12] accel/ivpu: Add NPU profiling support

2024-05-08 Thread Jacek Lawrynowicz
DRM_IVPU_CAP_METRIC_STREAMER driver capability. Signed-off-by: Tomasz Rusinowicz Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/Makefile | 3 +- drivers/accel/ivpu/ivpu_drv.c | 14 +- drivers/accel/ivpu/ivpu_drv.h | 3 + drivers/accel/ivpu/ivpu_jsm_msg.c | 98 ++ drivers/accel

[PATCH 07/12] accel/ivpu: Add resume engine support

2024-05-08 Thread Jacek Lawrynowicz
From: "Wachowski, Karol" Create debugfs interface that triggers sending resume engine IPC command to VPU. Signed-off-by: Wachowski, Karol Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/ivpu_debugfs.c | 24 1 file changed, 24 insertions(+)

[PATCH 00/12] accel/ivpu: Changes for 6.10

2024-05-08 Thread Jacek Lawrynowicz
There are couple of major new features in this patchset: * Hardware scheduler support (disabled by default) * Profiling support * Expose NPU busy time in sysfs Other then that, there are two small random fixes. Jacek Lawrynowicz (2): accel/ivpu: Update VPU FW API headers accel/ivpu

[PATCH 01/12] accel/ivpu: Update VPU FW API headers

2024-05-08 Thread Jacek Lawrynowicz
Update JSM API to 3.16.0. Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/vpu_jsm_api.h | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/drivers/accel/ivpu/vpu_jsm_api.h b/drivers/accel/ivpu/vpu_jsm_api.h index e46f3531211a..33f462b1a25d 100644

Re: [PATCH 0/8] accel/ivpu: Fixes for 6.9-rc3

2024-04-08 Thread Jacek Lawrynowicz
Applied to drm-misc-fixes On 02.04.2024 12:49, Jacek Lawrynowicz wrote: > A couple of small stability fixes, one UAPI fix and some error message fixes. > > Jacek Lawrynowicz (5): > accel/ivpu: Remove d3hot_after_power_off WA > accel/ivpu: Put NPU back to D3hot after failed r

Re: [PATCH 6/8] accel/ivpu: Return max freq for DRM_IVPU_PARAM_CORE_CLOCK_RATE

2024-04-08 Thread Jacek Lawrynowicz
On 05.04.2024 17:26, Jeffrey Hugo wrote: > On 4/2/2024 4:49 AM, Jacek Lawrynowicz wrote: >> DRM_IVPU_PARAM_CORE_CLOCK_RATE returned current NPU frequency which > > Commit text should be present tense, so returned->returns OK >> could be 0 if device was sleeping.

Re: [PATCH] accel/qaic: Add Sahara implementation for firmware loading

2024-04-08 Thread Jacek Lawrynowicz
Reviewed-by: Jacek Lawrynowicz On 22.03.2024 04:49, Jeffrey Hugo wrote: > The AIC100 secondary bootloader uses the Sahara protocol for two > purposes - loading the runtime firmware images from the host, and > offloading crashdumps to the host. The crashdump functionality is only >

[PATCH 8/8] accel/ivpu: Fix deadlock in context_xa

2024-04-02 Thread Jacek Lawrynowicz
ock was reported by lockdep and observed in internal tests. Fixes: 35b137630f08 ("accel/ivpu: Introduce a new DRM driver for Intel VPU") Cc: # v6.3+ Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/ivpu_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drive

[PATCH 7/8] accel/ivpu: Fix missed error message after VPU rename

2024-04-02 Thread Jacek Lawrynowicz
Change "VPU" to "NPU" in ivpu_suspend() so it matches all other error messages. Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/ivpu_pm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/accel/ivpu/ivpu_pm.c b/drivers/accel/ivpu/ivpu_pm.

[PATCH 6/8] accel/ivpu: Return max freq for DRM_IVPU_PARAM_CORE_CLOCK_RATE

2024-04-02 Thread Jacek Lawrynowicz
evice is up") Cc: # v6.7 Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/ivpu_drv.c | 18 +- drivers/accel/ivpu/ivpu_hw.h | 6 ++ drivers/accel/ivpu/ivpu_hw_37xx.c | 7 --- drivers/accel/ivpu/ivpu_hw_40xx.c | 6 ++ 4 files changed, 17 inserti

[PATCH 5/8] accel/ivpu: Improve clarity of MMU error messages

2024-04-02 Thread Jacek Lawrynowicz
From: "Wachowski, Karol" This patch improves readability and clarity of MMU error messages. Previously, the error strings were somewhat confusing and could lead to ambiguous interpretations, making it difficult to diagnose issues. Signed-off-by: Wachowski, Karol Signed-off

[PATCH 4/8] accel/ivpu: Put NPU back to D3hot after failed resume

2024-04-02 Thread Jacek Lawrynowicz
ery") Cc: # v6.8+ Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/ivpu_pm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/accel/ivpu/ivpu_pm.c b/drivers/accel/ivpu/ivpu_pm.c index 325b82f8d971..ba51781b5896 100644 --- a/drivers/accel/ivpu/ivpu_pm.c +++ b/drivers/accel/i

[PATCH 3/8] accel/ivpu: Fix PCI D0 state entry in resume

2024-04-02 Thread Jacek Lawrynowicz
recovery") Cc: # v6.8+ Signed-off-by: Wachowski, Karol Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/ivpu_pm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/accel/ivpu/ivpu_pm.c b/drivers/accel/ivpu/ivpu_pm.c index 9cbd7af6576b..325b82f8d971

[PATCH 2/8] accel/ivpu: Remove d3hot_after_power_off WA

2024-04-02 Thread Jacek Lawrynowicz
Always enter D3hot after entering D0i3 an all platforms. This minimizes power usage. Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/ivpu_drv.c | 20 ++-- drivers/accel/ivpu/ivpu_drv.h | 3 +-- drivers/accel/ivpu/ivpu_hw_37xx.c | 4 +--- drivers/accel/ivpu

[PATCH 1/8] accel/ivpu: Check return code of ipc->lock init

2024-04-02 Thread Jacek Lawrynowicz
From: "Wachowski, Karol" Return value of drmm_mutex_init(ipc->lock) was unchecked. Fixes: 5d7422cfb498 ("accel/ivpu: Add IPC driver and JSM messages") Cc: # v6.3+ Signed-off-by: Wachowski, Karol Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/ivpu_ipc.c | 8 +

[PATCH 0/8] accel/ivpu: Fixes for 6.9-rc3

2024-04-02 Thread Jacek Lawrynowicz
A couple of small stability fixes, one UAPI fix and some error message fixes. Jacek Lawrynowicz (5): accel/ivpu: Remove d3hot_after_power_off WA accel/ivpu: Put NPU back to D3hot after failed resume accel/ivpu: Return max freq for DRM_IVPU_PARAM_CORE_CLOCK_RATE accel/ivpu: Fix missed

Re: [PATCH 1/3] accel/qaic: Add bootlog debugfs

2024-03-18 Thread Jacek Lawrynowicz
On 15.03.2024 16:39, Jeffrey Hugo wrote: > On 3/14/2024 5:41 AM, Jacek Lawrynowicz wrote: >> Hi, >> >> On 11.03.2024 17:58, Jeffrey Hugo wrote: >>> During the boot process of AIC100, the bootloaders (PBL and SBL) log >>> messages to device RAM. During

Re: [PATCH 3/3] accel/qaic: Add fifo queued debugfs

2024-03-14 Thread Jacek Lawrynowicz
Reviewed-by: Jacek Lawrynowicz On 11.03.2024 17:58, Jeffrey Hugo wrote: > When debugging functional issues with workload input processing, it is > useful to know if requests are backing up in the fifo, or perhaps > getting stuck elsewhere. To answer the question of how many

Re: [PATCH 2/3] accel/qaic: Add fifo size debugfs

2024-03-14 Thread Jacek Lawrynowicz
Reviewed-by: Jacek Lawrynowicz On 11.03.2024 17:58, Jeffrey Hugo wrote: > Each DMA Bridge Channel (dbc) has a unique configured fifo size which is > specified by the userspace client of that dbc. Since the fifo is > circular, it is useful to know the configured size when debugging

Re: [PATCH 1/3] accel/qaic: Add bootlog debugfs

2024-03-14 Thread Jacek Lawrynowicz
Hi, On 11.03.2024 17:58, Jeffrey Hugo wrote: > During the boot process of AIC100, the bootloaders (PBL and SBL) log > messages to device RAM. During SBL, if the host opens the QAIC_LOGGING > channel, SBL will offload the contents of the log buffer to the host, > and stream any new messages that

Re: [PATCH v2] accel/ivpu: Don't enable any tiles by default on VPU40xx

2024-02-20 Thread Jacek Lawrynowicz
Applied to drm-misc-fixes On 20.02.2024 14:16, Jacek Lawrynowicz wrote: > From: Andrzej Kacprowski > > There is no point in requesting 1 tile on VPU40xx as the FW will > probably need more tiles to run workloads, so it will have to > reconfigure PLL anyway. Don't enable any

[PATCH v2] accel/ivpu: Don't enable any tiles by default on VPU40xx

2024-02-20 Thread Jacek Lawrynowicz
as the tiles are always enabled only by the FW from the same initial state. Fixes: 79cdc56c4a54 ("accel/ivpu: Add initial support for VPU 4") Cc: sta...@vger.kernel.org Signed-off-by: Andrzej Kacprowski Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/ivpu_hw_40xx.c | 2 +- 1 file

[PATCH] accel/ivpu: Don't enable any tiles by default on VPU40xx

2024-02-20 Thread Jacek Lawrynowicz
as the tiles are always enabled only by the FW from the same initial state. Fixes: 79cdc56c4a54 ("accel/ivpu: Add initial support for VPU 4") Signed-off-by: Andrzej Kacprowski Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/ivpu_hw_40xx.c | 2 +- 1 file changed, 1 insertion(+),

Re: [PATCH 0/8] accel/ivpu changes for 6.9

2024-02-19 Thread Jacek Lawrynowicz
Added missing SOB and applied to drm-misc-next On 14.02.2024 09:12, Jacek Lawrynowicz wrote: > Mostly code refactoring and cleanup. > > Please note that FW API headers are maintained by a separate team > and I would prefer not to modify them. > > Jacek Lawrynowicz (5): >

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

2024-02-14 Thread Jacek Lawrynowicz
VPU was renamed to NPU but due to large overhead of renaming all the sources only user visible messages are being updated. Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/ivpu_drv.c | 8 drivers/accel/ivpu/ivpu_drv.h | 2 +- drivers/accel/ivpu/ivpu_fw.c | 2

[PATCH 7/8] accel/ivpu: Refactor BO creation functions

2024-02-14 Thread Jacek Lawrynowicz
From: "Wachowski, Karol" Rename BO allocate/create functions, so the code is more consistent. There are now two matching buffer creation functions: - ivpu_bo_create_ioctl() - create a BO from user space - ivpu_bo_create() - create a BO from kernel space ivpu_bo_alloc() is now only used to

[PATCH 4/8] accel/ivpu: Add support for FW boot param system_time_us

2024-02-14 Thread Jacek Lawrynowicz
From: Krystian Pradzynski Add support for FW boot API param system_time_us. According to the API description this field should be set to system time in microseconds starting from 1970. Signed-off-by: Krystian Pradzynski --- drivers/accel/ivpu/ivpu_fw.c | 6 ++ 1 file changed, 6

[PATCH 1/8] accel/ivpu: Rename TILE_SKU_BOTH_MTL to TILE_SKU_BOTH

2024-02-14 Thread Jacek Lawrynowicz
Remove legacy postfix from TILE_SKU_BOTH macro. This was missed when renaming MTL to VPU37XX. Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/ivpu_hw_37xx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/accel/ivpu/ivpu_hw_37xx.c b/drivers/accel/ivpu

[PATCH 6/8] accel/ivpu: Fix ivpu_reset_engine_fn merge issue

2024-02-14 Thread Jacek Lawrynowicz
ivpu_reset_engine_fn and ivpu_reset_engine_fops were separated during merge so move them back together to keep the file consistent. Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/ivpu_debugfs.c | 32 +++ 1 file changed, 16 insertions(+), 16 deletions

[PATCH 3/8] accel/ivpu: Update FW API headers

2024-02-14 Thread Jacek Lawrynowicz
Update Boot API to 3.22.0 and JSM API to 3.15.6 Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/vpu_boot_api.h | 46 ++- drivers/accel/ivpu/vpu_jsm_api.h | 32 ++--- 2 files changed, 55 insertions(+), 23 deletions(-) diff --git a/drivers

[PATCH 5/8] accel/ivpu: Use lazy allocation for doorbell IDs

2024-02-14 Thread Jacek Lawrynowicz
From: "Wachowski, Karol" Reserve/allocate and free doorbells for command queues when needed using xarray. This allows to avoid reserving a doorbell for a contexts that never issues a job. Signed-off-by: Wachowski, Karol --- drivers/accel/ivpu/ivpu_drv.c | 4

[PATCH 2/8] accel/ivpu: Remove legacy firmware name

2024-02-14 Thread Jacek Lawrynowicz
We are now using NPU IP generation based FW names instead of platform code names, so mtl_vpu.bin can be removed. Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/ivpu_fw.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/accel/ivpu/ivpu_fw.c b/drivers/accel/ivpu/ivpu_fw.c

[PATCH 0/8] accel/ivpu changes for 6.9

2024-02-14 Thread Jacek Lawrynowicz
Mostly code refactoring and cleanup. Please note that FW API headers are maintained by a separate team and I would prefer not to modify them. Jacek Lawrynowicz (5): accel/ivpu: Rename TILE_SKU_BOTH_MTL to TILE_SKU_BOTH accel/ivpu: Remove legacy firmware name accel/ivpu: Update FW API

Re: [PATCH] accel/ivpu: Fix DevTLB errors on suspend/resume

2024-02-12 Thread Jacek Lawrynowicz
Applied to drm-misc-fixes On 06.02.2024 16:19, Jacek Lawrynowicz wrote: > Issue IP reset before shutdown in order to > complete all upstream requests to the SOC. > Without this DevTLB is complaining about > incomplete transactions and NPU cannot resume from > suspend. > Th

Re: [PATCH v2] accel/ivpu: Fix DevTLB errors on suspend/resume and recovery

2024-02-12 Thread Jacek Lawrynowicz
Hi, On 09.02.2024 16:39, Jeffrey Hugo wrote: > On 2/7/2024 3:24 AM, Jacek Lawrynowicz wrote: >> Issue IP reset before shutdown in order to >> complete all upstream requests to the SOC. >> Without this DevTLB is complaining about >> incomplete transactions and NPU ca

[PATCH v2] accel/ivpu: Fix DevTLB errors on suspend/resume and recovery

2024-02-07 Thread Jacek Lawrynowicz
reset and FLR cannot. Fixes: 3f7c0634926d ("accel/ivpu/37xx: Fix hangs related to MMIO reset") Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/ivpu_hw_37xx.c | 44 ++- drivers/accel/ivpu/ivpu_pm.c | 39 +++ 2 files change

[PATCH] accel/ivpu: Fix DevTLB errors on suspend/resume

2024-02-06 Thread Jacek Lawrynowicz
MMIO reset") Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/ivpu_hw_37xx.c | 44 ++- drivers/accel/ivpu/ivpu_pm.c | 12 - 2 files changed, 38 insertions(+), 18 deletions(-) diff --git a/drivers/accel/ivpu/ivpu_hw_37xx.c b/drivers/accel/ivp

Re: [PATCH 0/7] accel/ivpu fixes for 6.8-rc3

2024-02-06 Thread Jacek Lawrynowicz
Applied to drm-misc-fixes (except patch 4) On 26.01.2024 13:27, Jacek Lawrynowicz wrote: > A couple of small patches focused on improving driver stability. > In addition d3hot_delay patch improves LNL inference latency. > > Grzegorz Trzebiatowski (1): > accel/ivpu: Add job

Re: [PATCH 4/7] accel/ivpu: Gracefully shutdown NPU before reset

2024-02-06 Thread Jacek Lawrynowicz
On 05.02.2024 09:39, Jacek Lawrynowicz wrote: > On 26.01.2024 19:23, Jeffrey Hugo wrote: >> On 1/26/2024 5:28 AM, Jacek Lawrynowicz wrote: >>> From: "Wachowski, Karol" >>> >>> Replace forceful disable of power domains with requests to disable >>

Re: [PATCH 4/7] accel/ivpu: Gracefully shutdown NPU before reset

2024-02-05 Thread Jacek Lawrynowicz
On 26.01.2024 19:23, Jeffrey Hugo wrote: > On 1/26/2024 5:28 AM, Jacek Lawrynowicz wrote: >> From: "Wachowski, Karol" >> >> Replace forceful disable of power domains with requests to disable >> TOP NOC CPU_CTRL and HOSTIF_L2CACHE through QREQN. >>

Re: [PATCH 5/7] accel/ivpu/40xx: Enable D0i3 message

2024-02-05 Thread Jacek Lawrynowicz
On 26.01.2024 19:24, Jeffrey Hugo wrote: > On 1/26/2024 5:28 AM, Jacek Lawrynowicz wrote: >> From: Krystian Pradzynski >> >> All recent 40xx firmware already supports D0i3 entry message and this >> WA is no longer needed. > > Can I assume that the workarou

[PATCH 7/7] accel/ivpu: Add job status for jobs aborted by the driver

2024-01-26 Thread Jacek Lawrynowicz
-by: Jacek Lawrynowicz --- drivers/accel/ivpu/ivpu_job.c | 4 ++-- include/uapi/drm/ivpu_accel.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/accel/ivpu/ivpu_job.c b/drivers/accel/ivpu/ivpu_job.c index 0440bee3ecaf..e70cfb859339 100644 --- a/drivers/accel/ivpu

[PATCH 6/7] accel/ivpu/40xx: Stop passing SKU boot parameters to FW

2024-01-26 Thread Jacek Lawrynowicz
From: Krystian Pradzynski This parameter was never used by the 40xx FW. Signed-off-by: Krystian Pradzynski Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/ivpu_hw_40xx.c | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/accel/ivpu/ivpu_hw_40xx.c b/drivers/accel/ivpu

[PATCH 5/7] accel/ivpu/40xx: Enable D0i3 message

2024-01-26 Thread Jacek Lawrynowicz
From: Krystian Pradzynski All recent 40xx firmware already supports D0i3 entry message and this WA is no longer needed. Signed-off-by: Krystian Pradzynski Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/ivpu_fw.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/accel/ivpu

[PATCH 2/7] accel/ivpu: Correct MMU queue size checking functions

2024-01-26 Thread Jacek Lawrynowicz
e was full. Signed-off-by: Wachowski, Karol Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/ivpu_mmu.c | 33 ++--- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/drivers/accel/ivpu/ivpu_mmu.c b/drivers/accel/ivpu/ivpu_mmu.c index 8d

[PATCH 3/7] accel/ivpu: Disable d3hot_delay on all NPU generations

2024-01-26 Thread Jacek Lawrynowicz
NPU does not require this delay regardless of the generation. All generations are integrated into the SOC. Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/ivpu_drv.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/accel/ivpu/ivpu_drv.c b/drivers/accel

[PATCH 4/7] accel/ivpu: Gracefully shutdown NPU before reset

2024-01-26 Thread Jacek Lawrynowicz
E released in January 2024 onwards. Fixes: 3f7c0634926d ("accel/ivpu/37xx: Fix hangs related to MMIO reset") Signed-off-by: Wachowski, Karol Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/ivpu_hw_37xx.c | 122 +++--- 1 file changed, 60 insertions(+), 6

[PATCH 0/7] accel/ivpu fixes for 6.8-rc3

2024-01-26 Thread Jacek Lawrynowicz
A couple of small patches focused on improving driver stability. In addition d3hot_delay patch improves LNL inference latency. Grzegorz Trzebiatowski (1): accel/ivpu: Add job status for jobs aborted by the driver Jacek Lawrynowicz (1): accel/ivpu: Disable d3hot_delay on all NPU generations

[PATCH 1/7] accel/ivpu: Force snooping for MMU writes

2024-01-26 Thread Jacek Lawrynowicz
orce write transactions to be snooped solving the problem. Signed-off-by: Wachowski, Karol Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/ivpu_hw_37xx.c | 2 +- drivers/accel/ivpu/ivpu_hw_40xx.c | 2 +- drivers/accel/ivpu/ivpu_mmu.c | 3 --- 3 files changed, 2 insertions(+), 5 deletions(-)

Re: [PATCH 0/3] accel/ivpu fixes for 6.8-rc1

2024-01-25 Thread Jacek Lawrynowicz
Applied to drm-misc-fixes On 22.01.2024 13:09, Jacek Lawrynowicz wrote: > Stability fixes for reset, recovery and unbind. > > Jacek Lawrynowicz (3): > accel/ivpu: Fix dev open/close races with unbind > accel/ivpu: Improve stability of ivpu_submit_ioctl() > accel/ivpu

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

2024-01-22 Thread Jacek Lawrynowicz
Applied to drm-misc-fixes On 24.10.2023 18:53, Stanislaw Gruszka wrote: > 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.

[PATCH 2/3] accel/ivpu: Improve stability of ivpu_submit_ioctl()

2024-01-22 Thread Jacek Lawrynowicz
- Wake up the device as late as possible - Remove job reference counting in order to simplify the code - Don't put jobs that are not fully submitted on submitted_jobs_xa in order to avoid potential races with reset/recovery Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/ivpu_job.c

[PATCH 3/3] accel/ivpu: Improve recovery and reset support

2024-01-22 Thread Jacek Lawrynowicz
- Reset VPU instead triggering recovery after changing debugfs params Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/ivpu_debugfs.c | 20 ++--- drivers/accel/ivpu/ivpu_hw_37xx.c | 14 +++-- drivers/accel/ivpu/ivpu_hw_40xx.c | 8 +++--- drivers/accel/ivpu/ivpu_ipc.c

[PATCH 0/3] accel/ivpu fixes for 6.8-rc1

2024-01-22 Thread Jacek Lawrynowicz
Stability fixes for reset, recovery and unbind. Jacek Lawrynowicz (3): accel/ivpu: Fix dev open/close races with unbind accel/ivpu: Improve stability of ivpu_submit_ioctl() accel/ivpu: Improve recovery and reset support drivers/accel/ivpu/ivpu_debugfs.c | 20 +++- drivers/accel/ivpu

[PATCH 1/3] accel/ivpu: Fix dev open/close races with unbind

2024-01-22 Thread Jacek Lawrynowicz
- Add context_list_lock to synchronize user context addition/removal - Use drm_dev_enter() to prevent unbinding the device during ivpu_open() and vpu address allocation Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/ivpu_drv.c | 110 +- drivers

Re: [PATCH v2 0/9] accel/ivpu fixes for 6.8

2024-01-22 Thread Jacek Lawrynowicz
Applied to drm-misc-fixes On 15.01.2024 14:44, Jacek Lawrynowicz wrote: > Various driver fixes: > - Fixes for infinite loops, missing locks and DMA-API debug warnings > - Deprecate DRM_IVPU_PARAM_CONTEXT_PRIORITY > - Improve diagnostic messages > > v2 includes changes from

[PATCH v2 8/9] accel/ivpu: Improve buffer object debug logs

2024-01-15 Thread Jacek Lawrynowicz
Make debug logs more readable and consistent: - don't print handle as it is not always available for all buffers - use hashed ivpu_bo ptr as main buffer identifier - remove unused fields from ivpu_bo_print_info() Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/ivpu_gem.c | 63

[PATCH v2 9/9] accel/ivpu: Deprecate DRM_IVPU_PARAM_CONTEXT_PRIORITY param

2024-01-15 Thread Jacek Lawrynowicz
From: "Wachowski, Karol" DRM_IVPU_PARAM_CONTEXT_PRIORITY has been deprecated because it has been replaced with DRM_IVPU_JOB_PRIORITY levels set with submit IOCTL and was unused anyway. Signed-off-by: Wachowski, Karol Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/ivpu_

[PATCH v2 7/9] accel/ivpu: Disable buffer sharing among VPU contexts

2024-01-15 Thread Jacek Lawrynowicz
and it will be implemented in future if required. Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/ivpu_gem.c | 44 +-- 1 file changed, 6 insertions(+), 38 deletions(-) diff --git a/drivers/accel/ivpu/ivpu_gem.c b/drivers/accel/ivpu/ivpu_gem.c index 4de454bfbf91..95e731e13941

[PATCH v2 6/9] accel/ivpu: Free buffer sgt on unbind

2024-01-15 Thread Jacek Lawrynowicz
Call dma_unmap() on all buffers before the VPU is unbinded to avoid "device driver has pending DMA allocations while released from device" warning when DMA-API debug is enabled. Signed-off-by: Jacek Lawrynowicz Reviewed-by: Jeffrey Hugo --- drivers/accel/ivpu/ivpu_gem.c | 14 +++

[PATCH v2 5/9] accel/ivpu: Fix for missing lock around drm_gem_shmem_vmap()

2024-01-15 Thread Jacek Lawrynowicz
drm_gem_shmem_vmap/vunmap requires dma resv lock to be held. This was missed during conversion to shmem helper. Fixes: 8d88e4cdce4f ("accel/ivpu: Use GEM shmem helper for all buffers") Signed-off-by: Jacek Lawrynowicz Reviewed-by: Jeffrey Hugo --- drivers/accel/ivpu/ivpu_gem.c |

[PATCH v2 4/9] accel/ivpu: Add diagnostic messages when VPU fails to boot or suspend

2024-01-15 Thread Jacek Lawrynowicz
From: "Wachowski, Karol" Make boot/suspend failure debugging easier by dumping FW logs and error registers. Signed-off-by: Wachowski, Karol Signed-off-by: Jacek Lawrynowicz Reviewed-by: Jeffrey Hugo --- drivers/accel/ivpu/ivpu_drv.c | 5 +++-- drivers/accel/ivpu/ivpu_pm.c | 4 +++

  1   2   3   >