[media] st-delta: rpmsg ipc support
authorHugues Fruchet <hugues.fruchet@st.com>
Thu, 2 Feb 2017 14:59:50 +0000 (12:59 -0200)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Wed, 8 Feb 2017 12:03:49 +0000 (10:03 -0200)
commit91c83f395fbe7c89eca46ad2d5bde49f4f8de2c4
treebbaf771cc11a93457f5492bc6eb57fa4d9d13f81
parentc502e583506ec94cee780c080fff7b4e9ef6ef61
[media] st-delta: rpmsg ipc support

IPC (Inter Process Communication) support for communication with
DELTA coprocessor firmware using rpmsg kernel framework.
Based on 4 services open/set_stream/decode/close and their associated
rpmsg messages.
The messages structures are duplicated on both host and firmware
side and are packed (use only of 32 bits size fields in messages
structures to ensure packing).
Each service is synchronous; service returns only when firmware
acknowledges the associated command message.
Due to significant parameters size exchanged from host to copro,
parameters are not inserted in rpmsg messages. Instead, parameters are
stored in physical memory shared between host and coprocessor.
Memory is non-cacheable, so no special operation is required
to ensure memory coherency on host and on coprocessor side.
Multi-instance support and re-entrance are ensured using host_hdl and
copro_hdl in message header exchanged between both host and coprocessor.
This avoids to manage tables on both sides to get back the running context
of each instance.

Acked-by: Peter Griffin <peter.griffin@linaro.org>
Signed-off-by: Hugues Fruchet <hugues.fruchet@st.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/platform/Kconfig
drivers/media/platform/sti/delta/Makefile
drivers/media/platform/sti/delta/delta-ipc.c [new file with mode: 0644]
drivers/media/platform/sti/delta/delta-ipc.h [new file with mode: 0644]
drivers/media/platform/sti/delta/delta-v4l2.c
drivers/media/platform/sti/delta/delta.h