Initialize the msg and vsi information before send to optee, then
calling tee invoke command to send.
For the optee communication interface is different with scp, adding
condition to separate them.
Signed-off-by: Yunfei Dong
---
.../vcodec/decoder/mtk_vcodec_dec_drv.h | 2
From: Xiaoyong Lu
Change av1 driver to support secure video playback(svp) for
mt8188. Need to map shared memory with optee interface and
wait interrupt in optee-os.
Signed-off-by: Xiaoyong Lu
Signed-off-by: Yunfei Dong
---
.../vcodec/decoder/vdec/vdec_av1_req_lat_if.c | 104
From: Jeffrey Kardatzke
Validates the restricted memory flags when setting up a queue and
ensures the queue has the proper capability.
Signed-off-by: Jeffrey Kardatzke
Signed-off-by: Yunfei Dong
[Yunfei: Change reviewer's comments]
---
.../media/common/videobuf2/videobuf2-core.c
From: Yilong Zhou
Change vp9 driver to support secure video playback(svp) for
mt8188. Need to map shared memory with optee interface and
wait interrupt in optee-os.
Signed-off-by: Yilong Zhou
Signed-off-by: Yunfei Dong
[Yunfei: Fix the checkpatch warning]
---
.../vcodec/decoder/vdec
From: Jeffrey Kardatzke
Adds a V4L2 flag which indicates that a queue is using restricted
dmabufs and the corresponding capability flag.
Signed-off-by: Jeffrey Kardatzke
Signed-off-by: Yunfei Dong
[Yunfei: Change reviewer's comments]
---
Documentation/userspace-api/media/v4l/buffe
Remove vsi related data from common interface to be compatible with
the extend vsi with secure video playback change.
Signed-off-by: Yunfei Dong
---
.../decoder/vdec/vdec_h264_req_multi_if.c | 19 ++-
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git
a/drivers
Changing driver to support single allocation format V4L2_PIX_FMT_MS21.
Signed-off-by: Yunfei Dong
---
.../platform/mediatek/vcodec/decoder/mtk_vcodec_dec.c| 4 +++-
.../mediatek/vcodec/decoder/mtk_vcodec_dec_stateless.c | 9 -
2 files changed, 11 insertions(+), 2 deletions
Remove multiple unused includes and alphabetize.
Signed-off-by: T.J. Mercier
Signed-off-by: Yong Wu
[Yong: Just add a comment for "priv" to mute build warning]
Signed-off-by: Yunfei Dong
---
drivers/dma-buf/dma-heap.c | 27 +++
include/linux/dma-heap.h | 21 +
Adding non extend struct to support two different architecture.
Signed-off-by: Yunfei Dong
---
.../decoder/vdec/vdec_h264_req_multi_if.c | 76 ++-
1 file changed, 73 insertions(+), 3 deletions(-)
diff --git
a/drivers/media/platform/mediatek/vcodec/decoder/vdec
Rename the extend interface with _ex and sync the non extend driver.
Adding capability to separate extend and non extend driver.
Signed-off-by: Yunfei Dong
---
.../vcodec/decoder/mtk_vcodec_dec_drv.h | 2 +
.../decoder/vdec/vdec_h264_req_multi_if.c | 382 +-
2 files
rename vsi to extend vsi struct for adding some extend param to
support secure video playback.
Signed-off-by: Yunfei Dong
---
.../decoder/vdec/vdec_h264_req_multi_if.c | 174 +-
1 file changed, 88 insertions(+), 86 deletions(-)
diff --git
a/drivers/media/platform/mediatek
Change hevc driver to support secure video playback(svp) for
mt8188. Need to map shared memory with optee interface and
wait interrupt in optee-os.
Signed-off-by: Yunfei Dong
---
.../decoder/vdec/vdec_hevc_req_multi_if.c | 88 +++
1 file changed, 53 insertions(+), 35
Getting secure video playback (svp) flag when request output buffer, then
calling init interface to init svp parameters in optee-os.
Signed-off-by: Yunfei Dong
---
.../mediatek/vcodec/decoder/mtk_vcodec_dec.c | 141 +++---
1 file changed, 91 insertions(+), 50 deletions(-)
diff
Need secure buffer size to convert secure handle to secure
pa in optee-os, re-construct the vsi struct to store each
secure buffer size.
Separate svp and normal wait interrupt condition for svp mode
waiting hardware interrupt in optee-os.
Signed-off-by: Yunfei Dong
---
.../decoder/vdec
Waiting interrupt in optee-os for svp mode, need to disable it in kernel
in case of interrupt is cleaned.
Signed-off-by: Yunfei Dong
---
.../vcodec/decoder/mtk_vcodec_dec_hw.c| 34 +--
.../vcodec/decoder/mtk_vcodec_dec_pm.c| 6 +-
.../decoder/vdec
Initialize tee private data to support secure decoder.
Release tee related information for each instance when decoder
done.
Signed-off-by: Yunfei Dong
---
.../platform/mediatek/vcodec/decoder/mtk_vcodec_dec_drv.c | 8
1 file changed, 8 insertions(+)
diff --git
a/drivers/media
The hardware can parse syntax to get nal_info, needn't to use cpu.
Signed-off-by: Yunfei Dong
---
.../vcodec/decoder/vdec/vdec_h264_req_multi_if.c| 13 ++---
1 file changed, 2 insertions(+), 11 deletions(-)
diff --git
a/drivers/media/platform/mediatek/vcodec/decoder
not aligned with 64.
Signed-off-by: Yunfei Dong
---
.../mediatek/vcodec/decoder/mtk_vcodec_dec.c | 7 -
.../vcodec/decoder/mtk_vcodec_dec_stateless.c | 26 ++-
.../decoder/vdec/vdec_h264_req_common.c | 18 ++---
.../mediatek/vcodec/decoder/vdec_drv_if.c
Define one uncompressed capture format V4L2_PIX_FMT_MS21 in order to
support single allocation memory. The memory consists of two plans:
luma and chroma, luma is stored at the start and chrome is stored at
the end.
Signed-off-by: Yunfei Dong
---
Documentation/userspace-api/media/v4l/pixfmt
The vsi buffer is allocated by tee share memory for svp mode,
using the share memory virtual address to store vsi data.
Signed-off-by: Yunfei Dong
---
.../mediatek/vcodec/decoder/vdec/vdec_h264_req_multi_if.c | 8 ++--
.../media/platform/mediatek/vcodec/decoder/vdec_vpu_if.c | 8
Calling dma heap interface to allocate/free secure memory when
playing secure video.
Signed-off-by: Yunfei Dong
---
.../media/platform/mediatek/vcodec/Kconfig| 1 +
.../mediatek/vcodec/common/mtk_vcodec_util.c | 117 +-
.../mediatek/vcodec/common/mtk_vcodec_util.h | 8
Setting msg and vsi information to shared buffer, then call tee invoke
function to send it to optee-os.
Signed-off-by: Yunfei Dong
---
.../vcodec/decoder/mtk_vcodec_dec_optee.c | 156 +-
.../vcodec/decoder/mtk_vcodec_dec_optee.h | 74 +
2 files changed, 226
Allocate two share memory for each lat and core hardware used to share
information with optee-os. Msg buffer used to send ipi command and get ack
command with optee-os, data buffer used to store vsi information which
used for hardware decode.
Signed-off-by: Yunfei Dong
---
.../vcodec/decoder
Open tee context to initialize the environment in order to
communication with optee-os, then open tee session as the
communication pipeline for lat and core to send data for
hardware decode.
Signed-off-by: Yunfei Dong
---
.../platform/mediatek/vcodec/decoder/Makefile | 1 +
.../vcodec/decoder
The tee_* function make the driver depends on the TEE driver, isolate
the decoder OPTEE client into a separate module, and make it depends on
CONFIG_TEE. The driver can open/close the TEE driver dynamically.
Signed-off-by: Yunfei Dong
---
.../media/platform/mediatek/vcodec/Kconfig| 12
rcier
Signed-off-by: Yong Wu
[Yong: Just add comment for "minor" and "refcount"]
Signed-off-by: Yunfei Dong
[Yunfei: Change reviewer's comments]
---
drivers/dma-buf/dma-heap.c | 29 +
include/linux/dma-heap.h | 2 ++
2 files changed, 31 insertion
rning]
Signed-off-by: Yunfei Dong
---
drivers/dma-buf/dma-heap.c | 83 ++
include/linux/dma-heap.h | 6 +++
2 files changed, 73 insertions(+), 16 deletions(-)
diff --git a/drivers/dma-buf/dma-heap.c b/drivers/dma-buf/dma-heap.c
index 97025ee8500f..6efe833a4b10 1
Getting the physical address with sg_dma_address for restricted memory,
only return the first physical address size since sg may not be physical
continuous, then leading to the dmabuf size is small than buf size. Need
to bypass continuous checking for restricted memory.
Signed-off-by: Yunfei Dong
oper kref handling on dma-buf heaps
dma-heap: Provide accessors so that in-kernel drivers can allocate
dmabufs from specific heaps
T.J. Mercier (1):
dma-buf: heaps: Deduplicate docs and adopt common format
Xiaoyong Lu (1):
media: mediatek: vcodec: support av1 svp decoder for mt8188
Need secure buffer size to convert secure handle to secure
pa in optee-os, re-construct the vsi struct to store each
secure buffer size.
Separate svp and normal wait interrupt condition for svp mode
waiting hardware interrupt in optee-os.
Signed-off-by: Yunfei Dong
---
.../decoder/vdec
Need to initialize msg and vsi information before sending to optee-os, then
calling optee invoke command to send the information to optee-os.
For the optee communication interface is different with scp, using
flag to separate them.
Signed-off-by: Yunfei Dong
---
.../vcodec/decoder
The hardware can parse syntax to get nal_info, needn't to use cpu.
Signed-off-by: Yunfei Dong
---
.../vcodec/decoder/vdec/vdec_h264_req_multi_if.c| 13 ++---
1 file changed, 2 insertions(+), 11 deletions(-)
diff --git
a/drivers/media/platform/mediatek/vcodec/decoder
Allocate two share memory for each lat and core hardware used to share
information with optee-os. Msg buffer used to send ipi command and get ack
command with optee-os, data buffer used to store vsi information which
used for hardware decode.
Signed-off-by: Yunfei Dong
---
.../vcodec/decoder
From: Xiaoyong Lu
Change av1 driver to support secure video playback(svp) for
mt8188. Need to map shared memory with optee interface and
wait interrupt in optee-os.
Signed-off-by: Xiaoyong Lu
Signed-off-by: Yunfei Dong
---
.../vcodec/decoder/vdec/vdec_av1_req_lat_if.c | 97
Adding capture formats to support V4L2_PIX_FMT_MS21. This format has
one plane and only be used for secure video playback at current period.
Signed-off-by: Yunfei Dong
---
.../platform/mediatek/vcodec/decoder/mtk_vcodec_dec.c| 4 +++-
.../mediatek/vcodec/decoder/mtk_vcodec_dec_stateless.c
Initialize tee private data to support secure decoder.
Release tee related information for each instance when decoder
done.
Signed-off-by: Yunfei Dong
---
.../platform/mediatek/vcodec/decoder/mtk_vcodec_dec_drv.c | 8
1 file changed, 8 insertions(+)
diff --git
a/drivers/media
Getting secure video playback (svp) flag when request output buffer, then
calling init interface to init svp parameters in optee-os.
Signed-off-by: Yunfei Dong
---
.../mediatek/vcodec/decoder/mtk_vcodec_dec.c | 139 +++---
1 file changed, 89 insertions(+), 50 deletions(-)
diff
Change hevc driver to support secure video playback(svp) for
mt8188. Need to map shared memory with optee interface and
wait interrupt in optee-os.
Signed-off-by: Yunfei Dong
---
.../decoder/vdec/vdec_hevc_req_multi_if.c | 89 +++
1 file changed, 54 insertions(+), 35
The vsi buffer is allocated by tee share memory for svp mode, need to
use the share memory as the vsi address to store vsi data.
Signed-off-by: Yunfei Dong
---
.../vcodec/decoder/vdec/vdec_h264_req_multi_if.c | 9 +++--
.../media/platform/mediatek/vcodec/decoder/vdec_vpu_if.c | 8
Define one uncompressed capture format V4L2_PIX_FMT_MS21 in order to
support one plane memory. The buffer size is luma + chroma, luma is
stored at the start and chrome is stored at the end.
Signed-off-by: Yunfei Dong
---
Documentation/userspace-api/media/v4l/pixfmt-reserved.rst | 8
From: Yilong Zhou
Change vp9 driver to support secure video playback(svp) for
mt8188. Need to map shared memory with optee interface and
wait interrupt in optee-os.
Signed-off-by: Yilong Zhou
Signed-off-by: Yunfei Dong
---
.../vcodec/decoder/vdec/vdec_vp9_req_lat_if.c | 91
Waiting interrupt in optee-os for svp mode, need to disable it in kernel
in case of interrupt is cleaned.
Signed-off-by: Yunfei Dong
---
.../vcodec/decoder/mtk_vcodec_dec_hw.c| 34 +--
.../vcodec/decoder/mtk_vcodec_dec_pm.c| 6 +-
.../decoder/vdec
The capture buffer has two planes for format MM21, but user space only
allocate secure memory for plane[0], and the size is Y data + uv data.
The driver need to support one plane decoder for svp mode.
Signed-off-by: Yunfei Dong
---
.../mediatek/vcodec/decoder/mtk_vcodec_dec.c | 7
Setting msg and vsi information to shared buffer, then call tee invoke
function to send it to optee-os.
Signed-off-by: Yunfei Dong
---
.../vcodec/decoder/mtk_vcodec_dec_optee.c | 140 ++
.../vcodec/decoder/mtk_vcodec_dec_optee.h | 51 +++
2 files changed, 191
Need to call dma heap interface to allocate/free secure memory when playing
secure video.
Signed-off-by: Yunfei Dong
---
.../media/platform/mediatek/vcodec/Kconfig| 1 +
.../mediatek/vcodec/common/mtk_vcodec_util.c | 122 +-
.../mediatek/vcodec/common/mtk_vcodec_util.h
rning]
Signed-off-by: Yunfei Dong
---
drivers/dma-buf/dma-heap.c | 83 ++
include/linux/dma-heap.h | 6 +++
2 files changed, 73 insertions(+), 16 deletions(-)
diff --git a/drivers/dma-buf/dma-heap.c b/drivers/dma-buf/dma-heap.c
index 97025ee8500f..6efe833a4b10 1
Open tee context to initialize the environment in order to communication
with optee-os, then open tee session as the communication pipeline for
lat and core to send data for hardware decode.
Signed-off-by: Yunfei Dong
---
.../platform/mediatek/vcodec/decoder/Makefile | 1 +
.../vcodec/decoder
d-off-by: Yong Wu
[Yong: Just add comment for "minor" and "refcount"]
Signed-off-by: Yunfei Dong
---
drivers/dma-buf/dma-heap.c | 29 +
include/linux/dma-heap.h | 2 ++
2 files changed, 31 insertions(+)
diff --git a/drivers/dma-buf/dma-heap.c b/d
From: Jeffrey Kardatzke
Validates the restricted memory flags when setting up a queue and
ensures the queue has the proper capability.
Signed-off-by: Jeffrey Kardatzke
Signed-off-by: Yunfei Dong
---
.../media/common/videobuf2/videobuf2-core.c | 21 +++
.../media/common
From: Jeffrey Kardatzke
Verfies in the dmabuf implementations that if the restricted memory
flag is set for a queue that the dmabuf submitted to the queue is
unmappable.
Signed-off-by: Jeffrey Kardatzke
Signed-off-by: Yunfei Dong
---
drivers/media/common/videobuf2/videobuf2-dma-contig.c | 8
From: Jeffrey Kardatzke
Adds documentation for V4L2_MEMORY_FLAG_RESTRICTED.
Signed-off-by: Jeffrey Kardatzke
Signed-off-by: Yunfei Dong
---
Documentation/userspace-api/media/v4l/buffer.rst | 10 +-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/Documentation/userspace
Remove multiple unused includes and alphabetize.
Signed-off-by: T.J. Mercier
Signed-off-by: Yong Wu
[Yong: Just add a comment for "priv" to mute build warning]
Signed-off-by: Yunfei Dong
---
drivers/dma-buf/dma-heap.c | 27 +++
include/linux/dma-heap.h | 21 +
From: Jeffrey Kardatzke
Adds a V4L2 flag which indicates that a queue is using restricted
dmabufs and the corresponding capability flag.
Signed-off-by: Jeffrey Kardatzke
Signed-off-by: Yunfei Dong
---
include/media/videobuf2-core.h | 8 +++-
include/uapi/linux/videodev2.h | 2 ++
2 files
: Add proper kref handling on dma-buf heaps
dma-heap: Provide accessors so that in-kernel drivers can allocate
dmabufs from specific heaps
T.J. Mercier (1):
dma-buf: heaps: Deduplicate docs and adopt common format
Xiaoyong Lu (1):
media: mediatek: vcodec: support av1 svp decoder for mt8188
The hardware can parse syntax to get nal_info, needn't to use cpu.
Signed-off-by: Yunfei Dong
---
.../vcodec/decoder/vdec/vdec_h264_req_multi_if.c| 13 ++---
1 file changed, 2 insertions(+), 11 deletions(-)
diff --git
a/drivers/media/platform/mediatek/vcodec/decoder
Waiting interrupt in optee-os for svp mode, need to disable it in kernel
in case of interrupt is cleaned.
Signed-off-by: Yunfei Dong
---
.../vcodec/decoder/mtk_vcodec_dec_hw.c| 34 +--
.../vcodec/decoder/mtk_vcodec_dec_pm.c| 6 +-
.../decoder/vdec
Getting secure video playback (svp) flag when request output buffer, then
calling init interface to init svp parameters in optee-os.
Signed-off-by: Yunfei Dong
---
.../mediatek/vcodec/decoder/mtk_vcodec_dec.c | 139 +++---
1 file changed, 89 insertions(+), 50 deletions(-)
diff
Need to initialize msg and vsi information before sending to optee-os, then
calling optee invoke command to send the information to optee-os.
For the optee communication interface is different with scp, using
flag to separate them.
Signed-off-by: Yunfei Dong
---
.../vcodec/decoder
The capture buffer has two planes for format MM21, but user space only
allocate secure memory for plane[0], and the size is Y data + uv data.
The driver need to support one plane decoder for svp mode.
Signed-off-by: Yunfei Dong
---
.../mediatek/vcodec/decoder/mtk_vcodec_dec.c | 7
Initialize tee private data to support secure decoder.
Release tee related information for each instance when decoder
done.
Signed-off-by: Yunfei Dong
---
.../platform/mediatek/vcodec/decoder/mtk_vcodec_dec_drv.c | 8
1 file changed, 8 insertions(+)
diff --git
a/drivers/media
From: Xiaoyong Lu
Change av1 driver to support secure video playback(svp) for
mt8188. Need to map shared memory with optee interface and
wait interrupt in optee-os.
Signed-off-by: Xiaoyong Lu
Signed-off-by: Yunfei Dong
---
.../vcodec/decoder/vdec/vdec_av1_req_lat_if.c | 97
Change hevc driver to support secure video playback(svp) for
mt8188. Need to map shared memory with optee interface and
wait interrupt in optee-os.
Signed-off-by: Yunfei Dong
---
.../decoder/vdec/vdec_hevc_req_multi_if.c | 89 +++
1 file changed, 54 insertions(+), 35
Need to call dma heap interface to allocate/free secure memory when playing
secure video.
Signed-off-by: Yunfei Dong
---
.../media/platform/mediatek/vcodec/Kconfig| 1 +
.../mediatek/vcodec/common/mtk_vcodec_util.c | 122 +-
.../mediatek/vcodec/common/mtk_vcodec_util.h
Need secure buffer size to convert secure handle to secure
pa in optee-os, re-construct the vsi struct to store each
secure buffer size.
Separate svp and normal wait interrupt condition for svp mode
waiting hardware interrupt in optee-os.
Signed-off-by: Yunfei Dong
---
.../decoder/vdec
Adding capture formats to support V4L2_PIX_FMT_MS21. This format has
one plane and only be used for secure video playback at current period.
Signed-off-by: Yunfei Dong
---
.../platform/mediatek/vcodec/decoder/mtk_vcodec_dec.c| 4 +++-
.../mediatek/vcodec/decoder/mtk_vcodec_dec_stateless.c
Setting msg and vsi information to shared buffer, then call tee invoke
function to send it to optee-os.
Signed-off-by: Yunfei Dong
---
.../vcodec/decoder/mtk_vcodec_dec_optee.c | 140 ++
.../vcodec/decoder/mtk_vcodec_dec_optee.h | 51 +++
2 files changed, 191
The vsi buffer is allocated by tee share memory for svp mode, need to
use the share memory as the vsi address to store vsi data.
Signed-off-by: Yunfei Dong
---
.../vcodec/decoder/vdec/vdec_h264_req_multi_if.c | 9 +++--
.../media/platform/mediatek/vcodec/decoder/vdec_vpu_if.c | 8
Define one uncompressed capture format V4L2_PIX_FMT_MS21 in order to
support one plane memory. The buffer size is luma + chroma, luma is
stored at the start and chrome is stored at the end.
Signed-off-by: Yunfei Dong
---
Documentation/userspace-api/media/v4l/pixfmt-reserved.rst | 8
Open tee context to initialize the environment in order to communication
with optee-os, then open tee session as the communication pipeline for
lat and core to send data for hardware decode.
Signed-off-by: Yunfei Dong
---
.../platform/mediatek/vcodec/decoder/Makefile | 1 +
.../vcodec/decoder
Allocate two share memory for each lat and core hardware used to share
information with optee-os. Msg buffer used to send ipi command and get ack
command with optee-os, data buffer used to store vsi information which
used for hardware decode.
Signed-off-by: Yunfei Dong
---
.../vcodec/decoder
rning]
Signed-off-by: Yunfei Dong
---
drivers/dma-buf/dma-heap.c | 83 ++
include/linux/dma-heap.h | 6 +++
2 files changed, 73 insertions(+), 16 deletions(-)
diff --git a/drivers/dma-buf/dma-heap.c b/drivers/dma-buf/dma-heap.c
index 97025ee8500f..6efe833a4b10 1
Remove multiple unused includes and alphabetize.
Signed-off-by: T.J. Mercier
Signed-off-by: Yong Wu
[Yong: Just add a comment for "priv" to mute build warning]
Signed-off-by: Yunfei Dong
---
drivers/dma-buf/dma-heap.c | 27 +++
include/linux/dma-heap.h | 21 +
d-off-by: Yong Wu
[Yong: Just add comment for "minor" and "refcount"]
Signed-off-by: Yunfei Dong
---
drivers/dma-buf/dma-heap.c | 29 +
include/linux/dma-heap.h | 2 ++
2 files changed, 31 insertions(+)
diff --git a/drivers/dma-buf/dma-heap.c b/d
From: Jeffrey Kardatzke
Adds documentation for V4L2_MEMORY_FLAG_RESTRICTED.
Signed-off-by: Jeffrey Kardatzke
Signed-off-by: Yunfei Dong
---
Documentation/userspace-api/media/v4l/buffer.rst | 10 +-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/Documentation/userspace
From: Jeffrey Kardatzke
Verfies in the dmabuf implementations that if the restricted memory
flag is set for a queue that the dmabuf submitted to the queue is
unmappable.
Signed-off-by: Jeffrey Kardatzke
Signed-off-by: Yunfei Dong
---
drivers/media/common/videobuf2/videobuf2-dma-contig.c | 8
From: Jeffrey Kardatzke
Adds a V4L2 flag which indicates that a queue is using restricted
dmabufs and the corresponding capability flag.
Signed-off-by: Jeffrey Kardatzke
Signed-off-by: Yunfei Dong
---
include/media/videobuf2-core.h | 8 +++-
include/uapi/linux/videodev2.h | 2 ++
2 files
From: Jeffrey Kardatzke
Validates the restricted memory flags when setting up a queue and
ensures the queue has the proper capability.
Signed-off-by: Jeffrey Kardatzke
Signed-off-by: Yunfei Dong
---
.../media/common/videobuf2/videobuf2-core.c | 21 +++
.../media/common
ohn Stultz (2):
dma-heap: Add proper kref handling on dma-buf heaps
dma-heap: Provide accessors so that in-kernel drivers can allocate
dmabufs from specific heaps
T.J. Mercier (1):
dma-buf: heaps: Deduplicate docs and adopt common format
Xiaoyong Lu (1):
WIP: media: mediatek: v
Getting secure video playback (svp) flag when request output buffer, then
calling init interface to init svp parameters in optee-os.
Signed-off-by: Yunfei Dong
---
.../mediatek/vcodec/decoder/mtk_vcodec_dec.c | 139 +++---
1 file changed, 89 insertions(+), 50 deletions(-)
diff
Need secure buffer size to convert secure handle to secure
pa in optee-os, re-construct the vsi struct to store each
secure buffer size.
Separate svp and normal wait interrupt condition for svp mode
waiting hardware interrupt in optee-os.
Signed-off-by: Yunfei Dong
---
.../decoder/vdec
The capture buffer has two planes for format MM21, but user space only
allocate secure memory for plane[0], and the size is Y data + uv data.
The driver need to support one plane decoder for svp mode.
Signed-off-by: Yunfei Dong
---
.../mediatek/vcodec/decoder/mtk_vcodec_dec.c | 7
Allocate two share memory for each lat and core hardware used to share
information with optee-os. Msg buffer used to send ipi command and get ack
command with optee-os, data buffer used to store vsi information which
used for hardware decode.
Signed-off-by: Yunfei Dong
---
.../vcodec/decoder
The vsi buffer is allocated by tee share memory for svp mode, need to
use the share memory as the vsi address to store vsi data.
Signed-off-by: Yunfei Dong
---
.../vcodec/decoder/vdec/vdec_h264_req_multi_if.c | 9 +++--
.../media/platform/mediatek/vcodec/decoder/vdec_vpu_if.c | 8
Waiting interrupt in optee-os for svp mode, need to disable it in kernel
in case of interrupt is cleaned.
Signed-off-by: Yunfei Dong
---
.../vcodec/decoder/mtk_vcodec_dec_hw.c| 34 +--
.../vcodec/decoder/mtk_vcodec_dec_pm.c| 6 +-
.../decoder/vdec
Initialize tee private data to support secure decoder.
Release tee related information for each instance when decoder
done.
Signed-off-by: Yunfei Dong
---
.../platform/mediatek/vcodec/decoder/mtk_vcodec_dec_drv.c | 8
1 file changed, 8 insertions(+)
diff --git
a/drivers/media
Change hevc driver to support secure video playback(svp) for
mt8188. Need to map shared memory with optee interface and
wait interrupt in optee-os.
Signed-off-by: Yunfei Dong
---
.../decoder/vdec/vdec_hevc_req_multi_if.c | 89 +++
1 file changed, 54 insertions(+), 35
Open tee context to initialize the environment in order to communication
with optee-os, then open tee session as the communication pipeline for
lat and core to send data for hardware decode.
Signed-off-by: Yunfei Dong
---
.../platform/mediatek/vcodec/decoder/Makefile | 1 +
.../vcodec/decoder
The hardware can parse syntax to get nal_info, needn't to use cpu.
Signed-off-by: Yunfei Dong
---
.../vcodec/decoder/vdec/vdec_h264_req_multi_if.c| 13 ++---
1 file changed, 2 insertions(+), 11 deletions(-)
diff --git
a/drivers/media/platform/mediatek/vcodec/decoder
Define one uncompressed capture format V4L2_PIX_FMT_MS21 in order to
support one plane memory. The buffer size is luma + chroma, luma is
stored at the start and chrome is stored at the end.
Signed-off-by: Yunfei Dong
---
Documentation/userspace-api/media/v4l/pixfmt-reserved.rst | 8
Adding capture formats to support V4L2_PIX_FMT_MS21. This format has
one plane and only be used for secure video playback at current period.
Signed-off-by: Yunfei Dong
---
.../platform/mediatek/vcodec/decoder/mtk_vcodec_dec.c| 4 +++-
.../mediatek/vcodec/decoder/mtk_vcodec_dec_stateless.c
Setting msg and vsi information to shared buffer, then call tee invoke
function to send it to optee-os.
Signed-off-by: Yunfei Dong
---
.../vcodec/decoder/mtk_vcodec_dec_optee.c | 140 ++
.../vcodec/decoder/mtk_vcodec_dec_optee.h | 51 +++
2 files changed, 191
Need to call dma heap interface to allocate/free secure memory when playing
secure video.
Signed-off-by: Yunfei Dong
---
.../media/platform/mediatek/vcodec/Kconfig| 1 +
.../mediatek/vcodec/common/mtk_vcodec_util.c | 122 +-
.../mediatek/vcodec/common/mtk_vcodec_util.h
From: Jeffrey Kardatzke
Verfies in the dmabuf implementations that if the restricted memory
flag is set for a queue that the dmabuf submitted to the queue is
unmappable.
Signed-off-by: Jeffrey Kardatzke
Signed-off-by: Yunfei Dong
---
drivers/media/common/videobuf2/videobuf2-dma-contig.c | 8
Need to initialize msg and vsi information before sending to optee-os, then
calling optee invoke command to send the information to optee-os.
For the optee communication interface is different with scp, using
flag to separate them.
Signed-off-by: Yunfei Dong
---
.../vcodec/decoder
From: Jeffrey Kardatzke
Adds documentation for V4L2_MEMORY_FLAG_RESTRICTED.
Signed-off-by: Jeffrey Kardatzke
Signed-off-by: Yunfei Dong
---
Documentation/userspace-api/media/v4l/buffer.rst | 10 +-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/Documentation/userspace
d-off-by: Yong Wu
[Yong: Just add comment for "minor" and "refcount"]
Signed-off-by: Yunfei Dong
---
drivers/dma-buf/dma-heap.c | 29 +
include/linux/dma-heap.h | 2 ++
2 files changed, 31 insertions(+)
diff --git a/drivers/dma-buf/dma-heap.c b/d
in queue setup
v4l2: verify restricted dmabufs are used in restricted queue
v4l: add documentation for restricted memory flag
John Stultz (2):
dma-heap: Add proper kref handling on dma-buf heaps
dma-heap: Provide accessors so that in-kernel drivers can allocate
dmabufs from specific hea
rning]
Signed-off-by: Yunfei Dong
---
drivers/dma-buf/dma-heap.c | 83 ++
include/linux/dma-heap.h | 6 +++
2 files changed, 73 insertions(+), 16 deletions(-)
diff --git a/drivers/dma-buf/dma-heap.c b/drivers/dma-buf/dma-heap.c
index 97025ee8500f..6efe833a4b10 1
Remove multiple unused includes and alphabetize.
Signed-off-by: T.J. Mercier
Signed-off-by: Yong Wu
[Yong: Just add a comment for "priv" to mute build warning]
Signed-off-by: Yunfei Dong
---
drivers/dma-buf/dma-heap.c | 27 +++
include/linux/dma-heap.h | 21 +
From: Jeffrey Kardatzke
Adds a V4L2 flag which indicates that a queue is using restricted
dmabufs and the corresponding capability flag.
Signed-off-by: Jeffrey Kardatzke
Signed-off-by: Yunfei Dong
---
include/media/videobuf2-core.h | 8 +++-
include/uapi/linux/videodev2.h | 2 ++
2 files
1 - 100 of 506 matches
Mail list logo