All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yunfei Dong <yunfei.dong@mediatek.com>
To: Yunfei Dong <yunfei.dong@mediatek.com>,
	Alexandre Courbot <acourbot@chromium.org>,
	Nicolas Dufresne <nicolas@ndufresne.ca>,
	"Hans Verkuil" <hverkuil-cisco@xs4all.nl>,
	AngeloGioacchino Del Regno 
	<angelogioacchino.delregno@collabora.com>,
	Benjamin Gaignard <benjamin.gaignard@collabora.com>,
	Tiffany Lin <tiffany.lin@mediatek.com>,
	Andrew-CT Chen <andrew-ct.chen@mediatek.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Rob Herring <robh+dt@kernel.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Tomasz Figa <tfiga@google.com>
Cc: George Sun <george.sun@mediatek.com>,
	Xiaoyong Lu <xiaoyong.lu@mediatek.com>,
	Hsin-Yi Wang <hsinyi@chromium.org>,
	Fritz Koenig <frkoenig@chromium.org>,
	Daniel Vetter <daniel@ffwll.ch>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	Irui Wang <irui.wang@mediatek.com>,
	"Steve Cho" <stevecho@chromium.org>,
	<linux-media@vger.kernel.org>, <devicetree@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-mediatek@lists.infradead.org>,
	<Project_Global_Chrome_Upstream_Group@mediatek.com>
Subject: [PATCH v11, 00/17] media: mtk-vcodec: support for M8192 decoder
Date: Fri, 6 May 2022 17:28:38 +0800	[thread overview]
Message-ID: <20220506092855.22940-1-yunfei.dong@mediatek.com> (raw)

This series adds support for mt8192 h264/vp8/vp9 decoder drivers. Firstly, refactor
power/clock/interrupt interfaces for mt8192 is lat and core architecture.

Secondly, add new functions to get frame buffer size and resolution according
to decoder capability from scp side. Then add callback function to get/put
capture buffer in order to enable lat and core decoder in parallel, need to
adjust GStreamer at the same time. 

Then add to support MT21C compressed mode and fix v4l2-compliance fail.

Next, extract H264 request api driver to let mt8183 and mt8192 use the same
code, and adds mt8192 frame based h264 driver for stateless decoder.

Lastly, add vp8 and vp9 stateless decoder drivers.

Patches 1 refactor power/clock/interrupt interface.
Patches 2~4 get frame buffer size and resolution according to decoder capability.
Patches 5 set capture queue bytesused.
Patches 6 adjust GStreamer.
Patch 7~11 add to support MT21C compressed mode and fix v4l2-compliance fail.
patch 12 record capture queue format type.
Patch 13~14 extract h264 driver and add mt8192 frame based driver for h264 decoder.
Patch 15~16 add vp8 and vp9 stateless decoder drivers.
Patch 17 prevent kernel crash when rmmod mtk-vcodec-dec.ko
---
changes compared with v10:
- fix sparse and smatch check fail for patch 13/14/16
- fix 32bit build fail for patch 14
changes compared with v9:
- fix kernel robot build fail for patch 16
changes compared with v8:
- fix vp9 build error
- fix kernel-doc fail
changes compared with v7:
- adjust GStreamer, separate src buffer done with v4l2_ctrl_request_complete for patch 6.
- remove v4l2_m2m_set_dst_buffered.
- add new patch to set each plane bytesused in buf prepare for patch 5.
- using upstream interface to update vp9 prob tables for patch 16.
- fix maintainer comments.
- test the driver with chrome VD and GStreamer(H264/VP9/VP8/AV1).
changes compared with v6:
- rebase to the latest media stage and fix conficts
- fix memcpy to memcpy_fromio or memcpy_toio
- fix h264 crash when test field bitstream
changes compared with v5:
- fix vp9 comments for patch 15
- fix vp8 comments for patch 14.
- fix comments for patch 12.
- fix build errors.
changes compared with v4:
- fix checkpatch.pl fail.
- fix kernel-doc fail.
- rebase to the latest media codec driver.
changes compared with v3:
- remove enum mtk_chip for patch 2.
- add vp8 stateless decoder drivers for patch 14.
- add vp9 stateless decoder drivers for patch 15.
changes compared with v2:
- add new patch 11 to record capture queue format type.
- separate patch 4 according to tzung-bi's suggestion.
- re-write commit message for patch 5 according to tzung-bi's suggestion.
changes compared with v1:
- rewrite commit message for patch 12.
- rewrite cover-letter message.
---
Yunfei Dong (17):
  media: mediatek: vcodec: Add vdec enable/disable hardware helpers
  media: mediatek: vcodec: Using firmware type to separate different
    firmware architecture
  media: mediatek: vcodec: get capture queue buffer size from scp
  media: mediatek: vcodec: Read max resolution from dec_capability
  media: mediatek: vcodec: set each plane bytesused in buf prepare
  media: mediatek: vcodec: Refactor get and put capture buffer flow
  media: mediatek: vcodec: Refactor supported vdec formats and
    framesizes
  media: mediatek: vcodec: Getting supported decoder format types
  media: mediatek: vcodec: Add format to support MT21C
  media: mediatek: vcodec: disable vp8 4K capability
  media: mediatek: vcodec: Fix v4l2-compliance fail
  media: mediatek: vcodec: record capture queue format type
  media: mediatek: vcodec: Extract H264 common code
  media: mediatek: vcodec: support stateless H.264 decoding for mt8192
  media: mediatek: vcodec: support stateless VP8 decoding
  media: mediatek: vcodec: support stateless VP9 decoding
  media: mediatek: vcodec: prevent kernel crash when rmmod
    mtk-vcodec-dec.ko

 .../media/platform/mediatek/vcodec/Kconfig    |    1 +
 .../media/platform/mediatek/vcodec/Makefile   |    4 +
 .../platform/mediatek/vcodec/mtk_vcodec_dec.c |   62 +-
 .../mediatek/vcodec/mtk_vcodec_dec_drv.c      |    8 +-
 .../mediatek/vcodec/mtk_vcodec_dec_pm.c       |  166 +-
 .../mediatek/vcodec/mtk_vcodec_dec_pm.h       |    6 +-
 .../mediatek/vcodec/mtk_vcodec_dec_stateful.c |   19 +-
 .../vcodec/mtk_vcodec_dec_stateless.c         |  257 ++-
 .../platform/mediatek/vcodec/mtk_vcodec_drv.h |   41 +-
 .../mediatek/vcodec/mtk_vcodec_enc_drv.c      |    5 -
 .../platform/mediatek/vcodec/mtk_vcodec_fw.c  |    6 +
 .../platform/mediatek/vcodec/mtk_vcodec_fw.h  |    1 +
 .../vcodec/vdec/vdec_h264_req_common.c        |  310 +++
 .../vcodec/vdec/vdec_h264_req_common.h        |  274 +++
 .../mediatek/vcodec/vdec/vdec_h264_req_if.c   |  438 +---
 .../vcodec/vdec/vdec_h264_req_multi_if.c      |  629 +++++
 .../mediatek/vcodec/vdec/vdec_vp8_req_if.c    |  437 ++++
 .../vcodec/vdec/vdec_vp9_req_lat_if.c         | 2031 +++++++++++++++++
 .../platform/mediatek/vcodec/vdec_drv_if.c    |   37 +-
 .../platform/mediatek/vcodec/vdec_drv_if.h    |    3 +
 .../platform/mediatek/vcodec/vdec_ipi_msg.h   |   36 +
 .../platform/mediatek/vcodec/vdec_msg_queue.c |    2 +
 .../platform/mediatek/vcodec/vdec_msg_queue.h |    2 +
 .../platform/mediatek/vcodec/vdec_vpu_if.c    |   53 +-
 .../platform/mediatek/vcodec/vdec_vpu_if.h    |   15 +
 .../platform/mediatek/vcodec/venc_vpu_if.c    |    2 +-
 include/linux/remoteproc/mtk_scp.h            |    2 +
 27 files changed, 4246 insertions(+), 601 deletions(-)
 create mode 100644 drivers/media/platform/mediatek/vcodec/vdec/vdec_h264_req_common.c
 create mode 100644 drivers/media/platform/mediatek/vcodec/vdec/vdec_h264_req_common.h
 create mode 100644 drivers/media/platform/mediatek/vcodec/vdec/vdec_h264_req_multi_if.c
 create mode 100644 drivers/media/platform/mediatek/vcodec/vdec/vdec_vp8_req_if.c
 create mode 100644 drivers/media/platform/mediatek/vcodec/vdec/vdec_vp9_req_lat_if.c

-- 
2.18.0


WARNING: multiple messages have this Message-ID (diff)
From: Yunfei Dong <yunfei.dong@mediatek.com>
To: Yunfei Dong <yunfei.dong@mediatek.com>,
	Alexandre Courbot <acourbot@chromium.org>,
	Nicolas Dufresne <nicolas@ndufresne.ca>,
	"Hans Verkuil" <hverkuil-cisco@xs4all.nl>,
	AngeloGioacchino Del Regno
	<angelogioacchino.delregno@collabora.com>,
	Benjamin Gaignard <benjamin.gaignard@collabora.com>,
	Tiffany Lin <tiffany.lin@mediatek.com>,
	Andrew-CT Chen <andrew-ct.chen@mediatek.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Rob Herring <robh+dt@kernel.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Tomasz Figa <tfiga@google.com>
Cc: Irui Wang <irui.wang@mediatek.com>,
	George Sun <george.sun@mediatek.com>,
	Steve Cho <stevecho@chromium.org>,
	devicetree@vger.kernel.org,
	Project_Global_Chrome_Upstream_Group@mediatek.com,
	linux-kernel@vger.kernel.org,
	dri-devel <dri-devel@lists.freedesktop.org>,
	Xiaoyong Lu <xiaoyong.lu@mediatek.com>,
	linux-mediatek@lists.infradead.org,
	Hsin-Yi Wang <hsinyi@chromium.org>,
	Fritz Koenig <frkoenig@chromium.org>,
	linux-arm-kernel@lists.infradead.org,
	linux-media@vger.kernel.org
Subject: [PATCH v11, 00/17] media: mtk-vcodec: support for M8192 decoder
Date: Fri, 6 May 2022 17:28:38 +0800	[thread overview]
Message-ID: <20220506092855.22940-1-yunfei.dong@mediatek.com> (raw)

This series adds support for mt8192 h264/vp8/vp9 decoder drivers. Firstly, refactor
power/clock/interrupt interfaces for mt8192 is lat and core architecture.

Secondly, add new functions to get frame buffer size and resolution according
to decoder capability from scp side. Then add callback function to get/put
capture buffer in order to enable lat and core decoder in parallel, need to
adjust GStreamer at the same time. 

Then add to support MT21C compressed mode and fix v4l2-compliance fail.

Next, extract H264 request api driver to let mt8183 and mt8192 use the same
code, and adds mt8192 frame based h264 driver for stateless decoder.

Lastly, add vp8 and vp9 stateless decoder drivers.

Patches 1 refactor power/clock/interrupt interface.
Patches 2~4 get frame buffer size and resolution according to decoder capability.
Patches 5 set capture queue bytesused.
Patches 6 adjust GStreamer.
Patch 7~11 add to support MT21C compressed mode and fix v4l2-compliance fail.
patch 12 record capture queue format type.
Patch 13~14 extract h264 driver and add mt8192 frame based driver for h264 decoder.
Patch 15~16 add vp8 and vp9 stateless decoder drivers.
Patch 17 prevent kernel crash when rmmod mtk-vcodec-dec.ko
---
changes compared with v10:
- fix sparse and smatch check fail for patch 13/14/16
- fix 32bit build fail for patch 14
changes compared with v9:
- fix kernel robot build fail for patch 16
changes compared with v8:
- fix vp9 build error
- fix kernel-doc fail
changes compared with v7:
- adjust GStreamer, separate src buffer done with v4l2_ctrl_request_complete for patch 6.
- remove v4l2_m2m_set_dst_buffered.
- add new patch to set each plane bytesused in buf prepare for patch 5.
- using upstream interface to update vp9 prob tables for patch 16.
- fix maintainer comments.
- test the driver with chrome VD and GStreamer(H264/VP9/VP8/AV1).
changes compared with v6:
- rebase to the latest media stage and fix conficts
- fix memcpy to memcpy_fromio or memcpy_toio
- fix h264 crash when test field bitstream
changes compared with v5:
- fix vp9 comments for patch 15
- fix vp8 comments for patch 14.
- fix comments for patch 12.
- fix build errors.
changes compared with v4:
- fix checkpatch.pl fail.
- fix kernel-doc fail.
- rebase to the latest media codec driver.
changes compared with v3:
- remove enum mtk_chip for patch 2.
- add vp8 stateless decoder drivers for patch 14.
- add vp9 stateless decoder drivers for patch 15.
changes compared with v2:
- add new patch 11 to record capture queue format type.
- separate patch 4 according to tzung-bi's suggestion.
- re-write commit message for patch 5 according to tzung-bi's suggestion.
changes compared with v1:
- rewrite commit message for patch 12.
- rewrite cover-letter message.
---
Yunfei Dong (17):
  media: mediatek: vcodec: Add vdec enable/disable hardware helpers
  media: mediatek: vcodec: Using firmware type to separate different
    firmware architecture
  media: mediatek: vcodec: get capture queue buffer size from scp
  media: mediatek: vcodec: Read max resolution from dec_capability
  media: mediatek: vcodec: set each plane bytesused in buf prepare
  media: mediatek: vcodec: Refactor get and put capture buffer flow
  media: mediatek: vcodec: Refactor supported vdec formats and
    framesizes
  media: mediatek: vcodec: Getting supported decoder format types
  media: mediatek: vcodec: Add format to support MT21C
  media: mediatek: vcodec: disable vp8 4K capability
  media: mediatek: vcodec: Fix v4l2-compliance fail
  media: mediatek: vcodec: record capture queue format type
  media: mediatek: vcodec: Extract H264 common code
  media: mediatek: vcodec: support stateless H.264 decoding for mt8192
  media: mediatek: vcodec: support stateless VP8 decoding
  media: mediatek: vcodec: support stateless VP9 decoding
  media: mediatek: vcodec: prevent kernel crash when rmmod
    mtk-vcodec-dec.ko

 .../media/platform/mediatek/vcodec/Kconfig    |    1 +
 .../media/platform/mediatek/vcodec/Makefile   |    4 +
 .../platform/mediatek/vcodec/mtk_vcodec_dec.c |   62 +-
 .../mediatek/vcodec/mtk_vcodec_dec_drv.c      |    8 +-
 .../mediatek/vcodec/mtk_vcodec_dec_pm.c       |  166 +-
 .../mediatek/vcodec/mtk_vcodec_dec_pm.h       |    6 +-
 .../mediatek/vcodec/mtk_vcodec_dec_stateful.c |   19 +-
 .../vcodec/mtk_vcodec_dec_stateless.c         |  257 ++-
 .../platform/mediatek/vcodec/mtk_vcodec_drv.h |   41 +-
 .../mediatek/vcodec/mtk_vcodec_enc_drv.c      |    5 -
 .../platform/mediatek/vcodec/mtk_vcodec_fw.c  |    6 +
 .../platform/mediatek/vcodec/mtk_vcodec_fw.h  |    1 +
 .../vcodec/vdec/vdec_h264_req_common.c        |  310 +++
 .../vcodec/vdec/vdec_h264_req_common.h        |  274 +++
 .../mediatek/vcodec/vdec/vdec_h264_req_if.c   |  438 +---
 .../vcodec/vdec/vdec_h264_req_multi_if.c      |  629 +++++
 .../mediatek/vcodec/vdec/vdec_vp8_req_if.c    |  437 ++++
 .../vcodec/vdec/vdec_vp9_req_lat_if.c         | 2031 +++++++++++++++++
 .../platform/mediatek/vcodec/vdec_drv_if.c    |   37 +-
 .../platform/mediatek/vcodec/vdec_drv_if.h    |    3 +
 .../platform/mediatek/vcodec/vdec_ipi_msg.h   |   36 +
 .../platform/mediatek/vcodec/vdec_msg_queue.c |    2 +
 .../platform/mediatek/vcodec/vdec_msg_queue.h |    2 +
 .../platform/mediatek/vcodec/vdec_vpu_if.c    |   53 +-
 .../platform/mediatek/vcodec/vdec_vpu_if.h    |   15 +
 .../platform/mediatek/vcodec/venc_vpu_if.c    |    2 +-
 include/linux/remoteproc/mtk_scp.h            |    2 +
 27 files changed, 4246 insertions(+), 601 deletions(-)
 create mode 100644 drivers/media/platform/mediatek/vcodec/vdec/vdec_h264_req_common.c
 create mode 100644 drivers/media/platform/mediatek/vcodec/vdec/vdec_h264_req_common.h
 create mode 100644 drivers/media/platform/mediatek/vcodec/vdec/vdec_h264_req_multi_if.c
 create mode 100644 drivers/media/platform/mediatek/vcodec/vdec/vdec_vp8_req_if.c
 create mode 100644 drivers/media/platform/mediatek/vcodec/vdec/vdec_vp9_req_lat_if.c

-- 
2.18.0


WARNING: multiple messages have this Message-ID (diff)
From: Yunfei Dong <yunfei.dong@mediatek.com>
To: Yunfei Dong <yunfei.dong@mediatek.com>,
	Alexandre Courbot <acourbot@chromium.org>,
	Nicolas Dufresne <nicolas@ndufresne.ca>,
	"Hans Verkuil" <hverkuil-cisco@xs4all.nl>,
	AngeloGioacchino Del Regno
	<angelogioacchino.delregno@collabora.com>,
	Benjamin Gaignard <benjamin.gaignard@collabora.com>,
	Tiffany Lin <tiffany.lin@mediatek.com>,
	Andrew-CT Chen <andrew-ct.chen@mediatek.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Rob Herring <robh+dt@kernel.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Tomasz Figa <tfiga@google.com>
Cc: George Sun <george.sun@mediatek.com>,
	Xiaoyong Lu <xiaoyong.lu@mediatek.com>,
	Hsin-Yi Wang <hsinyi@chromium.org>,
	Fritz Koenig <frkoenig@chromium.org>,
	Daniel Vetter <daniel@ffwll.ch>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	Irui Wang <irui.wang@mediatek.com>,
	"Steve Cho" <stevecho@chromium.org>,
	<linux-media@vger.kernel.org>, <devicetree@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-mediatek@lists.infradead.org>,
	 <Project_Global_Chrome_Upstream_Group@mediatek.com>
Subject: [PATCH v11, 00/17] media: mtk-vcodec: support for M8192 decoder
Date: Fri, 6 May 2022 17:28:38 +0800	[thread overview]
Message-ID: <20220506092855.22940-1-yunfei.dong@mediatek.com> (raw)

This series adds support for mt8192 h264/vp8/vp9 decoder drivers. Firstly, refactor
power/clock/interrupt interfaces for mt8192 is lat and core architecture.

Secondly, add new functions to get frame buffer size and resolution according
to decoder capability from scp side. Then add callback function to get/put
capture buffer in order to enable lat and core decoder in parallel, need to
adjust GStreamer at the same time. 

Then add to support MT21C compressed mode and fix v4l2-compliance fail.

Next, extract H264 request api driver to let mt8183 and mt8192 use the same
code, and adds mt8192 frame based h264 driver for stateless decoder.

Lastly, add vp8 and vp9 stateless decoder drivers.

Patches 1 refactor power/clock/interrupt interface.
Patches 2~4 get frame buffer size and resolution according to decoder capability.
Patches 5 set capture queue bytesused.
Patches 6 adjust GStreamer.
Patch 7~11 add to support MT21C compressed mode and fix v4l2-compliance fail.
patch 12 record capture queue format type.
Patch 13~14 extract h264 driver and add mt8192 frame based driver for h264 decoder.
Patch 15~16 add vp8 and vp9 stateless decoder drivers.
Patch 17 prevent kernel crash when rmmod mtk-vcodec-dec.ko
---
changes compared with v10:
- fix sparse and smatch check fail for patch 13/14/16
- fix 32bit build fail for patch 14
changes compared with v9:
- fix kernel robot build fail for patch 16
changes compared with v8:
- fix vp9 build error
- fix kernel-doc fail
changes compared with v7:
- adjust GStreamer, separate src buffer done with v4l2_ctrl_request_complete for patch 6.
- remove v4l2_m2m_set_dst_buffered.
- add new patch to set each plane bytesused in buf prepare for patch 5.
- using upstream interface to update vp9 prob tables for patch 16.
- fix maintainer comments.
- test the driver with chrome VD and GStreamer(H264/VP9/VP8/AV1).
changes compared with v6:
- rebase to the latest media stage and fix conficts
- fix memcpy to memcpy_fromio or memcpy_toio
- fix h264 crash when test field bitstream
changes compared with v5:
- fix vp9 comments for patch 15
- fix vp8 comments for patch 14.
- fix comments for patch 12.
- fix build errors.
changes compared with v4:
- fix checkpatch.pl fail.
- fix kernel-doc fail.
- rebase to the latest media codec driver.
changes compared with v3:
- remove enum mtk_chip for patch 2.
- add vp8 stateless decoder drivers for patch 14.
- add vp9 stateless decoder drivers for patch 15.
changes compared with v2:
- add new patch 11 to record capture queue format type.
- separate patch 4 according to tzung-bi's suggestion.
- re-write commit message for patch 5 according to tzung-bi's suggestion.
changes compared with v1:
- rewrite commit message for patch 12.
- rewrite cover-letter message.
---
Yunfei Dong (17):
  media: mediatek: vcodec: Add vdec enable/disable hardware helpers
  media: mediatek: vcodec: Using firmware type to separate different
    firmware architecture
  media: mediatek: vcodec: get capture queue buffer size from scp
  media: mediatek: vcodec: Read max resolution from dec_capability
  media: mediatek: vcodec: set each plane bytesused in buf prepare
  media: mediatek: vcodec: Refactor get and put capture buffer flow
  media: mediatek: vcodec: Refactor supported vdec formats and
    framesizes
  media: mediatek: vcodec: Getting supported decoder format types
  media: mediatek: vcodec: Add format to support MT21C
  media: mediatek: vcodec: disable vp8 4K capability
  media: mediatek: vcodec: Fix v4l2-compliance fail
  media: mediatek: vcodec: record capture queue format type
  media: mediatek: vcodec: Extract H264 common code
  media: mediatek: vcodec: support stateless H.264 decoding for mt8192
  media: mediatek: vcodec: support stateless VP8 decoding
  media: mediatek: vcodec: support stateless VP9 decoding
  media: mediatek: vcodec: prevent kernel crash when rmmod
    mtk-vcodec-dec.ko

 .../media/platform/mediatek/vcodec/Kconfig    |    1 +
 .../media/platform/mediatek/vcodec/Makefile   |    4 +
 .../platform/mediatek/vcodec/mtk_vcodec_dec.c |   62 +-
 .../mediatek/vcodec/mtk_vcodec_dec_drv.c      |    8 +-
 .../mediatek/vcodec/mtk_vcodec_dec_pm.c       |  166 +-
 .../mediatek/vcodec/mtk_vcodec_dec_pm.h       |    6 +-
 .../mediatek/vcodec/mtk_vcodec_dec_stateful.c |   19 +-
 .../vcodec/mtk_vcodec_dec_stateless.c         |  257 ++-
 .../platform/mediatek/vcodec/mtk_vcodec_drv.h |   41 +-
 .../mediatek/vcodec/mtk_vcodec_enc_drv.c      |    5 -
 .../platform/mediatek/vcodec/mtk_vcodec_fw.c  |    6 +
 .../platform/mediatek/vcodec/mtk_vcodec_fw.h  |    1 +
 .../vcodec/vdec/vdec_h264_req_common.c        |  310 +++
 .../vcodec/vdec/vdec_h264_req_common.h        |  274 +++
 .../mediatek/vcodec/vdec/vdec_h264_req_if.c   |  438 +---
 .../vcodec/vdec/vdec_h264_req_multi_if.c      |  629 +++++
 .../mediatek/vcodec/vdec/vdec_vp8_req_if.c    |  437 ++++
 .../vcodec/vdec/vdec_vp9_req_lat_if.c         | 2031 +++++++++++++++++
 .../platform/mediatek/vcodec/vdec_drv_if.c    |   37 +-
 .../platform/mediatek/vcodec/vdec_drv_if.h    |    3 +
 .../platform/mediatek/vcodec/vdec_ipi_msg.h   |   36 +
 .../platform/mediatek/vcodec/vdec_msg_queue.c |    2 +
 .../platform/mediatek/vcodec/vdec_msg_queue.h |    2 +
 .../platform/mediatek/vcodec/vdec_vpu_if.c    |   53 +-
 .../platform/mediatek/vcodec/vdec_vpu_if.h    |   15 +
 .../platform/mediatek/vcodec/venc_vpu_if.c    |    2 +-
 include/linux/remoteproc/mtk_scp.h            |    2 +
 27 files changed, 4246 insertions(+), 601 deletions(-)
 create mode 100644 drivers/media/platform/mediatek/vcodec/vdec/vdec_h264_req_common.c
 create mode 100644 drivers/media/platform/mediatek/vcodec/vdec/vdec_h264_req_common.h
 create mode 100644 drivers/media/platform/mediatek/vcodec/vdec/vdec_h264_req_multi_if.c
 create mode 100644 drivers/media/platform/mediatek/vcodec/vdec/vdec_vp8_req_if.c
 create mode 100644 drivers/media/platform/mediatek/vcodec/vdec/vdec_vp9_req_lat_if.c

-- 
2.18.0


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

WARNING: multiple messages have this Message-ID (diff)
From: Yunfei Dong <yunfei.dong@mediatek.com>
To: Yunfei Dong <yunfei.dong@mediatek.com>,
	Alexandre Courbot <acourbot@chromium.org>,
	Nicolas Dufresne <nicolas@ndufresne.ca>,
	"Hans Verkuil" <hverkuil-cisco@xs4all.nl>,
	AngeloGioacchino Del Regno
	<angelogioacchino.delregno@collabora.com>,
	Benjamin Gaignard <benjamin.gaignard@collabora.com>,
	Tiffany Lin <tiffany.lin@mediatek.com>,
	Andrew-CT Chen <andrew-ct.chen@mediatek.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Rob Herring <robh+dt@kernel.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Tomasz Figa <tfiga@google.com>
Cc: George Sun <george.sun@mediatek.com>,
	Xiaoyong Lu <xiaoyong.lu@mediatek.com>,
	Hsin-Yi Wang <hsinyi@chromium.org>,
	Fritz Koenig <frkoenig@chromium.org>,
	Daniel Vetter <daniel@ffwll.ch>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	Irui Wang <irui.wang@mediatek.com>,
	"Steve Cho" <stevecho@chromium.org>,
	<linux-media@vger.kernel.org>, <devicetree@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-mediatek@lists.infradead.org>,
	 <Project_Global_Chrome_Upstream_Group@mediatek.com>
Subject: [PATCH v11, 00/17] media: mtk-vcodec: support for M8192 decoder
Date: Fri, 6 May 2022 17:28:38 +0800	[thread overview]
Message-ID: <20220506092855.22940-1-yunfei.dong@mediatek.com> (raw)

This series adds support for mt8192 h264/vp8/vp9 decoder drivers. Firstly, refactor
power/clock/interrupt interfaces for mt8192 is lat and core architecture.

Secondly, add new functions to get frame buffer size and resolution according
to decoder capability from scp side. Then add callback function to get/put
capture buffer in order to enable lat and core decoder in parallel, need to
adjust GStreamer at the same time. 

Then add to support MT21C compressed mode and fix v4l2-compliance fail.

Next, extract H264 request api driver to let mt8183 and mt8192 use the same
code, and adds mt8192 frame based h264 driver for stateless decoder.

Lastly, add vp8 and vp9 stateless decoder drivers.

Patches 1 refactor power/clock/interrupt interface.
Patches 2~4 get frame buffer size and resolution according to decoder capability.
Patches 5 set capture queue bytesused.
Patches 6 adjust GStreamer.
Patch 7~11 add to support MT21C compressed mode and fix v4l2-compliance fail.
patch 12 record capture queue format type.
Patch 13~14 extract h264 driver and add mt8192 frame based driver for h264 decoder.
Patch 15~16 add vp8 and vp9 stateless decoder drivers.
Patch 17 prevent kernel crash when rmmod mtk-vcodec-dec.ko
---
changes compared with v10:
- fix sparse and smatch check fail for patch 13/14/16
- fix 32bit build fail for patch 14
changes compared with v9:
- fix kernel robot build fail for patch 16
changes compared with v8:
- fix vp9 build error
- fix kernel-doc fail
changes compared with v7:
- adjust GStreamer, separate src buffer done with v4l2_ctrl_request_complete for patch 6.
- remove v4l2_m2m_set_dst_buffered.
- add new patch to set each plane bytesused in buf prepare for patch 5.
- using upstream interface to update vp9 prob tables for patch 16.
- fix maintainer comments.
- test the driver with chrome VD and GStreamer(H264/VP9/VP8/AV1).
changes compared with v6:
- rebase to the latest media stage and fix conficts
- fix memcpy to memcpy_fromio or memcpy_toio
- fix h264 crash when test field bitstream
changes compared with v5:
- fix vp9 comments for patch 15
- fix vp8 comments for patch 14.
- fix comments for patch 12.
- fix build errors.
changes compared with v4:
- fix checkpatch.pl fail.
- fix kernel-doc fail.
- rebase to the latest media codec driver.
changes compared with v3:
- remove enum mtk_chip for patch 2.
- add vp8 stateless decoder drivers for patch 14.
- add vp9 stateless decoder drivers for patch 15.
changes compared with v2:
- add new patch 11 to record capture queue format type.
- separate patch 4 according to tzung-bi's suggestion.
- re-write commit message for patch 5 according to tzung-bi's suggestion.
changes compared with v1:
- rewrite commit message for patch 12.
- rewrite cover-letter message.
---
Yunfei Dong (17):
  media: mediatek: vcodec: Add vdec enable/disable hardware helpers
  media: mediatek: vcodec: Using firmware type to separate different
    firmware architecture
  media: mediatek: vcodec: get capture queue buffer size from scp
  media: mediatek: vcodec: Read max resolution from dec_capability
  media: mediatek: vcodec: set each plane bytesused in buf prepare
  media: mediatek: vcodec: Refactor get and put capture buffer flow
  media: mediatek: vcodec: Refactor supported vdec formats and
    framesizes
  media: mediatek: vcodec: Getting supported decoder format types
  media: mediatek: vcodec: Add format to support MT21C
  media: mediatek: vcodec: disable vp8 4K capability
  media: mediatek: vcodec: Fix v4l2-compliance fail
  media: mediatek: vcodec: record capture queue format type
  media: mediatek: vcodec: Extract H264 common code
  media: mediatek: vcodec: support stateless H.264 decoding for mt8192
  media: mediatek: vcodec: support stateless VP8 decoding
  media: mediatek: vcodec: support stateless VP9 decoding
  media: mediatek: vcodec: prevent kernel crash when rmmod
    mtk-vcodec-dec.ko

 .../media/platform/mediatek/vcodec/Kconfig    |    1 +
 .../media/platform/mediatek/vcodec/Makefile   |    4 +
 .../platform/mediatek/vcodec/mtk_vcodec_dec.c |   62 +-
 .../mediatek/vcodec/mtk_vcodec_dec_drv.c      |    8 +-
 .../mediatek/vcodec/mtk_vcodec_dec_pm.c       |  166 +-
 .../mediatek/vcodec/mtk_vcodec_dec_pm.h       |    6 +-
 .../mediatek/vcodec/mtk_vcodec_dec_stateful.c |   19 +-
 .../vcodec/mtk_vcodec_dec_stateless.c         |  257 ++-
 .../platform/mediatek/vcodec/mtk_vcodec_drv.h |   41 +-
 .../mediatek/vcodec/mtk_vcodec_enc_drv.c      |    5 -
 .../platform/mediatek/vcodec/mtk_vcodec_fw.c  |    6 +
 .../platform/mediatek/vcodec/mtk_vcodec_fw.h  |    1 +
 .../vcodec/vdec/vdec_h264_req_common.c        |  310 +++
 .../vcodec/vdec/vdec_h264_req_common.h        |  274 +++
 .../mediatek/vcodec/vdec/vdec_h264_req_if.c   |  438 +---
 .../vcodec/vdec/vdec_h264_req_multi_if.c      |  629 +++++
 .../mediatek/vcodec/vdec/vdec_vp8_req_if.c    |  437 ++++
 .../vcodec/vdec/vdec_vp9_req_lat_if.c         | 2031 +++++++++++++++++
 .../platform/mediatek/vcodec/vdec_drv_if.c    |   37 +-
 .../platform/mediatek/vcodec/vdec_drv_if.h    |    3 +
 .../platform/mediatek/vcodec/vdec_ipi_msg.h   |   36 +
 .../platform/mediatek/vcodec/vdec_msg_queue.c |    2 +
 .../platform/mediatek/vcodec/vdec_msg_queue.h |    2 +
 .../platform/mediatek/vcodec/vdec_vpu_if.c    |   53 +-
 .../platform/mediatek/vcodec/vdec_vpu_if.h    |   15 +
 .../platform/mediatek/vcodec/venc_vpu_if.c    |    2 +-
 include/linux/remoteproc/mtk_scp.h            |    2 +
 27 files changed, 4246 insertions(+), 601 deletions(-)
 create mode 100644 drivers/media/platform/mediatek/vcodec/vdec/vdec_h264_req_common.c
 create mode 100644 drivers/media/platform/mediatek/vcodec/vdec/vdec_h264_req_common.h
 create mode 100644 drivers/media/platform/mediatek/vcodec/vdec/vdec_h264_req_multi_if.c
 create mode 100644 drivers/media/platform/mediatek/vcodec/vdec/vdec_vp8_req_if.c
 create mode 100644 drivers/media/platform/mediatek/vcodec/vdec/vdec_vp9_req_lat_if.c

-- 
2.18.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

             reply	other threads:[~2022-05-06  9:29 UTC|newest]

Thread overview: 76+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-06  9:28 Yunfei Dong [this message]
2022-05-06  9:28 ` [PATCH v11, 00/17] media: mtk-vcodec: support for M8192 decoder Yunfei Dong
2022-05-06  9:28 ` Yunfei Dong
2022-05-06  9:28 ` Yunfei Dong
2022-05-06  9:28 ` [PATCH v11, 01/17] media: mediatek: vcodec: Add vdec enable/disable hardware helpers Yunfei Dong
2022-05-06  9:28   ` Yunfei Dong
2022-05-06  9:28   ` Yunfei Dong
2022-05-06  9:28   ` Yunfei Dong
2022-05-06  9:28 ` [PATCH v11, 02/17] media: mediatek: vcodec: Using firmware type to separate different firmware architecture Yunfei Dong
2022-05-06  9:28   ` Yunfei Dong
2022-05-06  9:28   ` Yunfei Dong
2022-05-06  9:28   ` Yunfei Dong
2022-05-06  9:28 ` [PATCH v11, 03/17] media: mediatek: vcodec: get capture queue buffer size from scp Yunfei Dong
2022-05-06  9:28   ` Yunfei Dong
2022-05-06  9:28   ` Yunfei Dong
2022-05-06  9:28   ` Yunfei Dong
2022-05-06  9:28 ` [PATCH v11, 04/17] media: mediatek: vcodec: Read max resolution from dec_capability Yunfei Dong
2022-05-06  9:28   ` Yunfei Dong
2022-05-06  9:28   ` Yunfei Dong
2022-05-06  9:28   ` Yunfei Dong
2022-05-06  9:28 ` [PATCH v11, 05/17] media: mediatek: vcodec: set each plane bytesused in buf prepare Yunfei Dong
2022-05-06  9:28   ` Yunfei Dong
2022-05-06  9:28   ` Yunfei Dong
2022-05-06  9:28   ` Yunfei Dong
2022-05-06  9:28 ` [PATCH v11, 06/17] media: mediatek: vcodec: Refactor get and put capture buffer flow Yunfei Dong
2022-05-06  9:28   ` Yunfei Dong
2022-05-06  9:28   ` Yunfei Dong
2022-05-06  9:28   ` Yunfei Dong
2022-05-06  9:28 ` [PATCH v11, 07/17] media: mediatek: vcodec: Refactor supported vdec formats and framesizes Yunfei Dong
2022-05-06  9:28   ` Yunfei Dong
2022-05-06  9:28   ` Yunfei Dong
2022-05-06  9:28   ` Yunfei Dong
2022-05-06  9:28 ` [PATCH v11, 08/17] media: mediatek: vcodec: Getting supported decoder format types Yunfei Dong
2022-05-06  9:28   ` Yunfei Dong
2022-05-06  9:28   ` Yunfei Dong
2022-05-06  9:28   ` Yunfei Dong
2022-05-06  9:28 ` [PATCH v11, 09/17] media: mediatek: vcodec: Add format to support MT21C Yunfei Dong
2022-05-06  9:28   ` Yunfei Dong
2022-05-06  9:28   ` Yunfei Dong
2022-05-06  9:28   ` Yunfei Dong
2022-05-06  9:28 ` [PATCH v11, 10/17] media: mediatek: vcodec: disable vp8 4K capability Yunfei Dong
2022-05-06  9:28   ` Yunfei Dong
2022-05-06  9:28   ` Yunfei Dong
2022-05-06  9:28   ` Yunfei Dong
2022-05-06  9:28 ` [PATCH v11, 11/17] media: mediatek: vcodec: Fix v4l2-compliance fail Yunfei Dong
2022-05-06  9:28   ` Yunfei Dong
2022-05-06  9:28   ` Yunfei Dong
2022-05-06  9:28   ` Yunfei Dong
2022-05-06  9:28 ` [PATCH v11, 12/17] media: mediatek: vcodec: record capture queue format type Yunfei Dong
2022-05-06  9:28   ` Yunfei Dong
2022-05-06  9:28   ` Yunfei Dong
2022-05-06  9:28   ` Yunfei Dong
2022-05-06  9:28 ` [PATCH v11, 13/17] media: mediatek: vcodec: Extract H264 common code Yunfei Dong
2022-05-06  9:28   ` Yunfei Dong
2022-05-06  9:28   ` Yunfei Dong
2022-05-06  9:28   ` Yunfei Dong
2022-05-09  8:34   ` Hans Verkuil
2022-05-09  8:34     ` Hans Verkuil
2022-05-09  8:34     ` Hans Verkuil
2022-05-09  8:34     ` Hans Verkuil
2022-05-06  9:28 ` [PATCH v11, 14/17] media: mediatek: vcodec: support stateless H.264 decoding for mt8192 Yunfei Dong
2022-05-06  9:28   ` Yunfei Dong
2022-05-06  9:28   ` Yunfei Dong
2022-05-06  9:28   ` Yunfei Dong
2022-05-06  9:28 ` [PATCH v11, 15/17] media: mediatek: vcodec: support stateless VP8 decoding Yunfei Dong
2022-05-06  9:28   ` Yunfei Dong
2022-05-06  9:28   ` Yunfei Dong
2022-05-06  9:28   ` Yunfei Dong
2022-05-06  9:28 ` [PATCH v11, 16/17] media: mediatek: vcodec: support stateless VP9 decoding Yunfei Dong
2022-05-06  9:28   ` Yunfei Dong
2022-05-06  9:28   ` Yunfei Dong
2022-05-06  9:28   ` Yunfei Dong
2022-05-06  9:28 ` [PATCH v11, 17/17] media: mediatek: vcodec: prevent kernel crash when rmmod mtk-vcodec-dec.ko Yunfei Dong
2022-05-06  9:28   ` Yunfei Dong
2022-05-06  9:28   ` Yunfei Dong
2022-05-06  9:28   ` Yunfei Dong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220506092855.22940-1-yunfei.dong@mediatek.com \
    --to=yunfei.dong@mediatek.com \
    --cc=Project_Global_Chrome_Upstream_Group@mediatek.com \
    --cc=acourbot@chromium.org \
    --cc=andrew-ct.chen@mediatek.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=benjamin.gaignard@collabora.com \
    --cc=daniel@ffwll.ch \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=frkoenig@chromium.org \
    --cc=george.sun@mediatek.com \
    --cc=hsinyi@chromium.org \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=irui.wang@mediatek.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=mchehab@kernel.org \
    --cc=nicolas@ndufresne.ca \
    --cc=robh+dt@kernel.org \
    --cc=stevecho@chromium.org \
    --cc=tfiga@google.com \
    --cc=tiffany.lin@mediatek.com \
    --cc=xiaoyong.lu@mediatek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.