]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
media: pci: add AVMatrix HWS capture driver
authorBen Hoff <hoff.benjamin.k@gmail.com>
Sun, 10 May 2026 23:50:36 +0000 (19:50 -0400)
committerHans Verkuil <hverkuil+cisco@kernel.org>
Tue, 12 May 2026 07:39:02 +0000 (09:39 +0200)
commitba07fd2f5742e8b0d965003b34c7a44eb4f67e53
tree27a166edb3a9822222be1631f1047945572b0363
parent2c7fe9db118e29f541a6811594b4316a287b3512
media: pci: add AVMatrix HWS capture driver

Add an in-tree AVMatrix HWS PCIe capture driver. The driver supports
up to four HDMI inputs and exposes the video capture path through
V4L2 with vb2-dma-contig streaming, DV timings, and per-input
controls. Audio support is intentionally omitted from this
submission.

This patch also adds the MAINTAINERS entry for the new driver.

This driver is derived from a GPL out-of-tree driver.

Changes since v6:
- v6 accidently contained legacy history, resubmitting with latest
- remove an unused mode-change label reported by W=1

Changes since v5:
- keep queue_setup() and alloc_sizeimage on the logical sizeimage value
- drop the dead queue_setup() fallback that rebuilt pix.sizeimage
  on the fly
- clarify that hws_calc_sizeimage() models the packed-YUYV-only path
- add Assisted-by attribution for Codex

Changes since v4:
- replace plain 64-bit elapsed-time divisions in debug logging with
  div_u64() so i386 module builds do not emit __udivdi3 references

Changes since v3:
- fold the MAINTAINERS update into this patch so per-patch CI sees the
  new file pattern
- wrap the validation text for checkpatch

Changes since v2:
- keep scratch DMA allocation on a single probe-owned path
- avoid double-freeing V4L2 control handlers on register unwind
- drop the extra per-node resolution sysfs ABI
- turn live geometry changes into explicit SOURCE_CHANGE renegotiation
- report live DV timings and reject attempts to retime a live source
- stop advertising RESOLUTION source changes for fps-only updates
- keep live fps state across harmless S_FMT restarts
- stop exposing an unvalidated DV RX power-present signal
- clean the imported sources for checkpatch and W=1 builds

Validation:
- build-tested with W=1 against a local kernel build tree
- compiled the driver with ARCH=i386 allmodconfig and verified the
  resulting hws_pci.o, hws_video.o, and hws.o do not reference
  __udivdi3
- v4l2-compliance 1.33.0-5459 from v4l-utils commit
  4a0d2c3b4f523406cb9a6f4c541ef14f72f19f3d on /dev/video2:
  48 tests succeeded, 0 failed, 1 warning

DV_RX_POWER_PRESENT is intentionally left unsupported in this revision
because current hardware evidence does not expose a validated
receiver-side power-detect signal distinct from active video presence.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202604020522.z22eZuW8-lkp@intel.com/
Assisted-by: Codex:gpt-5.5
Signed-off-by: Ben Hoff <hoff.benjamin.k@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
14 files changed:
MAINTAINERS
drivers/media/pci/Kconfig
drivers/media/pci/Makefile
drivers/media/pci/hws/Kconfig [new file with mode: 0644]
drivers/media/pci/hws/Makefile [new file with mode: 0644]
drivers/media/pci/hws/hws.h [new file with mode: 0644]
drivers/media/pci/hws/hws_irq.c [new file with mode: 0644]
drivers/media/pci/hws/hws_irq.h [new file with mode: 0644]
drivers/media/pci/hws/hws_pci.c [new file with mode: 0644]
drivers/media/pci/hws/hws_reg.h [new file with mode: 0644]
drivers/media/pci/hws/hws_v4l2_ioctl.c [new file with mode: 0644]
drivers/media/pci/hws/hws_v4l2_ioctl.h [new file with mode: 0644]
drivers/media/pci/hws/hws_video.c [new file with mode: 0644]
drivers/media/pci/hws/hws_video.h [new file with mode: 0644]