<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/accel, branch v6.4</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v6.4</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v6.4'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2023-06-20T14:07:29Z</updated>
<entry>
<title>accel/qaic: Call DRM helper function to destroy prime GEM</title>
<updated>2023-06-20T14:07:29Z</updated>
<author>
<name>Pranjal Ramajor Asha Kanojiya</name>
<email>quic_pkanojiy@quicinc.com</email>
</author>
<published>2023-06-14T16:15:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8d0d16a3ef44c60d66f937c21f32fa2cf8f2c9ed'/>
<id>urn:sha1:8d0d16a3ef44c60d66f937c21f32fa2cf8f2c9ed</id>
<content type='text'>
smatch warning:
	drivers/accel/qaic/qaic_data.c:620 qaic_free_object() error:
		dereferencing freed memory 'obj-&gt;import_attach'

obj-&gt;import_attach is detached and freed using dma_buf_detach().
But used after free to decrease the dmabuf ref count using
dma_buf_put().

drm_prime_gem_destroy() handles this issue and performs the proper clean
up instead of open coding it in the driver.

Fixes: ff13be830333 ("accel/qaic: Add datapath")
Reported-by: Sukrut Bellary &lt;sukrut.bellary@linux.com&gt;
Closes: https://lore.kernel.org/all/20230610021200.377452-1-sukrut.bellary@linux.com/
Suggested-by: Christian König &lt;christian.koenig@amd.com&gt;
Signed-off-by: Pranjal Ramajor Asha Kanojiya &lt;quic_pkanojiy@quicinc.com&gt;
Reviewed-by: Carl Vanderlip &lt;quic_carlv@quicinc.com&gt;
Reviewed-by: Jeffrey Hugo &lt;quic_jhugo@quicinc.com&gt;
Signed-off-by: Jeffrey Hugo &lt;quic_jhugo@quicinc.com&gt;
Reviewed-by: Christian König &lt;christian.koenig@amd.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20230614161528.11710-1-quic_jhugo@quicinc.com
</content>
</entry>
<entry>
<title>accel/qaic: Fix NULL pointer deref in qaic_destroy_drm_device()</title>
<updated>2023-06-09T17:07:28Z</updated>
<author>
<name>Jeffrey Hugo</name>
<email>quic_jhugo@quicinc.com</email>
</author>
<published>2023-06-02T21:04:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=61d8cdb7872c82d8a4d5e5251b0010332c316a67'/>
<id>urn:sha1:61d8cdb7872c82d8a4d5e5251b0010332c316a67</id>
<content type='text'>
If qaic_destroy_drm_device() is called before the device has fully
initialized it will cause a NULL pointer dereference as the drm device
has not yet been created. Fix this with a NULL check.

Fixes: c501ca23a6a3 ("accel/qaic: Add uapi and core driver file")
Signed-off-by: Jeffrey Hugo &lt;quic_jhugo@quicinc.com&gt;
Reviewed-by: Carl Vanderlip &lt;quic_carlv@quicinc.com&gt;
Reviewed-by: Pranjal Ramajor Asha Kanojiya &lt;quic_pkanojiy@quicinc.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20230602210440.8411-3-quic_jhugo@quicinc.com
</content>
</entry>
<entry>
<title>accel/qaic: Free user handle on interrupted mutex</title>
<updated>2023-06-09T17:06:33Z</updated>
<author>
<name>Carl Vanderlip</name>
<email>quic_carlv@quicinc.com</email>
</author>
<published>2023-06-02T21:04:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3e1b9b2d81901b3ceeb5ec1f1b4c41cd1cff53ba'/>
<id>urn:sha1:3e1b9b2d81901b3ceeb5ec1f1b4c41cd1cff53ba</id>
<content type='text'>
After user handle is allocated, if mutex is interrupted, we do not free
the user handle and return an error. Kref had been initialized, but not
added to users list, so device teardown would also not call free_usr.

Fixes: c501ca23a6a3 ("accel/qaic: Add uapi and core driver file")
Signed-off-by: Carl Vanderlip &lt;quic_carlv@quicinc.com&gt;
Reviewed-by: Pranjal Ramajor Asha Kanojiya &lt;quic_pkanojiy@quicinc.com&gt;
Reviewed-by: Jeffrey Hugo &lt;quic_jhugo@quicinc.com&gt;
Signed-off-by: Jeffrey Hugo &lt;quic_jhugo@quicinc.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20230602210440.8411-2-quic_jhugo@quicinc.com
</content>
</entry>
<entry>
<title>accel/ivpu: Fix sporadic VPU boot failure</title>
<updated>2023-06-08T06:17:27Z</updated>
<author>
<name>Andrzej Kacprowski</name>
<email>andrzej.kacprowski@linux.intel.com</email>
</author>
<published>2023-06-07T09:45:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a3efabee5878b8d7b1863debb78cb7129d07a346'/>
<id>urn:sha1:a3efabee5878b8d7b1863debb78cb7129d07a346</id>
<content type='text'>
Wait for AON bit in HOST_SS_CPR_RST_CLR to return 0 before
starting VPUIP power up sequence, otherwise the VPU device
may sporadically fail to boot.

An error in power up sequence is propagated to the runtime
power management - the device will be in an error state
until the VPU driver is reloaded.

Fixes: 35b137630f08 ("accel/ivpu: Introduce a new DRM driver for Intel VPU")
Cc: stable@vger.kernel.org # 6.3.x
Signed-off-by: Andrzej Kacprowski &lt;andrzej.kacprowski@linux.intel.com&gt;
Reviewed-by: Krystian Pradzynski &lt;krystian.pradzynski@linux.intel.com&gt;
Signed-off-by: Stanislaw Gruszka &lt;stanislaw.gruszka@linux.intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20230607094502.388489-1-stanislaw.gruszka@linux.intel.com
</content>
</entry>
<entry>
<title>accel/ivpu: Do not use mutex_lock_interruptible</title>
<updated>2023-06-08T06:15:46Z</updated>
<author>
<name>Stanislaw Gruszka</name>
<email>stanislaw.gruszka@linux.intel.com</email>
</author>
<published>2023-05-25T10:38:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b563e47957af4ff71736c5cc4120a59b055ab583'/>
<id>urn:sha1:b563e47957af4ff71736c5cc4120a59b055ab583</id>
<content type='text'>
If we get signal when waiting for the mmu-&gt;lock we do not invalidate
current MMU configuration that might result in undefined behavior.

Additionally there is little or no benefit on break waiting for
ipc-&gt;lock. In current code base, we keep this lock for short periods.

Fixes: 263b2ba5fc93 ("accel/ivpu: Add Intel VPU MMU support")
Reviewed-by: Krystian Pradzynski &lt;krystian.pradzynski@linux.intel.com&gt;
Reviewed-by: Jeffrey Hugo &lt;quic_jhugo@quicinc.com&gt;
Signed-off-by: Stanislaw Gruszka &lt;stanislaw.gruszka@linux.intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20230525103818.877590-2-stanislaw.gruszka@linux.intel.com
</content>
</entry>
<entry>
<title>accel/ivpu: Do not trigger extra VPU reset if the VPU is idle</title>
<updated>2023-06-08T06:15:30Z</updated>
<author>
<name>Andrzej Kacprowski</name>
<email>andrzej.kacprowski@linux.intel.com</email>
</author>
<published>2023-05-25T10:38:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9f7e3611f6c828fcb6001c39d8e7a523a4f31525'/>
<id>urn:sha1:9f7e3611f6c828fcb6001c39d8e7a523a4f31525</id>
<content type='text'>
Turning off the PLL and entering D0i3 will reset the VPU so
an explicit IP reset is redundant.
But if the VPU is active, it may interfere with PLL disabling
and to avoid that, we have to issue an additional IP reset
to silence the VPU before turning off the PLL.

Fixes: a8fed6d1e0b9 ("accel/ivpu: Fix power down sequence")
Cc: stable@vger.kernel.org # 6.3.x
Signed-off-by: Andrzej Kacprowski &lt;andrzej.kacprowski@linux.intel.com&gt;
Reviewed-by: Stanislaw Gruszka &lt;stanislaw.gruszka@linux.intel.com&gt;
Reviewed-by: Jeffrey Hugo &lt;quic_jhugo@quicinc.com&gt;
Signed-off-by: Stanislaw Gruszka &lt;stanislaw.gruszka@linux.intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20230525103818.877590-1-stanislaw.gruszka@linux.intel.com
</content>
</entry>
<entry>
<title>accel/ivpu: Reserve all non-command bo's using DMA_RESV_USAGE_BOOKKEEP</title>
<updated>2023-06-06T12:43:41Z</updated>
<author>
<name>Stanislaw Gruszka</name>
<email>stanislaw.gruszka@linux.intel.com</email>
</author>
<published>2023-04-13T06:38:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=411360257c1f4fccaa20143098b6d3fcc9d4e4dc'/>
<id>urn:sha1:411360257c1f4fccaa20143098b6d3fcc9d4e4dc</id>
<content type='text'>
Use DMA_RESV_USAGE_BOOKKEEP reservation for buffer objects, except for
command buffers for which we use DMA_RESV_USAGE_WRITE (since VPU can
write to command buffer context save area).

Fixes: 0ec8671837a6 ("accel/ivpu: Fix S3 system suspend when not idle")
Reviewed-by: Jeffrey Hugo &lt;quic_jhugo@quicinc.com&gt;
Signed-off-by: Stanislaw Gruszka &lt;stanislaw.gruszka@linux.intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20230413063810.3167511-1-stanislaw.gruszka@linux.intel.com
</content>
</entry>
<entry>
<title>accel/ivpu: ivpu_ipc needs GENERIC_ALLOCATOR</title>
<updated>2023-06-06T12:19:53Z</updated>
<author>
<name>Randy Dunlap</name>
<email>rdunlap@infradead.org</email>
</author>
<published>2023-05-26T04:45:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=50d30040eb856ff6b0382b4d9dc332dc15597729'/>
<id>urn:sha1:50d30040eb856ff6b0382b4d9dc332dc15597729</id>
<content type='text'>
Drivers that use the gen_pool*() family of functions should
select GENERIC_ALLOCATOR to prevent build errors like these:

ld: drivers/accel/ivpu/ivpu_ipc.o: in function `gen_pool_free':
include/linux/genalloc.h:172: undefined reference to `gen_pool_free_owner'
ld: drivers/accel/ivpu/ivpu_ipc.o: in function `gen_pool_alloc_algo':
include/linux/genalloc.h:138: undefined reference to `gen_pool_alloc_algo_owner'
ld: drivers/accel/ivpu/ivpu_ipc.o: in function `gen_pool_free':
include/linux/genalloc.h:172: undefined reference to `gen_pool_free_owner'
ld: drivers/accel/ivpu/ivpu_ipc.o: in function `ivpu_ipc_init':
drivers/accel/ivpu/ivpu_ipc.c:441: undefined reference to `devm_gen_pool_create'
ld: drivers/accel/ivpu/ivpu_ipc.o: in function `gen_pool_add_virt':
include/linux/genalloc.h:104: undefined reference to `gen_pool_add_owner'

Fixes: 5d7422cfb498 ("accel/ivpu: Add IPC driver and JSM messages")
Signed-off-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Link: https://lore.kernel.org/all/202305221206.1TaugDKP-lkp@intel.com/
Cc: Oded Gabbay &lt;ogabbay@kernel.org&gt;
Cc: dri-devel@lists.freedesktop.org
Cc: Jacek Lawrynowicz &lt;jacek.lawrynowicz@linux.intel.com&gt;
Cc: Stanislaw Gruszka &lt;stanislaw.gruszka@linux.intel.com&gt;
Cc: Andrzej Kacprowski &lt;andrzej.kacprowski@linux.intel.com&gt;
Cc: Krystian Pradzynski &lt;krystian.pradzynski@linux.intel.com&gt;
Cc: Jeffrey Hugo &lt;quic_jhugo@quicinc.com&gt;
Cc: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Reviewed-by: Jeffrey Hugo &lt;quic_jhugo@quicinc.com&gt;
Signed-off-by: Stanislaw Gruszka &lt;stanislaw.gruszka@linux.intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20230526044519.13441-1-rdunlap@infradead.org
</content>
</entry>
<entry>
<title>accel/qaic: Fix NNC message corruption</title>
<updated>2023-05-23T15:51:38Z</updated>
<author>
<name>Jeffrey Hugo</name>
<email>quic_jhugo@quicinc.com</email>
</author>
<published>2023-05-17T19:35:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e997c218ad736fd6f524d73a987bad9d94128d3d'/>
<id>urn:sha1:e997c218ad736fd6f524d73a987bad9d94128d3d</id>
<content type='text'>
If msg_xfer() is unable to queue part of a NNC message because the MHI ring
is full, it will attempt to give the QSM some time to drain the queue.
However, if QSM fails to make any room, msg_xfer() will fail and tell the
caller to try again.  This is problematic because part of the message may
have been committed to the ring and there is no mechanism to revoke that
content.  This will cause QSM to receive a corrupt message.

The better way to do this is to check if the ring has enough space for the
entire message before committing any of the message.  Since msg_xfer() is
under the cntl_mutex no one else can come in and consume the space.

Fixes: 129776ac2e38 ("accel/qaic: Add control path")
Signed-off-by: Jeffrey Hugo &lt;quic_jhugo@quicinc.com&gt;
Reviewed-by: Pranjal Ramajor Asha Kanojiya &lt;quic_pkanojiy@quicinc.com&gt;
Reviewed-by: Carl Vanderlip &lt;quic_carlv@quicinc.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20230517193540.14323-6-quic_jhugo@quicinc.com
</content>
</entry>
<entry>
<title>accel/qaic: Grab ch_lock during QAIC_ATTACH_SLICE_BO</title>
<updated>2023-05-23T15:51:06Z</updated>
<author>
<name>Pranjal Ramajor Asha Kanojiya</name>
<email>quic_pkanojiy@quicinc.com</email>
</author>
<published>2023-05-17T19:35:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=75af0a585af93183ba68bb1b45d0d7a61e963712'/>
<id>urn:sha1:75af0a585af93183ba68bb1b45d0d7a61e963712</id>
<content type='text'>
During QAIC_ATTACH_SLICE_BO, we associate a BO to its DBC. We need to
grab the dbc-&gt;ch_lock to make sure that DBC does not goes away while
QAIC_ATTACH_SLICE_BO is still running.

Fixes: ff13be830333 ("accel/qaic: Add datapath")
Signed-off-by: Pranjal Ramajor Asha Kanojiya &lt;quic_pkanojiy@quicinc.com&gt;
Reviewed-by: Carl Vanderlip &lt;quic_carlv@quicinc.com&gt;
Reviewed-by: Jeffrey Hugo &lt;quic_jhugo@quicinc.com&gt;
Signed-off-by: Jeffrey Hugo &lt;quic_jhugo@quicinc.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20230517193540.14323-5-quic_jhugo@quicinc.com
</content>
</entry>
</feed>
