mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v7 0/5] media: Add support for Broadcom/RPi BCM2835 ISP
@ 2026-11-18 18:08 Jai Luthra
  2026-11-18 18:08 ` [PATCH v7 1/5] media: videobuf2-core: Move type check out of vb2_core_expbuf() Jai Luthra
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Jai Luthra @ 2026-11-18 18:08 UTC (permalink / raw)
  To: Florian Fainelli, Tomasz Figa, Marek Szyprowski,
	Mauro Carvalho Chehab, Raspberry Pi Kernel Maintenance,
	Sakari Ailus
  Cc: Hans Verkuil, Laurent Pinchart, Kieran Bingham, Dave Stevenson,
	Naushir Patuck, Stefan Wahren, Paul Elder, linux-media,
	linux-rpi-kernel, linux-kernel, Jai Luthra, Hans Verkuil

Hi Sakari,

The VCSM-CMA driver (which this series depends on) is now picked by
Florian in the broadcom drivers/next tree [1].

If the ISP is okay to be merged by you (and Hans/Mauro), we probably
need to coordinate so it all ends up in a single tree during the merge
window.

[1]: https://github.com/Broadcom/stblinux/commits/drivers/next

---
This series adds support for Broadcom/Raspberry Pi BCM2835 ISP present
on Raspberry Pi 4 and earlier. The underlying hardware for the ISP is
accessed through the VideoCore VPU, via the VCHIQ/MMAL interface that
was recently destaged under platform/raspberrypi.

This series depends on the VCSM CMA driver for shared memory support
(for lens shading buffers) which was posted as a separate series here:

https://lore.kernel.org/all/20261112-b4-vc-sm-cma-v5-0-d25e3b687e71@ideasonboard.com/T/#t

This series along with dependencies is available here:
https://github.com/jailuthra/linux/tree/b4/rpi-isp

Libcamera support is posted, and available here:
https://github.com/jailuthra/libcamera/tree/pi4-upstream

This series depends on the latest raspberry pi firmware present at:
https://github.com/raspberrypi/rpi-firmware

---

Thanks,
Jai

To: Florian Fainelli <florian.fainelli@broadcom.com>
To: Tomasz Figa <tfiga@chromium.org>
To: Marek Szyprowski <m.szyprowski@samsung.com>
To: Mauro Carvalho Chehab <mchehab@kernel.org>
To: Raspberry Pi Kernel Maintenance <kernel-list@raspberrypi.com>
To: Sakari Ailus <sakari.ailus@iki.fi>
Cc: Hans Verkuil <hans@jjverkuil.nl>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Kieran Bingham <kieran.bingham@ideasonboard.com>
Cc: Dave Stevenson <dave.stevenson@raspberrypi.com>
Cc: Naushir Patuck <naush@raspberrypi.com>
Cc: Stefan Wahren <wahrenst@gmx.net>
Cc: Paul Elder <paul.elder@ideasonboard.com>
Cc: Tomasz Figa <tfiga@chromium.org>
Cc: linux-media@vger.kernel.org
Cc: linux-rpi-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Jai Luthra <jai.luthra@ideasonboard.com>
---
Changes in v7:
- (Jacopo) Move the uAPI header under include/linux/media/broadcom
- (Sakari) s/v4l2_isp_params_buffer/v4l2_isp_buffer and
  s/V4L2_COLORSPACE/BCM2835_ISP_COLORSPACE
- (Sakari) Fix unnecessary v4l2_dbgs, and other log level issues
- (Sakari) Improve documentation for stats buffer, reorganize it a bit
- (Sakari) Add static asserts for params and stats buffer size to avoid
  unintended changes to uAPI
- (Sakari) Initialize loop variables inline when possible
- Link to v6: https://lore.kernel.org/r/20261112-b4-vchiq-isp-v6-0-711b48378367@ideasonboard.com

Changes in v6:
- Rebase on v7.4-rc1
- Move vchiq/mmal patches to the vc-sm-cma series, as it goes through a
  separate tree
- Update usage of vc_sm_cma_int_handle() which is now renamed to
  vc_sm_cma_get_vc_handle()
- Link to v5: https://lore.kernel.org/r/20260917-b4-vchiq-isp-v5-0-2d8870add2c0@ideasonboard.com

Changes in v5:
- Add missing note in cover letter about dependency on latest firmware
- Update documentation of return type of vb2_core_expbuf_dmabuf() to only
  ERR_PTR and not NULL
- Fix warnings reported by media-ci (coccinelle, smatch etc.)
  - Use struct_group() around the fields we want to memcpy from UAPI param
    struct to the anonymous structs inside mmal_parameter_isp_parameters
  - Don't use complicated pointer arithmetic and instead write
    mmal_param->_mmal_substruct.update = 1 explicitly
  - Only check for IS_ERR and not IS_ERR_OR_NULL for output of
    vb2_core_expbuf_dmabuf()
  - Check node->id against array bounds
- Link to v4: https://lore.kernel.org/r/20260916-b4-vchiq-isp-v4-0-f668c2017b74@ideasonboard.com

Changes in v4:
- Rebase on v7.3-rc1
- Set ISP_NUM_INSTANCES to 1 until we have proper support for
  multiplexing ISP instances (Laurent)
- Add a new struct mmal_parameter_isp_parameters {} in mmal-parameters.h
  to send combined updates the firmware (Dave)
- Rework bcm2835-isp-params.c to use the above and save expensive
  messages over IPC boundary (Dave)
- Test if the firmware supports the single struct, and fail with an
  error message asking the user to update their firmware if not (Dave)
- Check for retval of isp_set_param() and print error messages if it
  fails
- Various cleanups and suggestions (Paul)
- Add "media: videobuf2-core: Move type check out of vb2_core_expbuf()"
  on Laurent's suggestion
- Drop comment about FourCC values being copied from V4L2
- Drop old paragraph in Kconfig that got copied from previous revision
- Link to v3: https://lore.kernel.org/r/20260717-b4-vchiq-isp-v3-0-fb8235e15c68@ideasonboard.com

Changes in v3:
- Rebase on v7.2-rc1
- Split PATCH 1 to add missing incles before moving the headers
- Update commit messages with Laurent's suggestions
- Drop redundant buffer list and locks for params as we send them
  immediately to the firmware in .buf_queue
- Drop the now empty .stop_streaming() for params node
- Minor cleanups
- Link to v2: https://lore.kernel.org/r/20260210-b4-vchiq-isp-v2-0-4403944152fe@ideasonboard.com

Changes in v2:
- Replace custom V4L2 controls (V4L2_CID_USER_BCM2835_ISP_*) with the
  V4L2 extensible parameters framework via a dedicated metadata output
  node (bcm2835-isp-params). Split params handling into new file
  bcm2835-isp-params.c.
- Add AWB gains and digital gain as extensible parameter block types
  instead of standard V4L2 integer controls.
- Use MEDIA_ENT_F_PROC_VIDEO_ISP instead of MEDIA_ENT_F_PROC_VIDEO_SCALER
  for the media entity function.
- Rework media controller registration: let video device nodes handle
  their own entity registration, removing the manual entity/interface
  creation in media_controller_register_node().
- Propagate colorspace, ycbcr_enc, xfer_func, and quantization properly
  through g_fmt/s_fmt.
- Fold the stats/params FourCC additions (previously a separate commit)
  into this patch.
- Drop the custom CID base commit (no longer needed).
- Update documentation.
- Link to v1: https://lore.kernel.org/r/20260113-b4-vchiq-isp-v1-0-ea0b300bffc8@ideasonboard.com

---
Dave Stevenson (1):
      media: videobuf2: Allow exporting of a struct dmabuf

Jai Luthra (2):
      media: videobuf2-core: Move type check out of vb2_core_expbuf()
      media: platform: broadcom: Move unicam driver to subdir

Naushir Patuck (2):
      media: platform: broadcom: Add bcm2835-isp driver
      platform/raspberrypi: vchiq: Load bcm2835_isp driver from vchiq

 Documentation/admin-guide/media/bcm2835-isp.dot    |   14 +
 Documentation/admin-guide/media/bcm2835-isp.rst    |   78 +
 Documentation/admin-guide/media/v4l-drivers.rst    |    1 +
 .../userspace-api/media/v4l/meta-formats.rst       |    1 +
 .../media/v4l/metafmt-bcm2835-isp.rst              |  108 ++
 MAINTAINERS                                        |   11 +-
 drivers/media/common/videobuf2/videobuf2-core.c    |   50 +-
 drivers/media/common/videobuf2/videobuf2-v4l2.c    |    8 +-
 drivers/media/dvb-core/dvb_vb2.c                   |    3 +-
 drivers/media/platform/broadcom/Kconfig            |   18 +-
 drivers/media/platform/broadcom/Makefile           |    3 +-
 .../media/platform/broadcom/bcm2835-isp/Kconfig    |   15 +
 .../media/platform/broadcom/bcm2835-isp/Makefile   |    4 +
 .../broadcom/bcm2835-isp/bcm2835-isp-common.h      |   50 +
 .../broadcom/bcm2835-isp/bcm2835-isp-fmts.h        |  558 ++++++++
 .../broadcom/bcm2835-isp/bcm2835-isp-params.c      |  516 +++++++
 .../broadcom/bcm2835-isp/bcm2835-v4l2-isp.c        | 1494 ++++++++++++++++++++
 .../media/platform/broadcom/bcm2835-unicam/Kconfig |   18 +
 .../platform/broadcom/bcm2835-unicam/Makefile      |    3 +
 .../{ => bcm2835-unicam}/bcm2835-unicam-regs.h     |    0
 .../broadcom/{ => bcm2835-unicam}/bcm2835-unicam.c |    0
 drivers/media/v4l2-core/v4l2-ioctl.c               |    2 +
 .../raspberrypi/vchiq-interface/vchiq_arm.c        |    2 +
 include/linux/raspberrypi/mmal-parameters.h        |  155 +-
 include/linux/raspberrypi/vchiq_arm.h              |    1 +
 include/media/videobuf2-core.h                     |   21 +-
 include/uapi/linux/media/broadcom/bcm2835-isp.h    |  530 +++++++
 include/uapi/linux/videodev2.h                     |    2 +
 28 files changed, 3609 insertions(+), 57 deletions(-)
---
base-commit: bc71431221f5ba8bb33918399552636e059c2c45
change-id: 20250923-b4-vchiq-isp-7e8c22c2860c
prerequisite-change-id: 20251030-b4-vc-sm-cma-f6727c39cd25:v5
prerequisite-patch-id: 4fc8cb49edcbe9c8e699b4ab9f6863ac040a070b
prerequisite-patch-id: 0a5fdf8fe23298fac2c6d188e1686dd292901efc
prerequisite-patch-id: d6d9ee5b60f97112dcf1aea01212c724d9151505
prerequisite-patch-id: 3855700b608f20e2a6857a9702838d1e54fc31cb
prerequisite-patch-id: e2b1e84a1e94e7095b964da693129d36dda78bb0
prerequisite-patch-id: 08c61bad2960da29ae7178034560ebab46dc3497
prerequisite-patch-id: 07e50207cc947f44e1d626b31d0ace7e12a8f3a1
prerequisite-patch-id: 3d82a2605799686668729fdc2677c3f6b7c2aa0d
prerequisite-patch-id: b2a6012a5d54ed1ebad4034daa7bc9ca10ab67d4
prerequisite-patch-id: 7038462996eaf42f0bf47e5eda1cf264abfd8953
prerequisite-patch-id: 1898d91213e9bd75be3109180527fb0caf6d7174
prerequisite-patch-id: d0cfc49c673c8c4a4c13d44a547104c24f57cb49
prerequisite-patch-id: 99e2132187c5db1d65d48200255170835a2a302c
prerequisite-patch-id: d1edc04e1689cb05f13e61f1370305d4f959cb5b
prerequisite-patch-id: 1f6521b641f29e85385cd442f347a7745e830a83
prerequisite-patch-id: f366e5894549a0e9142e8eb202e829834f617679
prerequisite-patch-id: a7586b3cffb7e1300ff1bd9ce93f636a2d9b48b2

Best regards,
-- 
Jai Luthra <jai.luthra@ideasonboard.com>


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

end of thread, other threads:[~2026-11-19 13:00 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-18 18:08 [PATCH v7 0/5] media: Add support for Broadcom/RPi BCM2835 ISP Jai Luthra
2026-11-18 18:08 ` [PATCH v7 1/5] media: videobuf2-core: Move type check out of vb2_core_expbuf() Jai Luthra
2026-11-19 11:46   ` Marek Szyprowski
2026-11-18 18:08 ` [PATCH v7 2/5] media: videobuf2: Allow exporting of a struct dmabuf Jai Luthra
2026-11-19 11:48   ` Marek Szyprowski
2026-11-18 18:08 ` [PATCH v7 3/5] media: platform: broadcom: Move unicam driver to subdir Jai Luthra
2026-11-18 18:08 ` [PATCH v7 4/5] media: platform: broadcom: Add bcm2835-isp driver Jai Luthra
2026-11-19 12:55   ` Laurent Pinchart
2026-11-18 18:08 ` [PATCH v7 5/5] platform/raspberrypi: vchiq: Load bcm2835_isp driver from vchiq Jai Luthra
2026-11-19 12:11 ` [PATCH v7 0/5] media: Add support for Broadcom/RPi BCM2835 ISP Sakari Ailus
2026-11-19 13:00   ` Laurent Pinchart

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

all inboxes | Powered by JetHome®