From patchwork Thu Nov 9 21:02:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 13451726 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 108AEC4332F for ; Thu, 9 Nov 2023 21:04:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=+JTo/jtTpaKUceplDQbVhBQS/9e9czd7iyFVpkCX6a4=; b=0Bk/4fn3f7rl9h L1Y6au5H5s3Yd/vJd6AgNEX6dem7RA9CqXc0Lj0oDlXniZDrsgxaDd5Ze5QFEKryNezAEGqkaWE0d mgD5WzspSMeyMLPiTRiydKWibUcYP3Q6PFH+ViYBgLzeExzJAlQKfLgtHBBiVw34kHtyWdSOVUsnX 6tTlk6llHdwqvGKA4RvyULW2wTFitRwt2beD0wbZeANqQxBp/ZN9TowxOWVq7oVjZgXNOVuEUXsau rw9uHxo1YzhoDYCrx76ChUi2OZVIQ5jb0f/f/sHLjv/hKayD0vWTNblr2iGq8pRmedDEa4xQFq3WX S0uvPYf1EUlyxjGZtR9w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r1CBS-007DUg-0f; Thu, 09 Nov 2023 21:03:26 +0000 Received: from perceval.ideasonboard.com ([213.167.242.64]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r1CBP-007DTd-1O; Thu, 09 Nov 2023 21:03:25 +0000 Received: from umang.jain (unknown [103.251.226.64]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 4C9E56EF; Thu, 9 Nov 2023 22:02:53 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1699563775; bh=mmbO87nh5mz7pqHh+iTwGNB+opdv/5av5rOCwQbRdhU=; h=From:To:Cc:Subject:Date:From; b=BhEBrXzv2YD+14NCMuaJBGgd1S/2uG68SNi1UPwk5s83IRhDj6+cH+5YeOUN61G0C r//ORYr9FlRb1INss0Jy+aNIX4PtJj/h/qZDDmCQrcKbnavRp0DN306PMNb5FTdt87 9f54S1b3SY2+StENBB1meyWlealKX8+oewhL+Zr0= From: Umang Jain To: linux-media@vger.kernel.org, kernel-list@raspberrypi.com, linux-kernel@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-staging@lists.linux.dev Cc: Dave Stevenson , Kieran Bingham , Laurent Pinchart , "Ricardo B . Marliere" , Dan Carpenter , Stefan Wahren , Umang Jain Subject: [PATCH v2 00/15] staging: vc04_services: bcm2835-isp support Date: Thu, 9 Nov 2023 16:02:52 -0500 Message-ID: <20231109210309.638594-1-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231109_130323_626307_699F0842 X-CRM114-Status: GOOD ( 14.98 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This series aims to upport bcm2835-isp from the RPi kernel. It is developed on top of staging-next which comprises many VC04 changes for it's de-staging. Hence, the merge of this driver is targeted when VC04 is de-staged completely (which I have been pushing), but it can be helped getting reviewed meanwhile. Hence, the reason for posting the series. Patch (01-02)/15 adds a new driver named vc-sm-cma to handle memory sharing with the VC4 VPU. Patch 03/15 adds a small extension to videobuf2 to allow exporting as a dma_buf instead of a file-descriptor. Patch (04-05)/15 adds a couple of improvements/support for bcm2835-isp(event callback and zero-copy) to vchiq-mmal. Patch (06-10)/15 adds the core bcm2835-isp driver along with headers and format defintions. 09/15 is a standalone patch which can be merged independently I believe. Patch (11-12)/15 deals with the colorspace support. Patch 13/15 allows multiple instances of the ISP. Patch 14/15 adds a admin-guide document on bcm2835-isp. Patch 15/15 deals with driver registeration. Dave Stevenson (6): staging: vc04_services: Add new vc-sm-cma driver media: videobuf2: Allow exporting of a struct dmabuf staging: mmal-vchiq: Add support for event callbacks staging: mmal-vchiq: Use vc-sm-cma to support zero copy staging: mmal_vchiq: Add image formats to be used by bcm2835-isp uapi: bcm2835-isp: Add bcm2835-isp uapi header file David Plowman (2): vc04_services: bcm2835-isp: Allow formats with different colour spaces vc04_services: bcm2835-isp: Permit all sRGB colour spaces on ISP outputs Naushir Patuck (4): media: uapi: v4l2-core: Add ISP statistics output V4L2 fourcc type staging: vc04_services: bcm2835-isp: Add a more complex ISP processing component staging: vc04_services: bcm2835_isp: Allow multiple users docs: admin-guide: media: bcm2835-isp: Add documentation for bcm2835-isp Umang Jain (3): staging: vc04_services: vchiq_arm: Register vcsm-cma driver staging: vc04_services: Add helpers for vchiq driver data staging: vc04_services: vchiq: Register bcm2835-isp .../admin-guide/media/bcm2835-isp.rst | 127 ++ .../userspace-api/media/drivers/index.rst | 1 + .../userspace-api/media/v4l/meta-formats.rst | 1 + .../v4l/pixfmt-meta-bcm2835-isp-stats.rst | 32 + MAINTAINERS | 9 + .../media/common/videobuf2/videobuf2-core.c | 36 +- drivers/media/v4l2-core/v4l2-ioctl.c | 1 + drivers/staging/vc04_services/Kconfig | 4 + drivers/staging/vc04_services/Makefile | 3 +- .../staging/vc04_services/bcm2835-isp/Kconfig | 14 + .../vc04_services/bcm2835-isp/Makefile | 4 + .../bcm2835-isp/bcm2835-isp-ctrls.h | 72 + .../bcm2835-isp/bcm2835-isp-fmts.h | 559 +++++ .../bcm2835-isp/bcm2835-v4l2-isp.c | 1822 +++++++++++++++++ .../interface/vchiq_arm/vchiq_arm.c | 6 + .../interface/vchiq_arm/vchiq_bus.h | 10 + .../staging/vc04_services/vc-sm-cma/Kconfig | 10 + .../staging/vc04_services/vc-sm-cma/Makefile | 4 + .../staging/vc04_services/vc-sm-cma/vc_sm.c | 817 ++++++++ .../staging/vc04_services/vc-sm-cma/vc_sm.h | 54 + .../vc04_services/vc-sm-cma/vc_sm_cma_vchi.c | 507 +++++ .../vc04_services/vc-sm-cma/vc_sm_cma_vchi.h | 63 + .../vc04_services/vc-sm-cma/vc_sm_defs.h | 187 ++ .../vc04_services/vc-sm-cma/vc_sm_knl.h | 28 + .../staging/vc04_services/vchiq-mmal/Kconfig | 1 + .../vc04_services/vchiq-mmal/mmal-common.h | 5 + .../vc04_services/vchiq-mmal/mmal-encodings.h | 66 + .../vc04_services/vchiq-mmal/mmal-msg.h | 35 + .../vchiq-mmal/mmal-parameters.h | 165 +- .../vc04_services/vchiq-mmal/mmal-vchiq.c | 253 ++- .../vc04_services/vchiq-mmal/mmal-vchiq.h | 5 + include/media/videobuf2-core.h | 15 + include/uapi/linux/bcm2835-isp.h | 347 ++++ include/uapi/linux/v4l2-controls.h | 5 + include/uapi/linux/videodev2.h | 1 + 35 files changed, 5235 insertions(+), 34 deletions(-) create mode 100644 Documentation/admin-guide/media/bcm2835-isp.rst create mode 100644 Documentation/userspace-api/media/v4l/pixfmt-meta-bcm2835-isp-stats.rst create mode 100644 drivers/staging/vc04_services/bcm2835-isp/Kconfig create mode 100644 drivers/staging/vc04_services/bcm2835-isp/Makefile create mode 100644 drivers/staging/vc04_services/bcm2835-isp/bcm2835-isp-ctrls.h create mode 100644 drivers/staging/vc04_services/bcm2835-isp/bcm2835-isp-fmts.h create mode 100644 drivers/staging/vc04_services/bcm2835-isp/bcm2835-v4l2-isp.c create mode 100644 drivers/staging/vc04_services/vc-sm-cma/Kconfig create mode 100644 drivers/staging/vc04_services/vc-sm-cma/Makefile create mode 100644 drivers/staging/vc04_services/vc-sm-cma/vc_sm.c create mode 100644 drivers/staging/vc04_services/vc-sm-cma/vc_sm.h create mode 100644 drivers/staging/vc04_services/vc-sm-cma/vc_sm_cma_vchi.c create mode 100644 drivers/staging/vc04_services/vc-sm-cma/vc_sm_cma_vchi.h create mode 100644 drivers/staging/vc04_services/vc-sm-cma/vc_sm_defs.h create mode 100644 drivers/staging/vc04_services/vc-sm-cma/vc_sm_knl.h create mode 100644 include/uapi/linux/bcm2835-isp.h