public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH v5 0/9] Add support for Wave6 video codec driver
@ 2026-04-15  9:25 Nas Chung
  2026-04-15  9:25 ` [RFC PATCH v5 1/9] media: v4l2-common: Add YUV24 format info Nas Chung
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Nas Chung @ 2026-04-15  9:25 UTC (permalink / raw)
  To: mchehab, hverkuil, robh, krzk+dt, conor+dt, shawnguo, s.hauer
  Cc: linux-media, devicetree, linux-kernel, linux-imx,
	linux-arm-kernel, marek.vasut, ming.qian, Nas Chung

This RFC primarily asks for feedback on the devicetree representation
for the Chips&Media Wave6 codec block on NXP i.MX95. It only includes
DT-driven changes. Non-DT driver feedback and cleanups will be
addressed once the DT structure is agreed.

On i.MX95 the Wave6 hardware exposes one control register region and
four interface register regions for one shared video processing engine.
In this RFC, the control region is described by the parent node and the
interface regions by child nodes. The control and interface regions are
distinct DMA requesters and can be associated with separate IOMMU stream
IDs, allowing DMA isolation between them. The control region has its own
MMIO range, and each interface region has its own MMIO range and
interrupt.

I also evaluated folding all resources into a single parent node, but in
that model all stream IDs end up attached to the same IOMMU domain and
we observed loss of DMA isolation. Alternatives such as iommu-map or a
vendor-specific stream ID property were considered, but they do not seem
to fit this use case.

Thanks for your time and feedback.

RFC v5:
- Move all shared resources to the parent node
- Drop child compatible and use data-only interface child nodes
- Update the VPU driver to create child devices and load the core driver

v4:
- Fixed build issues reported by CI tools
- Updated commit messages to use imperative mood
- Avoided using the same name for both nodes and labels in devicetree
- Removed unused labels from YAML examples
- Added description for child(vpu-core) node
- Added iommus property to both parent(vpu) and child(vpu-core) nodes
- Updated probe() functions to use dev_err_probe() when returning -EPROBE_DEFER
- Added wave6_vpu prefix to trace functions
- Updated HEVC decoder profile control to report MAIN_STILL profile
- Fixed bug in multiple instance creation by pre-allocating work buffer
- Fixed interrupt handling by checking INSTANCE_INFO register and instance list

v3:
- Removed ambiguous SUPPORT_FOLLOWER feature
- Used WARN_ON() for unexpected programming errors
- Split thermal device code into wave6-vpu-thermal.c/h
- Dropped wave6_cooling_disable module parameter
- Replaced mutex_lock() with guard()
- Added lockdep_assert_held() to clarify locking regions
- Removed exported function due to dual-license and used function pointer
- Added documentation and validation for state transitions
- Added documentation for device structures
- Added patch to enable VPU device in imx95 DTS
- Updated DT bindings and driver to align with parent(vpu) and child(vpu-core)
- Replaced magic numbers with mask and offset macros when accessing registers
- Placed goto statements after an empty line
- Printed HW info (e.g. product_code) via dev_dbg() for debugging
- Replaced wave6_vpu_dec_give_command() with dedicated functions

v2:
- Refined DT bindings to better represent the hardware
- Reworked driver to align with the parent(VPU) and child(CTRL, CORE)
- Fixed build issues reported by CI tools (Smatch, Sparse, TRACE)
- Improved commit messages with clearer descriptions
- Added kernel-doc for exported functions
- Removed redundant print statements and unused code
- Reordered patches to prevent build failures

Nas Chung (9):
  media: v4l2-common: Add YUV24 format info
  dt-bindings: media: nxp: Add Wave6 video codec device
  media: chips-media: wave6: Add Wave6 VPU interface
  media: chips-media: wave6: Add v4l2 m2m driver support
  media: chips-media: wave6: Add Wave6 core driver
  media: chips-media: wave6: Improve debugging capabilities
  media: chips-media: wave6: Add Wave6 thermal cooling device
  media: chips-media: wave6: Add Wave6 control driver
  arm64: dts: freescale: imx95: Add video codec node

 .../bindings/media/nxp,imx95-vpu.yaml         |  163 +
 MAINTAINERS                                   |    8 +
 .../boot/dts/freescale/imx95-15x15-evk.dts    |    7 +-
 .../boot/dts/freescale/imx95-15x15-frdm.dts   |    5 +
 .../boot/dts/freescale/imx95-19x19-evk.dts    |   10 +
 .../dts/freescale/imx95-19x19-verdin-evk.dts  |   10 +
 .../dts/freescale/imx95-phycore-fpsc.dtsi     |   10 +
 .../dts/freescale/imx95-toradex-smarc-dev.dts |    5 +
 .../dts/freescale/imx95-toradex-smarc.dtsi    |    5 +
 .../boot/dts/freescale/imx95-tqma9596sa.dtsi  |    7 +-
 arch/arm64/boot/dts/freescale/imx95.dtsi      |   35 +
 drivers/media/platform/chips-media/Kconfig    |    1 +
 drivers/media/platform/chips-media/Makefile   |    1 +
 .../media/platform/chips-media/wave6/Kconfig  |   17 +
 .../media/platform/chips-media/wave6/Makefile |   17 +
 .../platform/chips-media/wave6/wave6-hw.c     | 2929 +++++++++++++++++
 .../platform/chips-media/wave6/wave6-hw.h     |   73 +
 .../chips-media/wave6/wave6-regdefine.h       |  641 ++++
 .../platform/chips-media/wave6/wave6-trace.h  |  289 ++
 .../platform/chips-media/wave6/wave6-vdi.h    |   92 +
 .../chips-media/wave6/wave6-vpu-core.c        |  397 +++
 .../chips-media/wave6/wave6-vpu-core.h        |  123 +
 .../chips-media/wave6/wave6-vpu-dbg.c         |  225 ++
 .../chips-media/wave6/wave6-vpu-dbg.h         |   14 +
 .../chips-media/wave6/wave6-vpu-dec.c         | 1867 +++++++++++
 .../chips-media/wave6/wave6-vpu-enc.c         | 2691 +++++++++++++++
 .../chips-media/wave6/wave6-vpu-thermal.c     |  141 +
 .../chips-media/wave6/wave6-vpu-thermal.h     |   26 +
 .../chips-media/wave6/wave6-vpu-v4l2.c        |  507 +++
 .../platform/chips-media/wave6/wave6-vpu.c    |  816 +++++
 .../platform/chips-media/wave6/wave6-vpu.h    |  143 +
 .../platform/chips-media/wave6/wave6-vpuapi.c |  725 ++++
 .../platform/chips-media/wave6/wave6-vpuapi.h | 1026 ++++++
 .../chips-media/wave6/wave6-vpuconfig.h       |   72 +
 .../chips-media/wave6/wave6-vpuerror.h        |  262 ++
 drivers/media/v4l2-core/v4l2-common.c         |    1 +
 36 files changed, 13359 insertions(+), 2 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/media/nxp,imx95-vpu.yaml
 create mode 100644 drivers/media/platform/chips-media/wave6/Kconfig
 create mode 100644 drivers/media/platform/chips-media/wave6/Makefile
 create mode 100644 drivers/media/platform/chips-media/wave6/wave6-hw.c
 create mode 100644 drivers/media/platform/chips-media/wave6/wave6-hw.h
 create mode 100644 drivers/media/platform/chips-media/wave6/wave6-regdefine.h
 create mode 100644 drivers/media/platform/chips-media/wave6/wave6-trace.h
 create mode 100644 drivers/media/platform/chips-media/wave6/wave6-vdi.h
 create mode 100644 drivers/media/platform/chips-media/wave6/wave6-vpu-core.c
 create mode 100644 drivers/media/platform/chips-media/wave6/wave6-vpu-core.h
 create mode 100644 drivers/media/platform/chips-media/wave6/wave6-vpu-dbg.c
 create mode 100644 drivers/media/platform/chips-media/wave6/wave6-vpu-dbg.h
 create mode 100644 drivers/media/platform/chips-media/wave6/wave6-vpu-dec.c
 create mode 100644 drivers/media/platform/chips-media/wave6/wave6-vpu-enc.c
 create mode 100644 drivers/media/platform/chips-media/wave6/wave6-vpu-thermal.c
 create mode 100644 drivers/media/platform/chips-media/wave6/wave6-vpu-thermal.h
 create mode 100644 drivers/media/platform/chips-media/wave6/wave6-vpu-v4l2.c
 create mode 100644 drivers/media/platform/chips-media/wave6/wave6-vpu.c
 create mode 100644 drivers/media/platform/chips-media/wave6/wave6-vpu.h
 create mode 100644 drivers/media/platform/chips-media/wave6/wave6-vpuapi.c
 create mode 100644 drivers/media/platform/chips-media/wave6/wave6-vpuapi.h
 create mode 100644 drivers/media/platform/chips-media/wave6/wave6-vpuconfig.h
 create mode 100644 drivers/media/platform/chips-media/wave6/wave6-vpuerror.h

-- 
2.31.1


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

end of thread, other threads:[~2026-04-15  9:26 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-15  9:25 [RFC PATCH v5 0/9] Add support for Wave6 video codec driver Nas Chung
2026-04-15  9:25 ` [RFC PATCH v5 1/9] media: v4l2-common: Add YUV24 format info Nas Chung
2026-04-15  9:25 ` [RFC PATCH v5 2/9] dt-bindings: media: nxp: Add Wave6 video codec device Nas Chung
2026-04-15  9:25 ` [RFC PATCH v5 3/9] media: chips-media: wave6: Add Wave6 VPU interface Nas Chung
2026-04-15  9:25 ` [RFC PATCH v5 4/9] media: chips-media: wave6: Add v4l2 m2m driver support Nas Chung
2026-04-15  9:25 ` [RFC PATCH v5 5/9] media: chips-media: wave6: Add Wave6 core driver Nas Chung
2026-04-15  9:25 ` [RFC PATCH v5 6/9] media: chips-media: wave6: Improve debugging capabilities Nas Chung
2026-04-15  9:25 ` [RFC PATCH v5 7/9] media: chips-media: wave6: Add Wave6 thermal cooling device Nas Chung
2026-04-15  9:25 ` [RFC PATCH v5 8/9] media: chips-media: wave6: Add Wave6 control driver Nas Chung
2026-04-15  9:25 ` [RFC PATCH v5 9/9] arm64: dts: freescale: imx95: Add video codec node Nas Chung

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox