<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/accel, branch v6.8-rc3</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>accel/ivpu: Improve recovery and reset support</title>
<updated>2024-01-25T09:17:37+00:00</updated>
<author>
<name>Jacek Lawrynowicz</name>
<email>jacek.lawrynowicz@linux.intel.com</email>
</author>
<published>2024-01-22T12:09:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=27d19268cf394f2c78db732be0cb31852eeadb0a'/>
<id>27d19268cf394f2c78db732be0cb31852eeadb0a</id>
<content type='text'>
  - Synchronize job submission with reset/recovery using reset_lock
  - Always print recovery reason and call diagnose_failure()
  - Don't allow for autosupend during recovery
  - Prevent immediate autosuspend after reset/recovery
  - Prevent force_recovery for issuing TDR when device is suspended
  - Reset VPU instead triggering recovery after changing debugfs params

Signed-off-by: Jacek Lawrynowicz &lt;jacek.lawrynowicz@linux.intel.com&gt;
Reviewed-by: Wachowski, Karol &lt;karol.wachowski@intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20240122120945.1150728-4-jacek.lawrynowicz@linux.intel.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
  - Synchronize job submission with reset/recovery using reset_lock
  - Always print recovery reason and call diagnose_failure()
  - Don't allow for autosupend during recovery
  - Prevent immediate autosuspend after reset/recovery
  - Prevent force_recovery for issuing TDR when device is suspended
  - Reset VPU instead triggering recovery after changing debugfs params

Signed-off-by: Jacek Lawrynowicz &lt;jacek.lawrynowicz@linux.intel.com&gt;
Reviewed-by: Wachowski, Karol &lt;karol.wachowski@intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20240122120945.1150728-4-jacek.lawrynowicz@linux.intel.com
</pre>
</div>
</content>
</entry>
<entry>
<title>accel/ivpu: Improve stability of ivpu_submit_ioctl()</title>
<updated>2024-01-25T09:17:07+00:00</updated>
<author>
<name>Jacek Lawrynowicz</name>
<email>jacek.lawrynowicz@linux.intel.com</email>
</author>
<published>2024-01-22T12:09:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=264b271d12d0af794f3d1dc3793e6589fae8c66c'/>
<id>264b271d12d0af794f3d1dc3793e6589fae8c66c</id>
<content type='text'>
- 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 &lt;jacek.lawrynowicz@linux.intel.com&gt;
Reviewed-by: Wachowski, Karol &lt;karol.wachowski@intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20240122120945.1150728-3-jacek.lawrynowicz@linux.intel.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- 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 &lt;jacek.lawrynowicz@linux.intel.com&gt;
Reviewed-by: Wachowski, Karol &lt;karol.wachowski@intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20240122120945.1150728-3-jacek.lawrynowicz@linux.intel.com
</pre>
</div>
</content>
</entry>
<entry>
<title>accel/ivpu: Fix dev open/close races with unbind</title>
<updated>2024-01-25T09:16:56+00:00</updated>
<author>
<name>Jacek Lawrynowicz</name>
<email>jacek.lawrynowicz@linux.intel.com</email>
</author>
<published>2024-01-22T12:09:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f1cc6aceecd04964304786530eaa4ad87d90b972'/>
<id>f1cc6aceecd04964304786530eaa4ad87d90b972</id>
<content type='text'>
  - 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 &lt;jacek.lawrynowicz@linux.intel.com&gt;
Reviewed-by: Wachowski, Karol &lt;karol.wachowski@intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20240122120945.1150728-2-jacek.lawrynowicz@linux.intel.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
  - 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 &lt;jacek.lawrynowicz@linux.intel.com&gt;
Reviewed-by: Wachowski, Karol &lt;karol.wachowski@intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20240122120945.1150728-2-jacek.lawrynowicz@linux.intel.com
</pre>
</div>
</content>
</entry>
<entry>
<title>accel/ivpu: Disable PLL after VPU IP reset during FLR</title>
<updated>2024-01-22T12:29:42+00:00</updated>
<author>
<name>Jacek Lawrynowicz</name>
<email>jacek.lawrynowicz@linux.intel.com</email>
</author>
<published>2023-10-24T16:53:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=4b5581f112075e46d73b34b9848be041e6c1e489'/>
<id>4b5581f112075e46d73b34b9848be041e6c1e489</id>
<content type='text'>
IP reset has to followed by ivpu_pll_disable() to properly enter
reset state.

Fixes: 828d63042aec ("accel/ivpu: Don't enter d0i3 during FLR")
Signed-off-by: Jacek Lawrynowicz &lt;jacek.lawrynowicz@linux.intel.com&gt;
Reviewed-by: Stanislaw Gruszka &lt;stanislaw.gruszka@linux.intel.com&gt;
Signed-off-by: Stanislaw Gruszka &lt;stanislaw.gruszka@linux.intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20231024165353.761507-1-stanislaw.gruszka@linux.intel.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
IP reset has to followed by ivpu_pll_disable() to properly enter
reset state.

Fixes: 828d63042aec ("accel/ivpu: Don't enter d0i3 during FLR")
Signed-off-by: Jacek Lawrynowicz &lt;jacek.lawrynowicz@linux.intel.com&gt;
Reviewed-by: Stanislaw Gruszka &lt;stanislaw.gruszka@linux.intel.com&gt;
Signed-off-by: Stanislaw Gruszka &lt;stanislaw.gruszka@linux.intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20231024165353.761507-1-stanislaw.gruszka@linux.intel.com
</pre>
</div>
</content>
</entry>
<entry>
<title>accel/ivpu: Deprecate DRM_IVPU_PARAM_CONTEXT_PRIORITY param</title>
<updated>2024-01-22T09:31:54+00:00</updated>
<author>
<name>Wachowski, Karol</name>
<email>karol.wachowski@intel.com</email>
</author>
<published>2024-01-15T13:44:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b246271d257b4b0573e88f443ed8091f8b044895'/>
<id>b246271d257b4b0573e88f443ed8091f8b044895</id>
<content type='text'>
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 &lt;karol.wachowski@intel.com&gt;
Signed-off-by: Jacek Lawrynowicz &lt;jacek.lawrynowicz@linux.intel.com&gt;
Reviewed-by: Jacek Lawrynowicz &lt;jacek.lawrynowicz@linux.intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20240115134434.493839-10-jacek.lawrynowicz@linux.intel.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;karol.wachowski@intel.com&gt;
Signed-off-by: Jacek Lawrynowicz &lt;jacek.lawrynowicz@linux.intel.com&gt;
Reviewed-by: Jacek Lawrynowicz &lt;jacek.lawrynowicz@linux.intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20240115134434.493839-10-jacek.lawrynowicz@linux.intel.com
</pre>
</div>
</content>
</entry>
<entry>
<title>accel/ivpu: Improve buffer object debug logs</title>
<updated>2024-01-22T09:30:56+00:00</updated>
<author>
<name>Jacek Lawrynowicz</name>
<email>jacek.lawrynowicz@linux.intel.com</email>
</author>
<published>2024-01-15T13:44:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=37dee2a2f4330a030abc5674bcec25ccc4addbcc'/>
<id>37dee2a2f4330a030abc5674bcec25ccc4addbcc</id>
<content type='text'>
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 &lt;jacek.lawrynowicz@linux.intel.com&gt;
Reviewed-by: Wachowski, Karol &lt;karol.wachowski@intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20240115134434.493839-9-jacek.lawrynowicz@linux.intel.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;jacek.lawrynowicz@linux.intel.com&gt;
Reviewed-by: Wachowski, Karol &lt;karol.wachowski@intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20240115134434.493839-9-jacek.lawrynowicz@linux.intel.com
</pre>
</div>
</content>
</entry>
<entry>
<title>accel/ivpu: Disable buffer sharing among VPU contexts</title>
<updated>2024-01-22T09:28:52+00:00</updated>
<author>
<name>Jacek Lawrynowicz</name>
<email>jacek.lawrynowicz@linux.intel.com</email>
</author>
<published>2024-01-15T13:44:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b7a0e75632eb6568c82de9108bd29e130dd082d9'/>
<id>b7a0e75632eb6568c82de9108bd29e130dd082d9</id>
<content type='text'>
This was not supported properly. A buffer was imported to another VPU
context as a separate buffer object with duplicated sgt.
Both exported and imported buffers could be DMA mapped causing a double
mapping on the same device.

Buffers imported from another VPU context will now just increase
reference count, leaving only a single sgt, fixing the problem above.
Buffers still can't be shared among VPU contexts because each has its
own MMU mapping and ivpu_bo only supports single MMU mappings.

The solution would be to use a mapping list as in panfrost or etnaviv
drivers and it will be implemented in future if required.

Signed-off-by: Jacek Lawrynowicz &lt;jacek.lawrynowicz@linux.intel.com&gt;
Reviewed-by: Andrzej Kacprowski &lt;andrzej.kacprowski@linux.intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20240115134434.493839-8-jacek.lawrynowicz@linux.intel.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This was not supported properly. A buffer was imported to another VPU
context as a separate buffer object with duplicated sgt.
Both exported and imported buffers could be DMA mapped causing a double
mapping on the same device.

Buffers imported from another VPU context will now just increase
reference count, leaving only a single sgt, fixing the problem above.
Buffers still can't be shared among VPU contexts because each has its
own MMU mapping and ivpu_bo only supports single MMU mappings.

The solution would be to use a mapping list as in panfrost or etnaviv
drivers and it will be implemented in future if required.

Signed-off-by: Jacek Lawrynowicz &lt;jacek.lawrynowicz@linux.intel.com&gt;
Reviewed-by: Andrzej Kacprowski &lt;andrzej.kacprowski@linux.intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20240115134434.493839-8-jacek.lawrynowicz@linux.intel.com
</pre>
</div>
</content>
</entry>
<entry>
<title>accel/ivpu: Free buffer sgt on unbind</title>
<updated>2024-01-22T09:28:46+00:00</updated>
<author>
<name>Jacek Lawrynowicz</name>
<email>jacek.lawrynowicz@linux.intel.com</email>
</author>
<published>2024-01-15T13:44:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a8c099d5d0e4b0400cfddfd95b881c8bd9349a88'/>
<id>a8c099d5d0e4b0400cfddfd95b881c8bd9349a88</id>
<content type='text'>
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 &lt;jacek.lawrynowicz@linux.intel.com&gt;
Reviewed-by: Jeffrey Hugo &lt;quic_jhugo@quicinc.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20240115134434.493839-7-jacek.lawrynowicz@linux.intel.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;jacek.lawrynowicz@linux.intel.com&gt;
Reviewed-by: Jeffrey Hugo &lt;quic_jhugo@quicinc.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20240115134434.493839-7-jacek.lawrynowicz@linux.intel.com
</pre>
</div>
</content>
</entry>
<entry>
<title>accel/ivpu: Fix for missing lock around drm_gem_shmem_vmap()</title>
<updated>2024-01-22T09:28:43+00:00</updated>
<author>
<name>Jacek Lawrynowicz</name>
<email>jacek.lawrynowicz@linux.intel.com</email>
</author>
<published>2024-01-15T13:44:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=7f66319927a8ced3be715eb7616a890b9bf0348b'/>
<id>7f66319927a8ced3be715eb7616a890b9bf0348b</id>
<content type='text'>
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 &lt;jacek.lawrynowicz@linux.intel.com&gt;
Reviewed-by: Jeffrey Hugo &lt;quic_jhugo@quicinc.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20240115134434.493839-6-jacek.lawrynowicz@linux.intel.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;jacek.lawrynowicz@linux.intel.com&gt;
Reviewed-by: Jeffrey Hugo &lt;quic_jhugo@quicinc.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20240115134434.493839-6-jacek.lawrynowicz@linux.intel.com
</pre>
</div>
</content>
</entry>
<entry>
<title>accel/ivpu: Add diagnostic messages when VPU fails to boot or suspend</title>
<updated>2024-01-22T09:28:40+00:00</updated>
<author>
<name>Wachowski, Karol</name>
<email>karol.wachowski@intel.com</email>
</author>
<published>2024-01-15T13:44:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2a20b857dd654595d332f2521d80bd67b03536a0'/>
<id>2a20b857dd654595d332f2521d80bd67b03536a0</id>
<content type='text'>
Make boot/suspend failure debugging easier by dumping FW logs and error
registers.

Signed-off-by: Wachowski, Karol &lt;karol.wachowski@intel.com&gt;
Signed-off-by: Jacek Lawrynowicz &lt;jacek.lawrynowicz@linux.intel.com&gt;
Reviewed-by: Jeffrey Hugo &lt;quic_jhugo@quicinc.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20240115134434.493839-5-jacek.lawrynowicz@linux.intel.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make boot/suspend failure debugging easier by dumping FW logs and error
registers.

Signed-off-by: Wachowski, Karol &lt;karol.wachowski@intel.com&gt;
Signed-off-by: Jacek Lawrynowicz &lt;jacek.lawrynowicz@linux.intel.com&gt;
Reviewed-by: Jeffrey Hugo &lt;quic_jhugo@quicinc.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20240115134434.493839-5-jacek.lawrynowicz@linux.intel.com
</pre>
</div>
</content>
</entry>
</feed>
