Re: [git pull] drm fixes for 6.16-rc8/final (resend in txt for sure)

2025-07-24 Thread Jacek Lawrynowicz
Hi, On 7/24/2025 3:59 AM, Linus Torvalds wrote: > On Wed, 23 Jul 2025 at 17:40, Dave Airlie wrote: >> >> (this time for sure, plain text). > > I knew you could do it! Third time's the charm! > > I hope I don't need to worry about the branch contents as much as I > apparently need to worry about

Re: [PATCH] MAINTAINERS: Add new intel_vpu maintainer

2025-07-23 Thread Jacek Lawrynowicz
Applied to drm-misc-next On 7/22/2025 12:04 PM, Jacek Lawrynowicz wrote: > Add Karol as a new intel_vpu maintainer. > > Signed-off-by: Jacek Lawrynowicz > --- > MAINTAINERS | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/MAINTAINERS b/MAINTAINERS > index 7

[PATCH] MAINTAINERS: Add new intel_vpu maintainer

2025-07-22 Thread Jacek Lawrynowicz
Add Karol as a new intel_vpu maintainer. Signed-off-by: Jacek Lawrynowicz --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 7e7515a412e9d..22dc118f43d89 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -7386,6 +7386,7 @@ F:include/linux

Re: [PATCH V2] accel/amdxdna: Support user space allocated buffer

2025-07-22 Thread Jacek Lawrynowicz
Reviewed-by: Jacek Lawrynowicz On 7/16/2025 6:44 PM, Lizhi Hou wrote: > Enhance DRM_IOCTL_AMDXDNA_CREATE_BO to accept user space allocated > buffer pointer. The buffer pages will be pinned in memory. Unless > the CAP_IPC_LOCK is enabled for the application process, the total > pinne

Re: [PATCH] accel/amdxdna: Delete pci_free_irq_vectors()

2025-07-22 Thread Jacek Lawrynowicz
Reviewed-by: Jacek Lawrynowicz On 7/19/2025 8:33 AM, Salah Triki wrote: > The device is managed so pci_free_irq_vectors() is called automatically > no need to do it manually. > > Signed-off-by: Salah Triki > --- > drivers/accel/amdxdna/aie2_pci.c | 8 ++-- > 1 file

Re: [PATCH] accel/ivpu: Remove lockdep_assert_irqs_disabled()

2025-07-22 Thread Jacek Lawrynowicz
Reviewed-by: Jacek Lawrynowicz On 7/15/2025 6:59 PM, Maarten Lankhorst wrote: > This breaks on PREEMPT_RT, and should be unneeded since > lockdep can track irq disabled status itself. > > Signed-off-by: Maarten Lankhorst > --- > drivers/accel/ivpu/ivpu_ipc.c | 1 - &g

Re: [PATCH V1] accel/amdxdna: Support user space allocated buffer

2025-07-14 Thread Jacek Lawrynowicz
Hi, This looks very interesting. It's a clever way of adding userptr on top of existing gem code. On 7/7/2025 9:38 PM, Lizhi Hou wrote: > Enhance DRM_IOCTL_AMDXDNA_CREATE_BO to accept user space allocated > buffer pointer. The buffer pages will be pinned in memory. Unless > the CAP_IPC_LOCK is e

Re: [PATCH 01/80] accel/ivpu: Remove redundant pm_runtime_mark_last_busy() calls

2025-07-07 Thread Jacek Lawrynowicz
Reviewed-by: Jacek Lawrynowicz On 7/4/2025 9:53 AM, Sakari Ailus wrote: > pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), > pm_runtime_autosuspend() and pm_request_autosuspend() now include a call > to pm_runtime_mark_last_busy(). Remove the now-reduntant explici

Re: [PATCH] accel/ivpu: Add turbo flag to the DRM_IVPU_CMDQ_CREATE ioctl

2025-06-16 Thread Jacek Lawrynowicz
Applied to drm-misc-next On 6/5/2025 6:20 PM, Maciej Falkowski wrote: > From: Andrzej Kacprowski > > Introduces a new parameter to the DRM_IVPU_CMDQ_CREATE ioctl, > enabling turbo mode for jobs submitted via the command queue. > Turbo mode allows jobs to run at higher frequencies, > potentially

Re: [PATCH] accel/ivpu: Add initial Wildcat Lake support

2025-06-16 Thread Jacek Lawrynowicz
Applied to drm-misc-next On 6/5/2025 6:19 PM, Maciej Falkowski wrote: > Add support for Wildcat Lake (WCL) CPUs. > Wildcat Lake contains NPU5 just like Panther Lake > hence the initial support is very simple and adds > only PCI IDs. > > Signed-off-by: Maciej Falkowski > --- > drivers/accel/ivpu

Re: [PATCH] accel/ivpu: Add turbo flag to the DRM_IVPU_CMDQ_CREATE ioctl

2025-06-13 Thread Jacek Lawrynowicz
Hi, On 6/12/2025 3:42 PM, Jeff Hugo wrote: > On 6/12/2025 7:31 AM, Falkowski, Maciej wrote: >> On 6/6/2025 6:30 PM, Jeff Hugo wrote: >> >>> On 6/5/2025 10:20 AM, Maciej Falkowski wrote: From: Andrzej Kacprowski Introduces a new parameter to the DRM_IVPU_CMDQ_CREATE ioctl, >>> >>> I

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

2025-06-05 Thread Jacek Lawrynowicz
Applied to drm-misc-fixes On 5/28/2025 7:12 PM, Jacek Lawrynowicz wrote: > Don't WARN if imported buffers are in use in ivpu_gem_bo_free() as they > can be indeed used in the original context/driver. > > Fixes: 647371a6609d ("accel/ivpu: Add GEM buffer object

Re: [PATCH] accel/ivpu: Trigger device recovery on engine reset/resume failure

2025-06-05 Thread Jacek Lawrynowicz
Applied to drm-misc-fixes On 5/28/2025 5:42 PM, Jacek Lawrynowicz wrote: > From: Karol Wachowski > > Trigger full device recovery when the driver fails to restore device state > via engine reset and resume operations. This is necessary because, even if > submissions from a fau

Re: [PATCH] accel/ivpu: Use dma_resv_lock() instead of a custom mutex

2025-06-05 Thread Jacek Lawrynowicz
Applied to drm-misc-fixes On 5/28/2025 5:43 PM, Jacek Lawrynowicz wrote: > This fixes a potential race conditions in: > - ivpu_bo_unbind_locked() where we modified the shmem->sgt without >holding the dma_resv_lock(). > - ivpu_bo_print_info() where we read the shmem

Re: [PATCH] accel/ivpu: Trigger device recovery on engine reset/resume failure

2025-06-02 Thread Jacek Lawrynowicz
Hi, On 5/28/2025 7:53 PM, Lizhi Hou wrote: > > On 5/28/25 08:42, Jacek Lawrynowicz wrote: >> From: Karol Wachowski >> >> Trigger full device recovery when the driver fails to restore device state >> via engine reset and resume operations. This is necessary because,

Re: [PATCH] accel/ivpu: Use dma_resv_lock() instead of a custom mutex

2025-06-02 Thread Jacek Lawrynowicz
Hi, On 5/28/2025 7:50 PM, Lizhi Hou wrote: > > On 5/28/25 08:43, Jacek Lawrynowicz wrote: >> This fixes a potential race conditions in: >>   - ivpu_bo_unbind_locked() where we modified the shmem->sgt without >>     holding the dma_resv_lock(). >>   - ivpu_bo_pri

Re: [PATCH] accel/ivpu: Add inference_timeout_ms module parameter

2025-06-02 Thread Jacek Lawrynowicz
Applied to drm-misc-next On 5/15/2025 11:31 AM, Jacek Lawrynowicz wrote: > From: Karol Wachowski > > Add new inference_timeout_ms parameter that allows specifying > maximum allowed duration in milliseconds that inference can take before > triggering a recovery. > > Calcul

[PATCH v2] accel/ivpu: Fix warning in ivpu_gem_bo_free()

2025-05-28 Thread Jacek Lawrynowicz
Don't WARN if imported buffers are in use in ivpu_gem_bo_free() as they can be indeed used in the original context/driver. Fixes: 647371a6609d ("accel/ivpu: Add GEM buffer object management") Cc: sta...@vger.kernel.org # v6.3 Signed-off-by: Jacek Lawrynowicz --- v2: Use drm_gem_i

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

2025-05-28 Thread Jacek Lawrynowicz
Hi, On 5/28/2025 6:33 PM, Lizhi Hou wrote: > On 5/28/25 08:42, Jacek Lawrynowicz wrote: >> Don't WARN if imported buffers are in use in ivpu_gem_bo_free() as they >> can be indeed used in the original context/driver. >> >> Fixes: 647371a6609d ("accel/ivpu: Add

[PATCH] accel/ivpu: Use dma_resv_lock() instead of a custom mutex

2025-05-28 Thread Jacek Lawrynowicz
future syncronisation issues that may arise when accessing drm_gem_shmem_object or drm_gem_object members. Fixes: 42328003ecb6 ("accel/ivpu: Refactor BO creation functions") Cc: # v6.9+ Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/ivpu_gem.c | 63 +++---

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

2025-05-28 Thread Jacek Lawrynowicz
Don't WARN if imported buffers are in use in ivpu_gem_bo_free() as they can be indeed used in the original context/driver. Fixes: 647371a6609d ("accel/ivpu: Add GEM buffer object management") Cc: # v6.3 Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/ivpu_gem.c | 3 ++-

[PATCH] accel/ivpu: Trigger device recovery on engine reset/resume failure

2025-05-28 Thread Jacek Lawrynowicz
: # v6.15+ Signed-off-by: Karol Wachowski Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/ivpu_job.c | 6 -- drivers/accel/ivpu/ivpu_jsm_msg.c | 9 +++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/drivers/accel/ivpu/ivpu_job.c b/drivers/accel/ivpu/ivpu_j

Re: [PATCH 1/8] drm/gem: Fix race in drm_gem_handle_create_tail()

2025-05-28 Thread Jacek Lawrynowicz
This fixes the race for me. Tested-by: Jacek Lawrynowicz On 5/28/2025 11:12 AM, Simona Vetter wrote: > Object creation is a careful dance where we must guarantee that the > object is fully constructed before it is visible to other threads, and > GEM buffer objects are no difference. &

Re: [PATCH] accel/ivpu: Improve buffer object logging

2025-05-28 Thread Jacek Lawrynowicz
Applied to drm-misc-fixes On 5/6/2025 11:13 AM, Jacek Lawrynowicz wrote: > - Fix missing alloc log when drm_gem_handle_create() fails in > drm_vma_node_allow() and open callback is not called > - Add ivpu_bo->ctx_id that enables to log the actual context > id instead of usi

Re: [PATCH] accel/ivpu: Reorder Doorbell Unregister and Command Queue Destruction

2025-05-28 Thread Jacek Lawrynowicz
Applied to drm-misc-fixes On 5/15/2025 11:41 AM, Jacek Lawrynowicz wrote: > From: Karol Wachowski > > Refactor ivpu_cmdq_unregister() to ensure the doorbell is unregistered > before destroying the command queue. The NPU firmware requires doorbells > to be unregistered prior t

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

2025-05-28 Thread Jacek Lawrynowicz
Applied to drm-misc-fixes On 5/6/2025 11:20 AM, 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.13+ > Signed-off-by: Jacek Lawrynowicz &g

Re: [PATCH v2] accel/qaic: Add Reliability, Accessibility, Serviceability (RAS)

2025-05-18 Thread Jacek Lawrynowicz
Reviewed-by: Jacek Lawrynowicz On 5/16/2025 6:06 PM, Jeff Hugo wrote: > AIC100 devices generates Reliability, Availability, Serviceability events > via MHI QAIC_STATUS channel. Support such events and print a structured > log with details of the events, and if the event describes an un

[PATCH] accel/ivpu: Reorder Doorbell Unregister and Command Queue Destruction

2025-05-15 Thread Jacek Lawrynowicz
: 465a3914b254 ("accel/ivpu: Add API for command queue create/destroy/submit") Signed-off-by: Karol Wachowski Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/ivpu_job.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/accel/ivpu/ivpu_job.c b/drivers/

[PATCH] accel/ivpu: Add inference_timeout_ms module parameter

2025-05-15 Thread Jacek Lawrynowicz
-by: Karol Wachowski Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/ivpu_drv.h | 1 + drivers/accel/ivpu/ivpu_hw.c | 4 drivers/accel/ivpu/ivpu_pm.c | 15 --- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/drivers/accel/ivpu/ivpu_drv.h b/drivers/accel

Re: [PATCH] accel/qaic: Add Reliability, Accessibility, Serviceability (RAS)

2025-05-13 Thread Jacek Lawrynowicz
Hi, On 5/13/2025 5:05 PM, Jeff Hugo wrote: > On 5/13/2025 3:53 AM, Jacek Lawrynowicz wrote: >> Hi, >> >> On 5/12/2025 9:49 PM, Jeff Hugo wrote: >>> diff --git a/drivers/accel/qaic/qaic_ras.c b/drivers/accel/qaic/qaic_ras.c >>> new file mode 100644 >>&g

Re: [PATCH] accel/qaic: Add Reliability, Accessibility, Serviceability (RAS)

2025-05-13 Thread Jacek Lawrynowicz
Hi, On 5/12/2025 9:49 PM, Jeff Hugo wrote: > AIC100 devices generates Reliability, Availability, Serviceability events > via MHI QAIC_STATUS channel. Support such events and print a structured > log with details of the events, and if the event describes an uncorrected > error, reset the device to

Re: [PATCH v4 2/6] accel/ivpu: Use effective buffer size for zero terminator

2025-05-12 Thread Jacek Lawrynowicz
Thanks for the fix, applied to drm-misc-fixes On 5/8/2025 3:06 PM, Markus Burri wrote: > Use the effective written size instead of original size as index for zero > termination. If the input from user-space is to larger and the input is > truncated, the original size is out-of-bound. > Since there

Re: [PATCH v4 2/6] accel/ivpu: Use effective buffer size for zero terminator

2025-05-12 Thread Jacek Lawrynowicz
Reviewed-by: Jacek Lawrynowicz On 5/8/2025 3:06 PM, Markus Burri wrote: > Use the effective written size instead of original size as index for zero > termination. If the input from user-space is to larger and the input is > truncated, the original size is out-of-bound. > Since

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

  1   2   3   4   5   6   >