Skip to content

Shikra mdsp shmem sync - #97

Open
mpratyus wants to merge 3 commits into
AudioReach:masterfrom
mpratyus:shikra-mdsp-shmem-sync
Open

Shikra mdsp shmem sync#97
mpratyus wants to merge 3 commits into
AudioReach:masterfrom
mpratyus:shikra-mdsp-shmem-sync

Conversation

@mpratyus

@mpratyus mpratyus commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@mpratyus
mpratyus requested review from a team August 2, 2026 13:58
@mpratyus
mpratyus force-pushed the shikra-mdsp-shmem-sync branch from ee44f46 to ef49809 Compare August 2, 2026 14:01
@mpratyus
mpratyus force-pushed the shikra-mdsp-shmem-sync branch from 7e8575c to 9fc37f4 Compare August 7, 2026 12:37

@quic-plai quic-plai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regarding the commit text, transfer DMA-BUF ownership between CPU and DSP device. Why do we need to keep transfer ownership?

Pratyush Meduri added 3 commits August 11, 2026 09:48
Add shared-memory sync APIs that use DMA_BUF_IOCTL_SYNC START/END for
DMA-BUF-backed DSP allocations.

The helpers bracket CPU access to out-of-band payload buffers so the
dma-buf exporter can perform the required CPU cache maintenance before
CPU reads or writes and before device access. Track the current CPU
access state to avoid duplicate sync calls.

Keep apps-side allocations as no-ops because they do not use this DSP
DMA-BUF synchronization path.

Signed-off-by: Pratyush Meduri <pratyush.meduri@oss.qualcomm.com>
Use the shared-memory sync helpers when GSL builds and sends
out-of-band graph command payloads to the DSP.

The sync calls bracket CPU access around graph command payloads: after
allocation before CPU writes, before command dispatch after CPU writes,
and before consuming GET_CFG responses. This lets the dma-buf exporter
perform CPU cache maintenance so MDSP observes updated payloads and the
CPU sees DSP-written response data.

Signed-off-by: Pratyush Meduri <pratyush.meduri@oss.qualcomm.com>
Add a --with-mdsp-proc configure option and use it to define MDSP_PROC
for the ar_osal and gsl libraries.

This keeps the MDSP-specific build flag controlled by graphservices
configure logic instead of requiring external recipes to inject CFLAGS.

Signed-off-by: Pratyush Meduri <pratyush.meduri@oss.qualcomm.com>
@mpratyus
mpratyus force-pushed the shikra-mdsp-shmem-sync branch from 9fc37f4 to 5c07df7 Compare August 11, 2026 04:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants