Skip to content

Commit 28b05a4

Browse files
lyakhkv2019i
authored andcommitted
ipc: (cosmetic) add comments for buffer binding
It is unclear in which context buffer binding should be executed when an LL and a DP modules are being bound with both running in userspace context. Since DP modules have limited visibility into the system and the userspace LL context on the other hand has access to most DP assets, perform binding and unbinding in LL thread context. Add comments to explain that. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
1 parent 4563364 commit 28b05a4

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

‎src/ipc/ipc4/handler-user.c‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1685,6 +1685,13 @@ __cold int ipc4_user_process_module_message(struct ipc4_message_request *ipc4,
16851685
break;
16861686
case SOF_IPC4_MOD_BIND:
16871687
#ifdef CONFIG_SOF_USERSPACE_LL
1688+
/*
1689+
* bind and unbind can connect LL with DP. In that case it isn't
1690+
* immediately clear whether the handler should run in the DP
1691+
* thread context or in the LL IPC thread context. The LL IPC
1692+
* thread has access to DP modules, so we have to perform
1693+
* binding in the LL IPC thread context
1694+
*/
16881695
ret = ipc_user_forward_cmd(ipc4->primary.dat, ipc4->extension.dat,
16891696
ipc4_user_target_core_module(ipc4));
16901697
#else
@@ -1693,6 +1700,7 @@ __cold int ipc4_user_process_module_message(struct ipc4_message_request *ipc4,
16931700
break;
16941701
case SOF_IPC4_MOD_UNBIND:
16951702
#ifdef CONFIG_SOF_USERSPACE_LL
1703+
/* DP / LL: see comment above */
16961704
ret = ipc_user_forward_cmd(ipc4->primary.dat, ipc4->extension.dat,
16971705
ipc4_user_target_core_module(ipc4));
16981706
#else

0 commit comments

Comments
 (0)