All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v6, 00/15] Using component framework to support multi hardware decode
@ 2021-09-01  8:32 ` Yunfei Dong
  0 siblings, 0 replies; 115+ messages in thread
From: Yunfei Dong @ 2021-09-01  8:32 UTC (permalink / raw)
  To: Yunfei Dong, Alexandre Courbot, Hans Verkuil, Tzung-Bi Shih,
	Tiffany Lin, Andrew-CT Chen, Mauro Carvalho Chehab, Rob Herring,
	Matthias Brugger, Tomasz Figa, Laurent Pinchart
  Cc: Daniel Vetter, dri-devel, Hsin-Yi Wang, Fritz Koenig, Irui Wang,
	linux-media, devicetree, linux-kernel, linux-arm-kernel,
	srv_heupstream, linux-mediatek,
	Project_Global_Chrome_Upstream_Group

This series adds support for multi hardware decode into mtk-vcodec, by first
adding component framework to manage each hardware information: interrupt,
clock, register bases and power. Secondly add core thread to deal with core
hardware message, at the same time, add msg queue for different hardware
share messages. Lastly, the architecture of different specs are not the same,
using specs type to separate them.

This series has been tested with both MT8183 and MT8173. Decoding was working
for both chips.

Patches 1~3 rewrite get register bases and power on/off interface.

Patch 4 add component framework to support multi hardware.

Patch 5 separate video encoder and decoder document

Patches 6-15 add interfaces to support core hardware.
----
This patch dependents on : "media: mtk-vcodec: support for MT8183 decoder"[1] and
"Mediatek MT8192 clock support"[2].

1: Multi hardware decode is based on stateless decoder, MT8183 is the first time
to add stateless decoder. Otherwise it will cause conflict. This patch will be
accepted in 5.15[1].

2: The definition of decoder clocks are in mt8192-clk.h, this patch already in clk tree[2].

[1]https://patchwork.linuxtv.org/project/linux-media/list/?series=5826
[2]https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git/commit/?h=clk-next&id=f35f1a23e0e12e3173e9e9dedbc150d139027189
----
Changes compared with v5:
-Add decoder hardware block diagram for patch 13/15

Changes compared with v4:
- Fix comments for patch 4/15
  >> +     if (dev->is_comp_supported) {
  >> +             ret = mtk_vcodec_init_master(dev);
  >> +             if (ret < 0)
  >> +                     goto err_component_match;
  >> +     } else {
  >> +             platform_set_drvdata(pdev, dev);
  >> +     }
  Fix platform_set_drvdata.
- Fix build error for patch 9/15
- Add depend patch in case of error header file for patch 13/15

Changes compared with v3:
- Fix return value for patch 1/15
- Fix comments for patch 4/15
  > Looking up "mediatek,mtk-vcodec-core" to determine if it uses component framwork sounds like...
  Add prameter in pdata, for all platform will use compoent after mt8183

  >> +     if (dev->is_comp_supported) {
  >> +             ret = mtk_vcodec_init_master(dev);
  >> +             if (ret < 0)
  >> +                     goto err_component_match;
  >> +     } else {
  >> +             platform_set_drvdata(pdev, dev);
  >> +     }
  > + Has asked the same question in [1].  Why it removes the
  > +platform_set_drvdata() above?  mtk_vcodec_init_master() also calls platform_set_drvdata().
  Must call component_master_add_with_match after platform_set_drvdata for component architecture.
- Fix yaml files check fail for patch 5/15
- Fix yaml file check fail for patch 14/15

Changes compared with v1:
- Fix many comments for patch 3/14
- Remove unnecessary code for patch 4/14
- Using enum mtk_vdec_hw_count instead of magic numbers for patch 6/14
- Reconstructed get/put lat buffer for lat and core hardware for patch 7/14
- Using yaml format to instead of txt file for patch 12/14

Yunfei Dong (15):
  media: mtk-vcodec: Get numbers of register bases from DT
  media: mtk-vcodec: Align vcodec wake up interrupt interface
  media: mtk-vcodec: Refactor vcodec pm interface
  media: mtk-vcodec: Use component framework to manage each hardware
    information
  dt-bindings: media: mtk-vcodec: Separate video encoder and decoder
    dt-bindings
  media: mtk-vcodec: Use pure single core for MT8183
  media: mtk-vcodec: Add irq interface for multi hardware
  media: mtk-vcodec: Add msg queue feature for lat and core architecture
  media: mtk-vcodec: Generalize power and clock on/off interfaces
  media: mtk-vcodec: Add new interface to lock different hardware
  media: mtk-vcodec: Add core thread
  media: mtk-vcodec: Support 34bits dma address for vdec
  dt-bindings: media: mtk-vcodec: Adds decoder dt-bindings for mt8192
  media: mtk-vcodec: Add core dec and dec end ipi msg
  media: mtk-vcodec: Use codec type to separate different hardware

 .../media/mediatek,vcodec-comp-decoder.yaml   | 192 ++++++++++++
 .../media/mediatek,vcodec-decoder.yaml        | 175 +++++++++++
 .../media/mediatek,vcodec-encoder.yaml        | 185 +++++++++++
 .../bindings/media/mediatek-vcodec.txt        | 130 --------
 drivers/media/platform/mtk-vcodec/Makefile    |   2 +
 .../platform/mtk-vcodec/mtk_vcodec_dec.c      |   4 +-
 .../platform/mtk-vcodec/mtk_vcodec_dec.h      |   1 +
 .../platform/mtk-vcodec/mtk_vcodec_dec_drv.c  | 276 ++++++++++++++---
 .../platform/mtk-vcodec/mtk_vcodec_dec_hw.c   | 184 +++++++++++
 .../platform/mtk-vcodec/mtk_vcodec_dec_hw.h   |  53 ++++
 .../platform/mtk-vcodec/mtk_vcodec_dec_pm.c   |  98 ++++--
 .../platform/mtk-vcodec/mtk_vcodec_dec_pm.h   |  13 +-
 .../mtk-vcodec/mtk_vcodec_dec_stateful.c      |   2 +
 .../mtk-vcodec/mtk_vcodec_dec_stateless.c     |   2 +
 .../platform/mtk-vcodec/mtk_vcodec_drv.h      |  71 ++++-
 .../platform/mtk-vcodec/mtk_vcodec_enc_drv.c  |  12 +-
 .../platform/mtk-vcodec/mtk_vcodec_enc_pm.c   |   1 -
 .../platform/mtk-vcodec/mtk_vcodec_intr.c     |  27 +-
 .../platform/mtk-vcodec/mtk_vcodec_intr.h     |   4 +-
 .../platform/mtk-vcodec/mtk_vcodec_util.c     |  87 +++++-
 .../platform/mtk-vcodec/mtk_vcodec_util.h     |   8 +-
 .../platform/mtk-vcodec/vdec/vdec_h264_if.c   |   2 +-
 .../mtk-vcodec/vdec/vdec_h264_req_if.c        |   2 +-
 .../platform/mtk-vcodec/vdec/vdec_vp8_if.c    |   2 +-
 .../platform/mtk-vcodec/vdec/vdec_vp9_if.c    |   2 +-
 .../media/platform/mtk-vcodec/vdec_drv_if.c   |  21 +-
 .../media/platform/mtk-vcodec/vdec_ipi_msg.h  |  16 +-
 .../platform/mtk-vcodec/vdec_msg_queue.c      | 290 ++++++++++++++++++
 .../platform/mtk-vcodec/vdec_msg_queue.h      | 157 ++++++++++
 .../media/platform/mtk-vcodec/vdec_vpu_if.c   |  46 ++-
 .../media/platform/mtk-vcodec/vdec_vpu_if.h   |  22 ++
 .../platform/mtk-vcodec/venc/venc_h264_if.c   |   2 +-
 .../platform/mtk-vcodec/venc/venc_vp8_if.c    |   2 +-
 33 files changed, 1812 insertions(+), 279 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/media/mediatek,vcodec-comp-decoder.yaml
 create mode 100644 Documentation/devicetree/bindings/media/mediatek,vcodec-decoder.yaml
 create mode 100644 Documentation/devicetree/bindings/media/mediatek,vcodec-encoder.yaml
 delete mode 100644 Documentation/devicetree/bindings/media/mediatek-vcodec.txt
 create mode 100644 drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_hw.c
 create mode 100644 drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_hw.h
 create mode 100644 drivers/media/platform/mtk-vcodec/vdec_msg_queue.c
 create mode 100644 drivers/media/platform/mtk-vcodec/vdec_msg_queue.h

-- 
2.25.1


^ permalink raw reply	[flat|nested] 115+ messages in thread

end of thread, other threads:[~2021-10-29  3:21 UTC | newest]

Thread overview: 115+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-01  8:32 [PATCH v6, 00/15] Using component framework to support multi hardware decode Yunfei Dong
2021-09-01  8:32 ` Yunfei Dong
2021-09-01  8:32 ` Yunfei Dong
2021-09-01  8:32 ` [PATCH v6, 01/15] media: mtk-vcodec: Get numbers of register bases from DT Yunfei Dong
2021-09-01  8:32   ` Yunfei Dong
2021-09-01  8:32   ` Yunfei Dong
2021-09-01  8:32 ` [PATCH v6, 02/15] media: mtk-vcodec: Align vcodec wake up interrupt interface Yunfei Dong
2021-09-01  8:32   ` Yunfei Dong
2021-09-01  8:32   ` Yunfei Dong
2021-09-01  8:32 ` [PATCH v6, 03/15] media: mtk-vcodec: Refactor vcodec pm interface Yunfei Dong
2021-09-01  8:32   ` Yunfei Dong
2021-09-01  8:32   ` Yunfei Dong
2021-09-01  8:32 ` [PATCH v6, 04/15] media: mtk-vcodec: Use component framework to manage each hardware information Yunfei Dong
2021-09-01  8:32   ` Yunfei Dong
2021-09-01  8:32   ` Yunfei Dong
2021-09-01  8:32 ` [PATCH v6, 05/15] dt-bindings: media: mtk-vcodec: Separate video encoder and decoder dt-bindings Yunfei Dong
2021-09-01  8:32   ` Yunfei Dong
2021-09-01  8:32   ` Yunfei Dong
2021-09-01  8:32 ` [PATCH v6, 06/15] media: mtk-vcodec: Use pure single core for MT8183 Yunfei Dong
2021-09-01  8:32   ` Yunfei Dong
2021-09-01  8:32   ` Yunfei Dong
2021-09-01  8:32 ` [PATCH v6, 07/15] media: mtk-vcodec: Add irq interface for multi hardware Yunfei Dong
2021-09-01  8:32   ` Yunfei Dong
2021-09-01  8:32   ` Yunfei Dong
2021-09-01  8:32 ` [PATCH v6, 08/15] media: mtk-vcodec: Add msg queue feature for lat and core architecture Yunfei Dong
2021-09-01  8:32   ` Yunfei Dong
2021-09-01  8:32   ` Yunfei Dong
2021-09-01  8:32 ` [PATCH v6, 09/15] media: mtk-vcodec: Generalize power and clock on/off interfaces Yunfei Dong
2021-09-01  8:32   ` Yunfei Dong
2021-09-01  8:32   ` Yunfei Dong
2021-09-01  8:32 ` [PATCH v6, 10/15] media: mtk-vcodec: Add new interface to lock different hardware Yunfei Dong
2021-09-01  8:32   ` Yunfei Dong
2021-09-01  8:32   ` Yunfei Dong
2021-09-01  8:32 ` [PATCH v6, 11/15] media: mtk-vcodec: Add core thread Yunfei Dong
2021-09-01  8:32   ` Yunfei Dong
2021-09-01  8:32   ` Yunfei Dong
2021-09-01  8:32 ` [PATCH v6, 12/15] media: mtk-vcodec: Support 34bits dma address for vdec Yunfei Dong
2021-09-01  8:32   ` Yunfei Dong
2021-09-01  8:32   ` Yunfei Dong
2021-10-07 11:37   ` Benjamin Gaignard
2021-10-07 11:37     ` Benjamin Gaignard
2021-10-07 11:37     ` Benjamin Gaignard
2021-10-11  5:42     ` yunfei.dong
2021-10-11  5:42       ` yunfei.dong
2021-10-11  5:42       ` yunfei.dong
2021-09-01  8:32 ` [PATCH v6, 13/15] dt-bindings: media: mtk-vcodec: Adds decoder dt-bindings for mt8192 Yunfei Dong
2021-09-01  8:32   ` Yunfei Dong
2021-09-01  8:32   ` Yunfei Dong
2021-09-02 12:03   ` Rob Herring
2021-09-02 12:03     ` Rob Herring
2021-09-02 12:03     ` Rob Herring
2021-09-01  8:32 ` [PATCH v6, 14/15] media: mtk-vcodec: Add core dec and dec end ipi msg Yunfei Dong
2021-09-01  8:32   ` Yunfei Dong
2021-09-01  8:32   ` Yunfei Dong
2021-09-01  8:32 ` [PATCH v6, 15/15] media: mtk-vcodec: Use codec type to separate different hardware Yunfei Dong
2021-09-01  8:32   ` Yunfei Dong
2021-09-01  8:32   ` Yunfei Dong
2021-09-01 12:17   ` Dafna Hirschfeld
2021-09-01 12:17     ` Dafna Hirschfeld
2021-09-01 12:17     ` Dafna Hirschfeld
2021-09-02  6:05     ` yunfei.dong
2021-09-02  6:05       ` yunfei.dong
2021-09-02  6:05       ` yunfei.dong
2021-09-03 12:42       ` Dafna Hirschfeld
2021-09-03 12:42         ` Dafna Hirschfeld
2021-09-03 12:42         ` Dafna Hirschfeld
2021-09-04  3:00         ` yunfei.dong
2021-09-04  3:00           ` yunfei.dong
2021-09-04  3:00           ` yunfei.dong
2021-09-02 16:30 ` [PATCH v6, 00/15] Using component framework to support multi hardware decode Ezequiel Garcia
2021-09-02 16:30   ` Ezequiel Garcia
2021-09-02 16:30   ` Ezequiel Garcia
2021-09-02 16:30   ` Ezequiel Garcia
2021-09-03  3:08   ` yunfei.dong
2021-09-03  3:08     ` yunfei.dong
2021-09-03  3:08     ` yunfei.dong
2021-09-03  3:08     ` yunfei.dong
2021-09-14 12:16     ` yunfei.dong
2021-09-14 12:16       ` yunfei.dong
2021-09-14 12:16       ` yunfei.dong
2021-09-14 12:16       ` yunfei.dong
2021-09-26  8:27       ` yunfei.dong
2021-09-26  8:27         ` yunfei.dong
2021-09-26  8:27         ` yunfei.dong
2021-09-26  8:27         ` yunfei.dong
2021-09-26 14:51         ` Ezequiel Garcia
2021-09-26 14:51           ` Ezequiel Garcia
2021-09-26 14:51           ` Ezequiel Garcia
2021-09-26 14:51           ` Ezequiel Garcia
2021-09-27 17:02           ` Steve Cho
2021-09-27 17:02             ` Steve Cho
2021-09-27 17:02             ` Steve Cho
2021-09-27 17:02             ` Steve Cho
2021-10-05  6:13             ` Tomasz Figa
2021-10-05  6:13               ` Tomasz Figa
2021-10-05  6:13               ` Tomasz Figa
2021-10-13  1:17           ` yunfei.dong
2021-10-13  1:17             ` yunfei.dong
2021-10-13  1:17             ` yunfei.dong
2021-10-14 12:38             ` Ezequiel Garcia
2021-10-14 12:38               ` Ezequiel Garcia
2021-10-14 12:38               ` Ezequiel Garcia
2021-10-29  3:21               ` yunfei.dong
2021-09-03  4:09   ` Chen-Yu Tsai
2021-09-03  4:09     ` Chen-Yu Tsai
2021-09-03  4:09     ` Chen-Yu Tsai
2021-09-03  4:09     ` Chen-Yu Tsai
2021-09-27 16:56 ` Steve Cho
2021-09-27 16:56   ` Steve Cho
2021-09-27 16:56   ` Steve Cho
2021-09-27 16:56   ` Steve Cho
2021-09-27 17:31   ` Steve Cho
2021-09-27 17:31     ` Steve Cho
2021-09-27 17:31     ` Steve Cho
2021-09-27 17:31     ` Steve Cho

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.