Skip to content

: rockchip mpp for v4l2 video deocder

Randy Li linux-arm-kernel linux-media linux-rockchip lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest4 of 6 patches 2 repliesIn review

4 of 6 patches are in this archive. The cover letter announces 6.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6arm64: dts: rockchip: add power domain to iommuarch/arm64/boot/dts/rockchip/rk3328.dtsi arch/arm64/boot/dts/rockchip/rk3399.dtsi+6 -00 replies
2/6staging: video: rockchip: add v4l2 decoderdrivers/staging/rockchip-mpp/Kconfig drivers/staging/rockchip-mpp/Makefile drivers/staging/rockchip-mpp/mpp_debug.h +12 more+5417 -01 reply
3/6: rockchip: mpp: support qptabledrivers/staging/rockchip-mpp/mpp_dev_common.c drivers/staging/rockchip-mpp/mpp_dev_vdpu2.c drivers/staging/rockchip-mpp/vdpu2/mpeg2.c+17 -80 replies
4/6staging: video: rockchip: add video codecdrivers/staging/Kconfig drivers/staging/Makefile+3 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/6] [WIP]: rockchip mpp for v4l2 video deocder

Although I really want to push those work after I added more codec supports, but I found it is more urge to do those in v4l2 core framework and userspace.

I would use this driver to present the current problems, write down a summary here and I would reply to those threads later to push forward.

1. Slice construction is a bad idea. I think I have said my reason in the IRC and mail before, vp9 is always good example.

And it would request the driver to update QP table/CABAC table every slice.

I would make something to describe a buffer with some addtional meta data.

But the current request API limit a buffer with associated with an request buffer, which prevent sharing some sequence data, but it still can solve some problems.

2. Advantage DMA memory control.
I think I need to do some work at v4l2 core.

2.1 The DMA address of each planes. I have sent a mail before talked about why multiple planes is necessary for the rockchip platform. And it maybe required by the other platforms.

2.2 IOMMU resume
The most effective way to restore the decoder from critical error is doing a restting by reset controller.
Which would leading its slave IOMMU reset at the same time. Then none of those v4l2 buffers are mapping in the IOMMU.

3. H.264 and HEVC header
I still think those structure have some not necessary fileds in dpb or reference part, which I don't think hardware decoder would care about that or can be predict from the other information.

I would join to talk later.

4. The work flow of V4L2
I need a method to prepare the register set before the device acutally begin the transaction. Which is necessary for those high frame rate usecase.

Also it is useful for those device would share some hardware resources with the other device and it can save more power.

I think I need to do some work at v4l2 core.

Randy Li (6):
arm64: dts: rockchip: add power domain to iommu
staging: video: rockchip: add v4l2 decoder [TEST]: rockchip: mpp: support qptable
staging: video: rockchip: add video codec
arm64: dts: rockchip: boost clocks for rk3328
arm64: dts: rockchip: add video codec for rk3328

 .../arm64/boot/dts/rockchip/rk3328-rock64.dts |   32 +
 arch/arm64/boot/dts/rockchip/rk3328.dtsi      |  116 +-
 arch/arm64/boot/dts/rockchip/rk3399.dtsi      |    2 +
 drivers/staging/Kconfig                       |    2 +
 drivers/staging/Makefile                      |    1 +
 drivers/staging/rockchip-mpp/Kconfig          |   34 +
 drivers/staging/rockchip-mpp/Makefile         |   10 +
 drivers/staging/rockchip-mpp/mpp_debug.h      |   87 ++
 drivers/staging/rockchip-mpp/mpp_dev_common.c | 1367 +++++++++++++++++
 drivers/staging/rockchip-mpp/mpp_dev_common.h |  212 +++
 drivers/staging/rockchip-mpp/mpp_dev_rkvdec.c |  997 ++++++++++++
 drivers/staging/rockchip-mpp/mpp_dev_vdpu2.c  |  619 ++++++++
 drivers/staging/rockchip-mpp/mpp_service.c    |  197 +++
 drivers/staging/rockchip-mpp/mpp_service.h    |   38 +
 drivers/staging/rockchip-mpp/rkvdec/hal.h     |   63 +
 drivers/staging/rockchip-mpp/rkvdec/hevc.c    |  166 ++
 drivers/staging/rockchip-mpp/rkvdec/regs.h    |  608 ++++++++
 drivers/staging/rockchip-mpp/vdpu2/hal.h      |   52 +
 drivers/staging/rockchip-mpp/vdpu2/mpeg2.c    |  277 ++++
 drivers/staging/rockchip-mpp/vdpu2/regs.h     |  699 +++++++++
 20 files changed, 5575 insertions(+), 4 deletions(-)
 create mode 100644 drivers/staging/rockchip-mpp/Kconfig
 create mode 100644 drivers/staging/rockchip-mpp/Makefile
 create mode 100644 drivers/staging/rockchip-mpp/mpp_debug.h
 create mode 100644 drivers/staging/rockchip-mpp/mpp_dev_common.c
 create mode 100644 drivers/staging/rockchip-mpp/mpp_dev_common.h
 create mode 100644 drivers/staging/rockchip-mpp/mpp_dev_rkvdec.c
 create mode 100644 drivers/staging/rockchip-mpp/mpp_dev_vdpu2.c
 create mode 100644 drivers/staging/rockchip-mpp/mpp_service.c
 create mode 100644 drivers/staging/rockchip-mpp/mpp_service.h
 create mode 100644 drivers/staging/rockchip-mpp/rkvdec/hal.h
 create mode 100644 drivers/staging/rockchip-mpp/rkvdec/hevc.c
 create mode 100644 drivers/staging/rockchip-mpp/rkvdec/regs.h
 create mode 100644 drivers/staging/rockchip-mpp/vdpu2/hal.h
 create mode 100644 drivers/staging/rockchip-mpp/vdpu2/mpeg2.c
 create mode 100644 drivers/staging/rockchip-mpp/vdpu2/regs.h
Signature · 1 line
2.20.1