Re: [PATCH] accel/ivpu: Use firmware names from upstream repo

2025-05-06 Thread Jacek Lawrynowicz
Hi, On 5/6/2025 5:41 PM, Lizhi Hou wrote: > > On 5/6/25 02:20, Jacek Lawrynowicz wrote: >> Use FW names from linux-firmware repo instead of deprecated ones. >> >> Fixes: c140244f0cfb ("accel/ivpu: Add initial Panther Lake support") >> Cc: # v6

[PATCH] accel/ivpu: Use firmware names from upstream repo

2025-05-06 Thread Jacek Lawrynowicz
Use FW names from linux-firmware repo instead of deprecated ones. Fixes: c140244f0cfb ("accel/ivpu: Add initial Panther Lake support") Cc: # v6.13+ Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/ivpu_fw.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) di

[PATCH] accel/ivpu: Improve buffer object logging

2025-05-06 Thread Jacek Lawrynowicz
xes: 37dee2a2f433 ("accel/ivpu: Improve buffer object debug logs") Cc: # v6.8+ Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/ivpu_gem.c | 25 + drivers/accel/ivpu/ivpu_gem.h | 1 + 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/drive

Re: [PATCH] accel/ivpu: Correct mutex unlock order in job submission

2025-04-30 Thread Jacek Lawrynowicz
Fixed commit message and applied to drm-misc-fixes On 4/25/2025 11:36 AM, Jacek Lawrynowicz wrote: > From: Karol Wachowski > > The mutex unlock for vdev->submitted_jobs_lock was incorrectly placed > after unlocking file_priv->lock. Change order of unlocks to avoid potential

Re: [PATCH] accel/ivpu: Fix pm related deadlocks in cmdq ioctls

2025-04-30 Thread Jacek Lawrynowicz
Applied to drm-misc-fixes On 4/25/2025 11:33 AM, Jacek Lawrynowicz wrote: > Fix deadlocks in ivpu_cmdq_create_ioctl() and ivpu_cmdq_destroy_ioctl() > related to runtime suspend. > > Runtime suspend acquires file_priv->lock mutex by calling > ivpu_cmdq_reset_all_contexts()

Re: [PATCH] accel/ivpu: Increase state dump msg timeout

2025-04-30 Thread Jacek Lawrynowicz
Applied to drm-misc-fixes On 4/25/2025 11:28 AM, Jacek Lawrynowicz wrote: > Increase JMS message state dump command timeout to 100 ms. On some > platforms, the FW may take a bit longer than 50 ms to dump its state > to the log buffer and we don't want to miss any debug info during T

Re: [PATCH] accel/ivpu: Correct mutex unlock order in job submission

2025-04-29 Thread Jacek Lawrynowicz
Hi, On 4/28/2025 4:21 PM, Jeff Hugo wrote: > On 4/28/2025 12:47 AM, Jacek Lawrynowicz wrote: >> Hi, >> >> On 4/25/2025 7:22 PM, Jeff Hugo wrote: >>> On 4/25/2025 3:36 AM, Jacek Lawrynowicz wrote: >>>> From: Karol Wachowski >>>> >>>&

Re: [PATCH] accel/ivpu: Correct mutex unlock order in job submission

2025-04-27 Thread Jacek Lawrynowicz
Hi, On 4/25/2025 7:22 PM, Jeff Hugo wrote: > On 4/25/2025 3:36 AM, Jacek Lawrynowicz wrote: >> From: Karol Wachowski >> >> The mutex unlock for vdev->submitted_jobs_lock was incorrectly placed >> after unlocking file_priv->lock. Change order of unlocks to avoi

[PATCH] accel/ivpu: Correct mutex unlock order in job submission

2025-04-25 Thread Jacek Lawrynowicz
ed-off-by: Karol Wachowski Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/ivpu_job.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/accel/ivpu/ivpu_job.c b/drivers/accel/ivpu/ivpu_job.c index 863e3cd6ace51..540923ffcbf8d 100644 --- a/drivers/accel/ivpu/ivpu_job

[PATCH] accel/ivpu: Fix pm related deadlocks in cmdq ioctls

2025-04-25 Thread Jacek Lawrynowicz
291] entry_SYSCALL_64_after_hwframe+0x71/0x79 Fixes: 465a3914b254 ("accel/ivpu: Add API for command queue create/destroy/submit") Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/ivpu_job.c | 33 - 1 file changed, 24 insertions(+), 9 deletions(-)

[PATCH] accel/ivpu: Increase state dump msg timeout

2025-04-25 Thread Jacek Lawrynowicz
+ Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/ivpu_hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/accel/ivpu/ivpu_hw.c b/drivers/accel/ivpu/ivpu_hw.c index ec9a3629da3a9..633160470c939 100644 --- a/drivers/accel/ivpu/ivpu_hw.c +++ b/drivers/accel

Re: [PATCH] accel/ivpu: Implement heartbeat-based TDR mechanism

2025-04-25 Thread Jacek Lawrynowicz
Hi, On 4/23/2025 4:23 PM, Jeff Hugo wrote: > On 4/23/2025 1:23 AM, Jacek Lawrynowicz wrote: >> Hi, >> >> On 4/18/2025 5:27 PM, Jeffrey Hugo wrote: >>> On 4/16/2025 4:25 AM, Maciej Falkowski wrote: >>>> From: Karol Wachowski >>>> >>&

Re: [PATCH] accel/ivpu: Correct DCT interrupt handling

2025-04-25 Thread Jacek Lawrynowicz
Applied to drm-misc-fixes On 4/16/2025 12:26 PM, Maciej Falkowski wrote: > From: Karol Wachowski > > Fix improper use of dct_active_percent field in DCT interrupt handler > causing DCT to never get enabled. Set dct_active_percent internally before > IPC to ensure correct driver value even if IPC

Re: [PATCH] accel/ivpu: Fix the D0i2 disable test mode

2025-04-25 Thread Jacek Lawrynowicz
Applied to drm-misc-fixes On 4/16/2025 12:26 PM, Maciej Falkowski wrote: > From: Andrzej Kacprowski > > Correct setup of D0i2 disable which was > by mistake set up to value 1 and use BIT(1) instead. > > Fixes: 011529fe8112 ("accel/ivpu: Implement D0i2 disable test mode") > Signed-off-by: Andrze

Re: [PATCH] accel/ivpu: Implement heartbeat-based TDR mechanism

2025-04-25 Thread Jacek Lawrynowicz
Applied to drm-misc-next On 4/16/2025 12:25 PM, Maciej Falkowski wrote: > From: Karol Wachowski > > Introduce a heartbeat-based Timeout Detection and Recovery (TDR) mechanism. > The enhancement aims to improve the reliability of device hang detection by > monitoring heartbeat updates. > > Each

Re: [PATCH] accel/ivpu: Implement heartbeat-based TDR mechanism

2025-04-23 Thread Jacek Lawrynowicz
Hi, On 4/18/2025 5:27 PM, Jeffrey Hugo wrote: > On 4/16/2025 4:25 AM, Maciej Falkowski wrote: >> From: Karol Wachowski >> >> Introduce a heartbeat-based Timeout Detection and Recovery (TDR) mechanism. >> The enhancement aims to improve the reliability of device hang detection by >> monitoring hea

Re: [PATCH] accel/ivpu: Add cmdq_id to job related logs

2025-04-11 Thread Jacek Lawrynowicz
Applied to drm-misc-fixes On 4/1/2025 5:59 PM, Maciej Falkowski wrote: > From: Karol Wachowski > > Add tracking of command queue ID in JOB debug message to improve > debugging capabilities. > > Signed-off-by: Karol Wachowski > Signed-off-by: Maciej Falkowski > --- > drivers/accel/ivpu/ivpu_j

Re: [PATCH 0/2] accel/ivpu: Expose NPU frequency into userspace

2025-04-11 Thread Jacek Lawrynowicz
Applied to drm-misc-fixes On 4/1/2025 5:59 PM, Maciej Falkowski wrote: > This patchset introduces the capability to measure the NPU frequency > and makes it accessible to a userspace via sysfs. The initial patch in the > series > addresses the inconsistency in retrieving the clock frequency from

Re: [PATCH] accel/ivpu: Update FW Boot API to version 3.28.3

2025-04-11 Thread Jacek Lawrynowicz
Applied with updated commit message to drm-misc-fixes On 4/1/2025 5:58 PM, Maciej Falkowski wrote: > From: Karol Wachowski > > This commit bumps FW Boot API to 3.28.3. > > Use new preemption buffer size fields from FW header added to > firmware boot API for preemption buffers allocations, > if

Re: [PATCH 2/2] accel/ivpu: Show NPU frequency in sysfs

2025-04-11 Thread Jacek Lawrynowicz
Reviewed-by: Jacek Lawrynowicz On 4/1/2025 5:59 PM, Maciej Falkowski wrote: > From: Andrzej Kacprowski > > Add sysfs files that show maximum and current > frequency of the NPU's data processing unit. > New sysfs entries: > - npu_max_frequency_mhz > - npu_current_fre

Re: [PATCH] accel/ivpu: Flush pending jobs of device's workqueues

2025-04-11 Thread Jacek Lawrynowicz
Applied with updated commit message to drm-misc-fixes On 4/1/2025 5:57 PM, Maciej Falkowski wrote: > Use flush_work() instead of cancel_work_sync() for driver > workqueues to guarantee that remaining pending work > will be handled. > > Fixes: bc3e5f48b7ee ("accel/ivpu: Use workqueue for IRQ handl

Re: [PATCH V1] accel/amdxdna: Fix incorrect size of ERT_START_NPU commands

2025-04-10 Thread Jacek Lawrynowicz
Reviewed-by: Jacek Lawrynowicz On 4/9/2025 11:00 PM, Lizhi Hou wrote: > When multiple ERT_START_NPU commands are combined in one buffer, the > buffer size calculation is incorrect. Also, the condition to make sure > the buffer size is not beyond 4K is also fixed. > > Fixes: aac24

Re: [PATCH] accel/ivpu: Test for imported buffers with drm_gem_is_imported()

2025-04-10 Thread Jacek Lawrynowicz
Applied to drm-misc-next On 4/8/2025 1:31 PM, Thomas Zimmermann wrote: > Instead of testing import_attach for imported GEM buffers, invoke > drm_gem_is_imported() to do the test. The helper tests the dma_buf > itself while import_attach is just an artifact of the import. Prepares > to make import_

Re: [PATCH] accel/ivpu: Test for imported buffers with drm_gem_is_imported()

2025-04-08 Thread Jacek Lawrynowicz
Reviewed-by: Jacek Lawrynowicz On 4/8/2025 1:31 PM, Thomas Zimmermann wrote: > Instead of testing import_attach for imported GEM buffers, invoke > drm_gem_is_imported() to do the test. The helper tests the dma_buf > itself while import_attach is just an artifact of the import. Prepares

Re: [PATCH] accel/ivpu: Fix warning in ivpu_ipc_send_receive_internal()

2025-04-05 Thread Jacek Lawrynowicz
Applied to drm-misc-fixes On 3/25/2025 12:42 PM, Maciej Falkowski wrote: > From: Jacek Lawrynowicz > > Warn if device is suspended only when runtime PM is enabled. > Runtime PM is disabled during reset/recovery and it is not an error > to use ivpu_ipc_send_receive_internal(

Re: [PATCH 0/2] PM fixes in Metric Steamer code

2025-03-31 Thread Jacek Lawrynowicz
ing to warn for suspend status only if > the runtime PM is enabled. > > Jacek Lawrynowicz (2): > accel/ivpu: Fix deadlock in ivpu_ms_cleanup() > accel/ivpu: Fix PM related deadlocks in MS IOCTLs > > drivers/accel/ivpu/ivpu_debugfs.c | 4 ++-- >

Re: [PATCH 1/2] accel/ivpu: Fix deadlock in ivpu_ms_cleanup()

2025-03-28 Thread Jacek Lawrynowicz
On 3/27/2025 6:38 PM, Lizhi Hou wrote: > > On 3/26/25 01:06, Jacek Lawrynowicz wrote: >> Hi, >> >> On 3/25/2025 9:50 PM, Lizhi Hou wrote: >>> On 3/25/25 04:43, Maciej Falkowski wrote: >>>> From: Jacek Lawrynowicz >>>> >>>>

Re: [PATCH 1/3] accel/ivpu: pages_use_count is now a refcount_t

2025-03-28 Thread Jacek Lawrynowicz
Hi, On 3/27/2025 1:32 PM, Jani Nikula wrote: > On Thu, 27 Mar 2025, Jacek Lawrynowicz > wrote: >> Hi, >> >> On 3/27/2025 12:37 PM, Dmitry Osipenko wrote: >>> On 3/27/25 14:30, Jani Nikula wrote: >>>> On Thu, 27 Mar 2025, Boris Brezillon wrote: >

Re: [PATCH 1/3] accel/ivpu: pages_use_count is now a refcount_t

2025-03-27 Thread Jacek Lawrynowicz
rm_gem_shmem_object::pages_use_count but accel drivers were left >>> behind. >>> >>> Fixes: 051b6646d36d ("drm/shmem-helper: Use refcount_t for pages_use_count") >>> Signed-off-by: Boris Brezillon >>> Cc: Dmitry Osipenko >>> Cc: Jacek

Re: [PATCH 1/2] accel/ivpu: Fix deadlock in ivpu_ms_cleanup()

2025-03-26 Thread Jacek Lawrynowicz
Hi, On 3/25/2025 9:50 PM, Lizhi Hou wrote: > > On 3/25/25 04:43, Maciej Falkowski wrote: >> From: Jacek Lawrynowicz >> >> Fix deadlock in ivpu_ms_cleanup() by preventing runtime resume after >> file_priv->ms_lock is acquired. >> >> During a failu

Re: [PATCH] drm/gem-shmem: Optimize DMA mapping for exported buffers

2025-03-25 Thread Jacek Lawrynowicz
Hi, On 3/25/2025 3:14 PM, Thomas Zimmermann wrote: > Hi > > Am 25.03.25 um 14:53 schrieb Christian König: >> Am 25.03.25 um 14:37 schrieb Jacek Lawrynowicz: >>> Use DMA_ATTR_SKIP_CPU_SYNC flag for exported buffers during DMA mapping. >>> The same flag is al

Re: [PATCH] drm/gem-shmem: Optimize DMA mapping for exported buffers

2025-03-25 Thread Jacek Lawrynowicz
Hi, On 3/25/2025 2:53 PM, Christian König wrote: > Am 25.03.25 um 14:37 schrieb Jacek Lawrynowicz: >> Use DMA_ATTR_SKIP_CPU_SYNC flag for exported buffers during DMA mapping. >> The same flag is already used by drm_gem_map_dma_buf() for imported >> buffers. >> >>

[PATCH] drm/gem-shmem: Optimize DMA mapping for exported buffers

2025-03-25 Thread Jacek Lawrynowicz
Use DMA_ATTR_SKIP_CPU_SYNC flag for exported buffers during DMA mapping. The same flag is already used by drm_gem_map_dma_buf() for imported buffers. Signed-off-by: Jacek Lawrynowicz --- drivers/gpu/drm/drm_gem_shmem_helper.c | 8 ++-- include/drm/drm_gem.h | 12

Re: firmware requirements

2025-03-14 Thread Jacek Lawrynowicz
Hi, On 3/4/2025 6:06 PM, Simona Vetter wrote: > Hi Jacek! > > Bit late reply, was sick last week and still recovering from missed mails. > > On Thu, Feb 20, 2025 at 11:50:10AM +0100, Jacek Lawrynowicz wrote: >> On 2/19/2025 10:01 PM, Dave Airlie wrote: >>> I

[PATCH] docs: driver-api: firmware: clarify userspace requirements

2025-03-14 Thread Jacek Lawrynowicz
The guidelines mention that firmware updates can't break the kernel, but it doesn't state directly that they can't break userspace programs. Make it explicit that firmware updates cannot break UAPI. Signed-off-by: Jacek Lawrynowicz --- .../driver-api/firmware/firmware-usage

Re: [PATCH V2] accel/amdxdna: Check interrupt register before mailbox_rx_worker exits

2025-02-27 Thread Jacek Lawrynowicz
Reviewed-by: Jacek Lawrynowicz On 2/26/2025 5:18 PM, Lizhi Hou wrote: > There is a timeout failure been found during stress tests. If the firmware > generates a mailbox response right after driver clears the mailbox channel > interrupt register, the hardware will not generate an inte

Re: [PATCH] accel/amdxdna: Check interrupt register before mailbox_rx_worker exits

2025-02-26 Thread Jacek Lawrynowicz
Hi, On 2/25/2025 6:26 PM, Lizhi Hou wrote: > There is a timeout failure been found during stress tests. If the firmware > generates a mailbox response right after driver clears the mailbox channel > interrupt register, the hardware will not generate an interrupt for the > response. This causes the

Re: [PATCH v2] drm/i915: Add VM_DONTEXPAND to exported buffers

2025-02-20 Thread Jacek Lawrynowicz
Hi, On 2/20/2025 2:53 PM, Tvrtko Ursulin wrote: > > On 20/02/2025 13:14, Jacek Lawrynowicz wrote: >> Hi, >> >> On 2/19/2025 11:55 AM, Joonas Lahtinen wrote: >>> Quoting Jacek Lawrynowicz (2025-02-11 17:57:03) >>>> Hi, can I submit this to drm-misc or

Re: [PATCH v2] drm/i915: Add VM_DONTEXPAND to exported buffers

2025-02-20 Thread Jacek Lawrynowicz
Hi, On 2/19/2025 11:55 AM, Joonas Lahtinen wrote: > Quoting Jacek Lawrynowicz (2025-02-11 17:57:03) >> Hi, can I submit this to drm-misc or should someone commit this to drm-intel? > > Is the this happening in linux-next or is it still completely out-of-tree? The patch is not

Re: firmware requirements

2025-02-20 Thread Jacek Lawrynowicz
Hi, On 2/19/2025 10:01 PM, Dave Airlie wrote: > I'd just like to remind everyone of the firmware requirements for > vendors that control their firmware and the driver upstreams: > > https://docs.kernel.org/driver-api/firmware/firmware-usage-guidelines.html > > Intel VPU it seems like you are not

[PATCH] drm/xe: Fix exporting xe buffers multiple times

2025-02-18 Thread Jacek Lawrynowicz
f-by: Tomasz Rusinowicz Signed-off-by: Jacek Lawrynowicz --- drivers/gpu/drm/xe/xe_bo.h | 2 -- drivers/gpu/drm/xe/xe_dma_buf.c | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/xe/xe_bo.h b/drivers/gpu/drm/xe/xe_bo.h index d9386ab031404..43bf6f140d40d 10064

Re: [PATCH 1/6] accel/ivpu: Add missing locks around mmu queues

2025-02-17 Thread Jacek Lawrynowicz
Hi, On 2/14/2025 5:41 PM, Jeffrey Hugo wrote: > On 2/4/2025 1:46 AM, Jacek Lawrynowicz wrote: >> From: Andrzej Kacprowski >> >> Multiple threads were accessing mmu cmd queue simultaneously >> causing sporadic failures in ivpu_mmu_cmdq_sync() function. >> Pro

Re: [PATCH 6/6] accel/ivpu: Implement D0i2 disable test mode

2025-02-17 Thread Jacek Lawrynowicz
Hi, On 2/14/2025 6:04 PM, Jeffrey Hugo wrote: > On 2/4/2025 1:46 AM, Jacek Lawrynowicz wrote: >> From: Karol Wachowski >> >> Add power_profile firmware boot param and set it to 0 by default >> which is default FW power profile. > > I don't think that patc

Re: [PATCH 2/6] accel/ivpu: Prevent runtime suspend during context abort work

2025-02-17 Thread Jacek Lawrynowicz
Hi, On 2/14/2025 5:49 PM, Jeffrey Hugo wrote: > On 2/4/2025 1:46 AM, Jacek Lawrynowicz wrote: >> From: Andrzej Kacprowski >> >> Increment the runtime PM counter when entering >> ivpu_context_abort_work_fn() to prevent the device >> from suspending while the funct

Re: [PATCH 0/6] accel/ivpu: Changes for 6.15 2025-02-04

2025-02-12 Thread Jacek Lawrynowicz
like this to be incredibly valuable and I am eager to comply with the guidelines. I just need some patience and guidance as I navigate through this. Thank you for your understanding and support. Regards, Jacek > Best regards > Thomas > > [1] https://patchwork.freedesktop.org/series/143182

Re: [PATCH v2] drm/i915: Add VM_DONTEXPAND to exported buffers

2025-02-11 Thread Jacek Lawrynowicz
Hi, can I submit this to drm-misc or should someone commit this to drm-intel? On 1/14/2025 9:23 AM, Jacek Lawrynowicz wrote: > drm_gem_mmap_obj() expects VM_DONTEXPAND flag to be set after mmap > callback is executed. Set this flag at the end of i915_gem_dmabuf_mmap() > to prevent WARN o

Re: [PATCH v2] accel/amdxdna: Add missing include linux/slab.h

2025-02-11 Thread Jacek Lawrynowicz
Reviewed-by: Jacek Lawrynowicz On 2/11/2025 2:53 AM, Su Hui wrote: > When compiling without CONFIG_IA32_EMULATION, there can be some errors: > > drivers/accel/amdxdna/amdxdna_mailbox.c: In function ‘mailbox_release_msg’: > drivers/accel/amdxdna/amdxdna_mailbox.c:197:2: err

Re: [PATCH 0/6] accel/ivpu: Changes for 6.15 2025-02-04

2025-02-10 Thread Jacek Lawrynowicz
Applied to drm-misc-next On 2/4/2025 9:46 AM, Jacek Lawrynowicz wrote: > Add possibility to import single buffer into multiple contexts, > fix locking when aborting contexts and add some debug features. > > Andrzej Kacprowski (2): > accel/ivpu: Add missing locks around mmu q

Re: [PATCH] accel/amdxdna: Add missing include linux/slab.h

2025-02-10 Thread Jacek Lawrynowicz
Hi, please move the header to the include block above an keep it sorted: #include -->#include <-- #include On 2/8/2025 9:05 AM, Su Hui wrote: > When compiling without CONFIG_IA32_EMULATION, there are some errors: > > drivers/accel/amdxdna/amdxdna_mailbox.c: In function ‘mailbox_release_msg’:

[PATCH 5/6] accel/ivpu: Add test modes to toggle clock relinquish disable

2025-02-04 Thread Jacek Lawrynowicz
From: Karol Wachowski Add IVPU_TEST_MODE_CLK_RELINQ_[DISABLE|ENABLE] that overrides workaround for disabling clock relinquish for testing purposes. Reviewed-by: Jacek Lawrynowicz Signed-off-by: Karol Wachowski Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/ivpu_drv.h | 2

[PATCH 6/6] accel/ivpu: Implement D0i2 disable test mode

2025-02-04 Thread Jacek Lawrynowicz
Lawrynowicz Signed-off-by: Karol Wachowski Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/ivpu_drv.h | 2 ++ drivers/accel/ivpu/ivpu_fw.c | 4 drivers/accel/ivpu/ivpu_hw.c | 4 3 files changed, 10 insertions(+) diff --git a/drivers/accel/ivpu/ivpu_drv.h b/drivers/accel/ivpu

[PATCH 2/6] accel/ivpu: Prevent runtime suspend during context abort work

2025-02-04 Thread Jacek Lawrynowicz
From: Andrzej Kacprowski Increment the runtime PM counter when entering ivpu_context_abort_work_fn() to prevent the device from suspending while the function is executing. Reviewed-by: Jacek Lawrynowicz Signed-off-by: Andrzej Kacprowski Signed-off-by: Jacek Lawrynowicz --- drivers/accel

[PATCH 4/6] accel/ivpu: Allow to import single buffer into multiple contexts

2025-02-04 Thread Jacek Lawrynowicz
import now creates a new instance of ivpu_bo object that shares the same sg_table but have separate MMU mappings. Reviewed-by: Jacek Lawrynowicz Signed-off-by: Tomasz Rusinowicz Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/ivpu_drv.c | 2 +- drivers/accel/ivpu/ivpu_gem.c | 43

[PATCH 3/6] accel/ivpu: Add debugfs interface for setting HWS priority bands

2025-02-04 Thread Jacek Lawrynowicz
-tuning. Reviewed-by: Jacek Lawrynowicz Signed-off-by: Karol Wachowski Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/ivpu_debugfs.c | 84 +++ drivers/accel/ivpu/ivpu_hw.c | 21 drivers/accel/ivpu/ivpu_hw.h | 5 ++ drivers/accel/ivpu

[PATCH 1/6] accel/ivpu: Add missing locks around mmu queues

2025-02-04 Thread Jacek Lawrynowicz
From: Andrzej Kacprowski Multiple threads were accessing mmu cmd queue simultaneously causing sporadic failures in ivpu_mmu_cmdq_sync() function. Protect critical code with mmu mutex. Reviewed-by: Jacek Lawrynowicz Signed-off-by: Andrzej Kacprowski Signed-off-by: Jacek Lawrynowicz

[PATCH 0/6] accel/ivpu: Changes for 6.15 2025-02-04

2025-02-04 Thread Jacek Lawrynowicz
Add possibility to import single buffer into multiple contexts, fix locking when aborting contexts and add some debug features. Andrzej Kacprowski (2): accel/ivpu: Add missing locks around mmu queues accel/ivpu: Prevent runtime suspend during context abort work Karol Wachowski (3): ccel/ivp

Re: [PATCH 0/6] accel/ivpu: Changes for 6.15

2025-02-03 Thread Jacek Lawrynowicz
Applied to drm-misc-next On 1/29/2025 1:56 PM, Jacek Lawrynowicz wrote: > Most notable is the addition of hardware fault injection support which allows > to test error handling paths in the driver. > > Jacek Lawrynowicz (2): > accel/ivpu: Add support for hardware fault injection

Re: [PATCH 1/6] accel/ivpu: Add support for hardware fault injection

2025-02-03 Thread Jacek Lawrynowicz
On 1/31/2025 7:41 PM, Jeffrey Hugo wrote: > On 1/29/2025 5:56 AM, Jacek Lawrynowicz wrote: >> This commit introduces the capability to simulate hardware faults for > > Nit - "This commit" is redundant. Sure, removed.

Re: [PATCH 0/3] accel/ivpu: Fixes for 6.14

2025-02-03 Thread Jacek Lawrynowicz
Applied to drm-misc-fixes On 1/29/2025 1:40 PM, Jacek Lawrynowicz wrote: > Stability fixes focused around power management and error handling. > > Jacek Lawrynowicz (3): > accel/ivpu: Fix error handling in ivpu_boot() > accel/ivpu: Clear runtime_error after pm_runtime

Re: [PATCH 4/6] accel/ivpu: Turn on HWS by default on all platforms

2025-02-03 Thread Jacek Lawrynowicz
Yes and there is a check for FW version in ivpu_fw_sched_mode_select() that verifies this. It is just above the changed lines from this patch. On 1/31/2025 7:47 PM, Jeffrey Hugo wrote: > On 1/29/2025 5:56 AM, Jacek Lawrynowicz wrote: >> From: Karol Wachowski >> >> Hardwar

[PATCH 6/6] accel/ivpu: Move recovery work to system_unbound_wq

2025-01-29 Thread Jacek Lawrynowicz
From: Karol Wachowski Recovery work doesn't need to be bound to any specific CPU, so move it to unbound workqueue to improve execution time and system latency. Reviewed-by: Jacek Lawrynowicz Signed-off-by: Karol Wachowski Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/ivpu_pm.

[PATCH 3/6] accel/ivpu: Fix missing MMU events if file_priv is unbound

2025-01-29 Thread Jacek Lawrynowicz
: Jacek Lawrynowicz Signed-off-by: Karol Wachowski Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/ivpu_job.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/accel/ivpu/ivpu_job.c b/drivers/accel/ivpu/ivpu_job.c index 3c162ac41a1dc..c1013f511efa6 100644

[PATCH 5/6] accel/ivpu: Enable recovery and adjust timeouts for fpga

2025-01-29 Thread Jacek Lawrynowicz
From: Tomasz Rusinowicz Recovery now works on fpga. JSM state dump timeout needs to be really long for the new fpga model releases. Enable punit on fpga. Reviewed-by: Jacek Lawrynowicz Signed-off-by: Tomasz Rusinowicz Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/ivpu_hw.c | 10

[PATCH 4/6] accel/ivpu: Turn on HWS by default on all platforms

2025-01-29 Thread Jacek Lawrynowicz
From: Karol Wachowski Hardware scheduling (HWS) is supposed to be supported on all existing platform with recent FW including pre-silicon ones. Turn on HWS by default. Reviewed-by: Jacek Lawrynowicz Signed-off-by: Karol Wachowski Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu

[PATCH 1/6] accel/ivpu: Add support for hardware fault injection

2025-01-29 Thread Jacek Lawrynowicz
and shutdown, IPC message handling and more. Fault injection can be enabled using debugfs or a module parameter. Reviewed-by: Maciej Falkowski Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/ivpu_debugfs.c | 5 +++ drivers/accel/ivpu/ivpu_hw.c| 14 +++ drivers/accel/ivpu

[PATCH 2/6] accel/ivpu: Update last_busy in IRQ handler

2025-01-29 Thread Jacek Lawrynowicz
Call pm_runtime_mark_last_busy() in top half of IRQ handler to prevent device from being runtime suspended before bottom half is executed on a workqueue. Reviewed-by: Karol Wachowski Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/ivpu_hw.c | 9 ++--- 1 file changed, 6 insertions

[PATCH 0/6] accel/ivpu: Changes for 6.15

2025-01-29 Thread Jacek Lawrynowicz
Most notable is the addition of hardware fault injection support which allows to test error handling paths in the driver. Jacek Lawrynowicz (2): accel/ivpu: Add support for hardware fault injection accel/ivpu: Update last_busy in IRQ handler Karol Wachowski (3): accel/ivpu: Fix missing MMU

[PATCH 1/3] accel/ivpu: Fix error handling in ivpu_boot()

2025-01-29 Thread Jacek Lawrynowicz
Ensure IRQs and IPC are properly disabled if HW sched or DCT initialization fails. Fixes: cc3c72c7e610 ("accel/ivpu: Refactor failure diagnostics during boot") Cc: # v6.13+ Reviewed-by: Karol Wachowski Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/ivpu_drv.c | 8 ++

[PATCH 3/3] accel/ivpu: Fix error handling in recovery/reset

2025-01-29 Thread Jacek Lawrynowicz
functions for better code readability. Fixes: 27d19268cf39 ("accel/ivpu: Improve recovery and reset support") Cc: # v6.8+ Reviewed-by: Maciej Falkowski Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/ivpu_pm.c | 79 1 file changed, 43

[PATCH 2/3] accel/ivpu: Clear runtime_error after pm_runtime_resume_and_get() fails

2025-01-29 Thread Jacek Lawrynowicz
. Fixes: 7d4b4c74432d ("accel/ivpu: Remove suspend_reschedule_counter") Cc: # v6.11+ Reviewed-by: Maciej Falkowski Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/ivpu_pm.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/accel/ivpu/ivpu_pm.c b/drivers/ac

[PATCH 0/3] accel/ivpu: Fixes for 6.14

2025-01-29 Thread Jacek Lawrynowicz
Stability fixes focused around power management and error handling. Jacek Lawrynowicz (3): accel/ivpu: Fix error handling in ivpu_boot() accel/ivpu: Clear runtime_error after pm_runtime_resume_and_get() fails accel/ivpu: Fix error handling in recovery/reset drivers/accel/ivpu

Re: [PATCH] MAINTAINERS: Update intel_vpu maintainer list

2025-01-17 Thread Jacek Lawrynowicz
Applied to drm-misc-next On 1/14/2025 9:44 AM, Jacek Lawrynowicz wrote: > Slawek moved to another project and Maciej will be replacing him. > > Signed-off-by: Jacek Lawrynowicz > --- > MAINTAINERS | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > di

[PATCH] MAINTAINERS: Update intel_vpu maintainer list

2025-01-14 Thread Jacek Lawrynowicz
Slawek moved to another project and Maciej will be replacing him. Signed-off-by: Jacek Lawrynowicz --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 33fe500bf3ae6..8f2a266a6c404 100644 --- a/MAINTAINERS +++ b/MAINTAINERS

[PATCH v2] drm/i915: Add VM_DONTEXPAND to exported buffers

2025-01-14 Thread Jacek Lawrynowicz
f Karas Signed-off-by: Jacek Lawrynowicz --- v2: - Added Fixes tag v1 link: https://lore.kernel.org/r/20250108105346.240103-1-jacek.lawrynowicz%40linux.intel.com --- drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/i915/gem/i915_gem_d

Re: [PATCH] drm/i915: Add VM_DONTEXPAND to exported buffers

2025-01-09 Thread Jacek Lawrynowicz
bit more on which testcase or usecase this pops up with? > > The check has been in place since 2019 so quite surprising that it's > only popping up now. > > Regards, Joonas > > Quoting Jacek Lawrynowicz (2025-01-08 12:53:46) >> drm_gem_mmap_obj() expect

Re: [PATCH] drm/i915: Add VM_DONTEXPAND to exported buffers

2025-01-09 Thread Jacek Lawrynowicz
Hi, On 1/9/2025 12:22 PM, Krzysztof Karas wrote: > Hi Jacek, > > On 2025-01-08 at 11:53:46 +0100, Jacek Lawrynowicz wrote: >> drm_gem_mmap_obj() expects VM_DONTEXPAND flag to be set after mmap >> callback is executed. Set this flag at the end of i915_gem_dmabuf_mmap() >&

Re: [PATCH 00/14] accel/ivpu: Changes for 6.14

2025-01-09 Thread Jacek Lawrynowicz
Applied to drm-misc-next On 1/7/2025 6:32 PM, Maciej Falkowski wrote: > This patchset contains latest changes for Intel NPU driver > including enabling HWS by default, adding memory utilization, > MMU optimizations, and others. > > Jacek Lawrynowicz (1): > accel/ivpu: Enable

Re: [PATCH 04/14] accel/ivpu: Expose NPU memory utilization info in sysfs

2025-01-09 Thread Jacek Lawrynowicz
Reviewed-by: Jacek Lawrynowicz On 1/7/2025 6:32 PM, Maciej Falkowski wrote: > Expose NPU memory utilization info in sysfs in bytes > to show total memory used by NPU (FW + runtime). > > Signed-off-by: Maciej Falkowski > --- > drivers/accel/ivpu

Re: [PATCH 13/14] accel/ivpu: Add platform detection for presilicon

2025-01-09 Thread Jacek Lawrynowicz
Reviewed-by: Jacek Lawrynowicz On 1/7/2025 6:32 PM, Maciej Falkowski wrote: > From: Karol Wachowski > > Use highest buttress VPU_STATUS register bits(15:13) that encode > platform type as follows: > 0 - Silicon > 2 - Simics > 3 - FPGA > 4 - Hy

Re: [PATCH 12/14] accel/ivpu: Add handling of VPU_JSM_STATUS_MVNCI_CONTEXT_VIOLATION_HW

2025-01-09 Thread Jacek Lawrynowicz
Reviewed-by: Jacek Lawrynowicz On 1/7/2025 6:32 PM, Maciej Falkowski wrote: > From: Karol Wachowski > > Mark as invalid context of a job that returned HW context violation > error and queue work that aborts jobs from faulty context. > Add engine reset to the context abort thread

Re: [PATCH 11/14] accel/ivpu: Fix locking order in ivpu_job_submit

2025-01-09 Thread Jacek Lawrynowicz
Reviewed-by: Jacek Lawrynowicz On 1/7/2025 6:32 PM, Maciej Falkowski wrote: > From: Karol Wachowski > > Fix deadlock in job submission and abort handling. > When a thread aborts currently executing jobs due to a fault, > it first locks the global lock protecting submitted_jobs (

Re: [PATCH 10/14] accel/ivpu: Fix locking order in ivpu_cmdq_destroy_ioctl

2025-01-09 Thread Jacek Lawrynowicz
Reviewed-by: Jacek Lawrynowicz On 1/7/2025 6:32 PM, Maciej Falkowski wrote: > From: Karol Wachowski > > Fix deadlock caused by inversed locking order in ivpu_job_submit() > and ivpu_cmdq_destroy_ioctl(). Both functions operate locking > file_priv->lock and submitted_jobs

Re: [PATCH 09/14] accel/ivpu: Set command queue management capability based on HWS

2025-01-09 Thread Jacek Lawrynowicz
Reviewed-by: Jacek Lawrynowicz On 1/7/2025 6:32 PM, Maciej Falkowski wrote: > From: Karol Wachowski > > Control explicit command queue management capability bit based on > scheduling mode. Capability will be available only when hardware > scheduling mode is set. > >

Re: [PATCH 08/14] accel/ivpu: Fix missing MMU events from reserved SSID

2025-01-09 Thread Jacek Lawrynowicz
Reviewed-by: Jacek Lawrynowicz On 1/7/2025 6:32 PM, Maciej Falkowski wrote: > From: Karol Wachowski > > Generate recovery when fault from reserved context is detected. > Add Abort (A) bit to reserved (1) SSID to ensure NPU also receives a fault. > > There is no way to creat

Re: [PATCH 07/14] accel/ivpu: Move parts of MMU event IRQ handling to thread handler

2025-01-09 Thread Jacek Lawrynowicz
Reviewed-by: Jacek Lawrynowicz On 1/7/2025 6:32 PM, Maciej Falkowski wrote: > From: Karol Wachowski > > To prevent looping infinitely in MMU event handler we stop > generating new events by removing 'R' (record) bit from context > descriptor, but to ensure this cha

Re: [PATCH 06/14] accel/ivpu: Dump only first MMU fault from single context

2025-01-09 Thread Jacek Lawrynowicz
Reviewed-by: Jacek Lawrynowicz On 1/7/2025 6:32 PM, Maciej Falkowski wrote: > From: Karol Wachowski > > Stop dumping consecutive faults from an already faulty context immediately, > instead of waiting for the context abort thread handler (IRQ handler bottom > half) to abort curr

Re: [PATCH 05/14] accel/ivpu: Use workqueue for IRQ handling

2025-01-09 Thread Jacek Lawrynowicz
Reviewed-by: Jacek Lawrynowicz On 1/7/2025 6:32 PM, Maciej Falkowski wrote: > Convert IRQ bottom half from the thread handler into workqueue. > This increases a stability in rare scenarios where driver on > debugging/hardening kernels processes IRQ too slow and misses > some interrup

Re: [PATCH 03/14] accel/ivpu: Abort all jobs after command queue unregister

2025-01-09 Thread Jacek Lawrynowicz
Reviewed-by: Jacek Lawrynowicz On 1/7/2025 6:32 PM, Maciej Falkowski wrote: > From: Karol Wachowski > > With hardware scheduler it is not expected to receive JOB_DONE > notifications from NPU FW for the jobs aborted due to command queue destroy > JSM command. > > Rem

Re: [PATCH 02/14] accel/ivpu: Add API for command queue create/destroy/submit

2025-01-09 Thread Jacek Lawrynowicz
Reviewed-by: Jacek Lawrynowicz On 1/7/2025 6:32 PM, Maciej Falkowski wrote: > From: Karol Wachowski > > Implement support for explicit command queue management. > To allow more flexible control over command queues add capabilities > to create, destroy and submit jobs to specific

Re: [PATCH 01/14] accel/ivpu: Separate DB ID and CMDQ ID allocations from CMDQ allocation

2025-01-09 Thread Jacek Lawrynowicz
This will allows -> This will allow Reviewed-by: Jacek Lawrynowicz On 1/7/2025 6:32 PM, Maciej Falkowski wrote: > From: Karol Wachowski > > Move doorbell ID and command queue ID XArray allocations from command > queue memory allocation function. This will allows IDs allocatio

Re: [PATCH 04/14] accel/ivpu: Expose NPU memory utilization info in sysfs

2025-01-09 Thread Jacek Lawrynowicz
Hi, On 1/8/2025 8:53 PM, Lizhi Hou wrote: > > On 1/7/25 09:32, Maciej Falkowski wrote: >> Expose NPU memory utilization info in sysfs in bytes >> to show total memory used by NPU (FW + runtime). >> >> Signed-off-by: Maciej Falkowski >> --- >>   drivers/accel/ivpu/ivpu_sysfs.c | 30 ++

Re: [PATCH 00/14] accel/ivpu: Changes for 6.14

2025-01-09 Thread Jacek Lawrynowicz
Hi, On 1/8/2025 7:19 PM, Simona Vetter wrote: > On Tue, Jan 07, 2025 at 06:32:23PM +0100, Maciej Falkowski wrote: >> This patchset contains latest changes for Intel NPU driver >> including enabling HWS by default, adding memory utilization, >> MMU optimizations, and others. > > Note that we gener

[PATCH] drm/i915: Add VM_DONTEXPAND to exported buffers

2025-01-08 Thread Jacek Lawrynowicz
0246 R12: 7fff157dee70 [ 283.623331] R13: 644e2fb203f8 R14: 7fff157deef0 R15: 7fff157deeb0 [ 283.62] [ 283.62] ---[ end trace ]--- Signed-off-by: Jacek Lawrynowicz --- drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c | 1 + 1 file changed, 1 insert

Re: [PATCH 2/7] bus: mhi: host: Add a policy to enable image transfer via BHIe in PBL

2025-01-07 Thread Jacek Lawrynowicz
Reviewed-by: Jacek Lawrynowicz On 12/13/2024 10:33 PM, Jeffrey Hugo wrote: > From: Matthew Leung > > Currently, mhi host only performs firmware transfer via BHI in PBL and > BHIe from SBL. To support BHIe transfer directly from PBL, a policy > needs to be added. > > W

Re: [PATCH 1/7] bus: mhi: host: Refactor BHI/BHIe based firmware loading

2025-01-07 Thread Jacek Lawrynowicz
Hi, On 12/13/2024 10:33 PM, Jeffrey Hugo wrote: > From: Matthew Leung > > Refactor the firmware loading code to have distinct helper functions for > BHI and BHIe operations. This lays the foundation for separating the > firmware loading protocol from the firmware being loaded and the EE it > is

Re: [PATCH] accel/qaic: Change aic100_image_table definition

2025-01-07 Thread Jacek Lawrynowicz
Reviewed-by: Jacek Lawrynowicz On 12/13/2024 7:51 PM, Jeffrey Hugo wrote: > From: Youssef Samir > > aic100_image_table is currently defined as a "const char *" array, > this can potentially lead to the accidental modification of the > pointers inside. Also, checkpatch

Re: [PATCH 0/3] accel/ivpu: Fixes for 6.13

2024-12-19 Thread Jacek Lawrynowicz
Applied to drm-misc-fixes On 12/10/2024 2:09 PM, Jacek Lawrynowicz wrote: > This patchset addresses several issues in the accel/ivpu module, > including fixing a general protection fault in ivpu_bo_list(). > > Jacek Lawrynowicz (3): > accel/ivpu: Fix general protection fault

[PATCH 1/3] accel/ivpu: Fix general protection fault in ivpu_bo_list()

2024-12-10 Thread Jacek Lawrynowicz
Check if ctx is not NULL before accessing its fields. Fixes: 37dee2a2f433 ("accel/ivpu: Improve buffer object debug logs") Cc: # v6.8 Signed-off-by: Jacek Lawrynowicz Reviewed-by: Karol Wachowski --- drivers/accel/ivpu/ivpu_gem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletio

[PATCH 3/3] accel/ivpu: Fix WARN in ivpu_ipc_send_receive_internal()

2024-12-10 Thread Jacek Lawrynowicz
c: # v6.7+ Signed-off-by: Jacek Lawrynowicz Reviewed-by: Karol Wachowski --- 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.c index dbc0711e28d13..949f4233946c6 100644 --- a/drivers/

[PATCH 2/3] accel/ivpu: Fix memory leak in ivpu_mmu_reserved_context_init()

2024-12-10 Thread Jacek Lawrynowicz
Add appropriate error handling to ensure all allocated resources are released upon encountering an error. Fixes: a74f4d991352 ("accel/ivpu: Defer MMU root page table allocation") Cc: Karol Wachowski Signed-off-by: Jacek Lawrynowicz Reviewed-by: Karol Wachowski --- drivers/

  1   2   3   4   5   6   >