Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Florian Fainelli <florian.fainelli@broadcom.com>
To: Jai Luthra <jai.luthra@ideasonboard.com>,
	Stefan Wahren <wahrenst@gmx.net>,
	Dave Stevenson <dave.stevenson@raspberrypi.com>,
	Phil Elwell <phil@raspberrypi.com>,
	Raspberry Pi Kernel Maintenance <kernel-list@raspberrypi.com>,
	bcm-kernel-feedback-list@broadcom.com
Cc: Martin Wetterwald <martin@wetterwald.eu>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Kieran Bingham <kieran.bingham@ideasonboard.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	linux-rpi-kernel@lists.infradead.org,
	linux-media@vger.kernel.org, Dom Cobley <popcornmix@gmail.com>,
	Alexander Winkowski <dereference23@outlook.com>,
	Juerg Haefliger <juerg.haefliger@canonical.com>
Subject: Re: [PATCH v5 03/11] platform/raspberrypi: Add VideoCore shared memory support
Date: Fri, 13 Nov 2026 19:28:46 -0800	[thread overview]
Message-ID: <425e74b9-11a6-45b7-8bd6-c3fa6c66076e@broadcom.com> (raw)
In-Reply-To: <20261112-b4-vc-sm-cma-v5-3-d25e3b687e71@ideasonboard.com>



On 11/12/2026 3:18 AM, Jai Luthra wrote:
> From: Dave Stevenson <dave.stevenson@raspberrypi.com>
> 
> Add support for the vc-sm-cma driver, to enable sharing of contiguous
> CMA memory allocations with the VideoCore VPU on Raspberry Pi. The
> driver allocates CMA-backed buffers, imports external dmabufs, and
> manages their lifetime via VCHIQ messaging to the VPU service, ensuring
> buffers are not released until both the linux userspace and the VPU
> confirm completion.
> 
> VC4 can only physically address the lower 1GB of RAM and requires
> buffers to be mapped through specific uncached address aliases
> (0xC0000000). Thus, standard CMA could not be used as it has no
> mechanism to ensure allocations are visible and valid to VideoCore
> firmware, or handle cache flushes as VC4 can't see ARM's cache state.
> 
> The vc-sm-cma driver bridges this gap by allocating memory via CMA on
> the ARM side and explicitly importing it into VideoCore via VCHI.
> 
> This driver is primarily used by the wrapper V4L2 drivers for codec and
> ISP, where firmware running on VC4 does the actual video and image
> processing, while the linux userspace interacts with standard V4L2
> driver interfaces. For example, the ISP driver populates large
> lens-shading related tables for a particular camera setup, and uses
> vc-sm-cma to share this buffer with VC4.
> 
> Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
> Signed-off-by: Dom Cobley <popcornmix@gmail.com>
> Signed-off-by: Phil Elwell <phil@raspberrypi.com>
> Signed-off-by: Alexander Winkowski <dereference23@outlook.com>
> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
> Signed-off-by: Juerg Haefliger <juerg.haefliger@canonical.com>
> [clean-up for mainline and switch to xarray instead of idr]
> Signed-off-by: Jai Luthra <jai.luthra@ideasonboard.com>
> ---

Applied to https://github.com/Broadcom/stblinux/commits/drivers/next, 
thanks!
-- 
Florian



  reply	other threads:[~2026-11-14  3:28 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-12 11:17 [PATCH v5 00/11] platform/raspberrypi: Support vc-sm-cma and prepare for bcm2835-isp driver Jai Luthra
2026-11-12 11:17 ` [PATCH v5 01/11] platform/raspberrypi: vchiq-mmal: Reset buffers_with_vpu on port_enable Jai Luthra
2026-11-14  3:28   ` Florian Fainelli
2026-11-12 11:18 ` [PATCH v5 02/11] platform/raspberrypi: vchiq: Store audio device in driver management struct Jai Luthra
2026-11-14  3:28   ` Florian Fainelli
2026-11-12 11:18 ` [PATCH v5 03/11] platform/raspberrypi: Add VideoCore shared memory support Jai Luthra
2026-11-14  3:28   ` Florian Fainelli [this message]
2026-11-12 11:18 ` [PATCH v5 04/11] platform/raspberrypi: vchiq-mmal: Use vc-sm-cma to support zero copy Jai Luthra
2026-11-14  3:29   ` Florian Fainelli
2026-11-12 11:18 ` [PATCH v5 05/11] platform/raspberrypi: vchiq-mmal: Support sending data to MMAL ports Jai Luthra
2026-11-14  3:29   ` Florian Fainelli
2026-11-12 11:18 ` [PATCH v5 06/11] platform/raspberrypi: vchiq: Register vc-sm-cma as a platform driver Jai Luthra
2026-11-14  3:25   ` Florian Fainelli
2026-11-12 11:18 ` [PATCH v5 07/11] platform/raspberrypi: vchiq-mmal: Include missing headers Jai Luthra
2026-11-14  3:26   ` Florian Fainelli
2026-11-12 11:18 ` [PATCH v5 08/11] platform/raspberrypi: vchiq-mmal: Move headers to include/linux Jai Luthra
2026-11-14  3:26   ` Florian Fainelli
2026-11-12 11:18 ` [PATCH v5 09/11] platform/raspberrypi: vchiq-mmal: Support ISP parameters and stats Jai Luthra
2026-11-14  3:26   ` Florian Fainelli
2026-11-12 11:18 ` [PATCH v5 10/11] platform/raspberrypi: vchiq-mmal: Support bayer and gray formats Jai Luthra
2026-11-14  3:26   ` Florian Fainelli
2026-11-12 11:18 ` [PATCH v5 11/11] platform/raspberrypi: vchiq: Add helpers for vchiq driver data Jai Luthra
2026-11-14  3:26   ` Florian Fainelli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=425e74b9-11a6-45b7-8bd6-c3fa6c66076e@broadcom.com \
    --to=florian.fainelli@broadcom.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=dave.stevenson@raspberrypi.com \
    --cc=dereference23@outlook.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jai.luthra@ideasonboard.com \
    --cc=juerg.haefliger@canonical.com \
    --cc=kernel-list@raspberrypi.com \
    --cc=kieran.bingham@ideasonboard.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-rpi-kernel@lists.infradead.org \
    --cc=martin@wetterwald.eu \
    --cc=phil@raspberrypi.com \
    --cc=popcornmix@gmail.com \
    --cc=wahrenst@gmx.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox