From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Jai Luthra <jai.luthra@ideasonboard.com>
Cc: Florian Fainelli <florian.fainelli@broadcom.com>,
Broadcom internal kernel review list
<bcm-kernel-feedback-list@broadcom.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Ray Jui <rjui@broadcom.com>,
Scott Branden <sbranden@broadcom.com>,
linux-rpi-kernel@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
kernel-list@raspberrypi.com, Stefan Wahren <wahrenst@gmx.net>,
Dave Stevenson <dave.stevenson@raspberrypi.com>,
Umang Jain <uajain@igalia.com>
Subject: Re: [PATCH 1/5] include: linux: Destage VCHIQ interface headers
Date: Wed, 27 Aug 2025 14:40:16 +0200 [thread overview]
Message-ID: <20250827124016.GF5650@pendragon.ideasonboard.com> (raw)
In-Reply-To: <20250827-vchiq-destage-v1-1-5052a0d81c42@ideasonboard.com>
Hi Jai,
Thank you for the patch.
On Wed, Aug 27, 2025 at 11:54:08AM +0530, Jai Luthra wrote:
> From: Umang Jain <umang.jain@ideasonboard.com>
>
> Move the VCHIQ headers from drivers/staging/vc04_services/include to
> include/linux/vchiq
>
> This is done so that they can be shared between the VCHIQ interface
> (which is going to be de-staged in a subsequent commit from staging)
> and the VCHIQ drivers left in the staging/vc04_services (namely
> bcm2835-audio, bcm2835-camera).
>
> The include/linux/vchiq/ provides a central location to serve both
> of these areas.
Lots of SoC-specific headers are stored in include/linux/soc/$vendor/.
This would be include/linux/soc/bcm/vchiq/ in this case. I'm also fine
with include/linux/vchiq/ but other people may have a preference.
> Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
> Signed-off-by: Jai Luthra <jai.luthra@ideasonboard.com>
> ---
> MAINTAINERS | 1 +
> drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c | 5 +++--
> drivers/staging/vc04_services/bcm2835-audio/bcm2835.c | 3 ++-
> drivers/staging/vc04_services/bcm2835-audio/bcm2835.h | 3 +--
> drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c | 3 ++-
> drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 9 +++++----
> drivers/staging/vc04_services/interface/vchiq_arm/vchiq_bus.c | 4 ++--
> drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c | 4 ++--
> .../staging/vc04_services/interface/vchiq_arm/vchiq_debugfs.c | 6 +++---
> drivers/staging/vc04_services/interface/vchiq_arm/vchiq_dev.c | 7 ++++---
> drivers/staging/vc04_services/interface/vchiq_arm/vchiq_ioctl.h | 3 +--
> drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c | 5 +++--
> .../include/linux/raspberrypi => include/linux/vchiq}/vchiq.h | 0
> .../interface/vchiq_arm => include/linux/vchiq}/vchiq_arm.h | 0
> .../interface/vchiq_arm => include/linux/vchiq}/vchiq_bus.h | 0
> .../interface/vchiq_arm => include/linux/vchiq}/vchiq_cfg.h | 0
> .../interface/vchiq_arm => include/linux/vchiq}/vchiq_core.h | 2 +-
> .../interface/vchiq_arm => include/linux/vchiq}/vchiq_debugfs.h | 0
> 18 files changed, 30 insertions(+), 25 deletions(-)
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index fe168477caa45799dfe07de2f54de6d6a1ce0615..f17ebb1fa51bd7e4dcb2ae1b0fced6d41685dc84 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -4754,6 +4754,7 @@ T: git https://github.com/broadcom/stblinux.git
> F: Documentation/devicetree/bindings/pci/brcm,stb-pcie.yaml
> F: drivers/pci/controller/pcie-brcmstb.c
> F: drivers/staging/vc04_services
> +F: include/linux/vchiq
> N: bcm2711
> N: bcm2712
> N: bcm283*
> diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c
> index 0dbe76ee557032d7861acfc002cc203ff2e6971d..c49f2f7409b84ed6ebdd71787566efb1bc230f55 100644
> --- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c
> +++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c
> @@ -4,11 +4,12 @@
> #include <linux/slab.h>
> #include <linux/module.h>
> #include <linux/completion.h>
> +
> +#include <linux/vchiq/vchiq_arm.h>
You can group this with the other headers above (ideally in alphabetical
order when #include statements are already sorted). Same comment where
applicable below.
With that,
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> +
> #include "bcm2835.h"
> #include "vc_vchi_audioserv_defs.h"
>
> -#include "../interface/vchiq_arm/vchiq_arm.h"
> -
> struct bcm2835_audio_instance {
> struct device *dev;
> unsigned int service_handle;
> diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835.c b/drivers/staging/vc04_services/bcm2835-audio/bcm2835.c
> index b74cb104e9de00e7688a320949111a419cca084a..5011720940715c12a2d2fe58b40ed84dcb2e6824 100644
> --- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835.c
> +++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835.c
> @@ -6,7 +6,8 @@
> #include <linux/slab.h>
> #include <linux/module.h>
>
> -#include "../interface/vchiq_arm/vchiq_bus.h"
> +#include <linux/vchiq/vchiq_bus.h>
> +
> #include "bcm2835.h"
>
> static bool enable_hdmi;
> diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835.h b/drivers/staging/vc04_services/bcm2835-audio/bcm2835.h
> index 49ec5b496edb4ba8634171b1390c4e15181e4048..7e63ef251c37269032fc20ae1237855245e5e0a7 100644
> --- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835.h
> +++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835.h
> @@ -5,13 +5,12 @@
> #define __SOUND_ARM_BCM2835_H
>
> #include <linux/device.h>
> +#include <linux/vchiq/vchiq.h>
> #include <linux/wait.h>
> #include <sound/core.h>
> #include <sound/pcm.h>
> #include <sound/pcm-indirect.h>
>
> -#include "../include/linux/raspberrypi/vchiq.h"
> -
> #define MAX_SUBSTREAMS (8)
> #define AVAIL_SUBSTREAMS_MASK (0xff)
>
> diff --git a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
> index fa7ea4ca4c36f4ec7f76f6ffbea9f45205116bb8..fcbbe1aa60b768e5a7a08a131f595a0457f4473a 100644
> --- a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
> +++ b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
> @@ -26,7 +26,8 @@
> #include <media/v4l2-common.h>
> #include <linux/delay.h>
>
> -#include "../interface/vchiq_arm/vchiq_bus.h"
> +#include <linux/vchiq/vchiq_bus.h>
> +
> #include "../vchiq-mmal/mmal-common.h"
> #include "../vchiq-mmal/mmal-encodings.h"
> #include "../vchiq-mmal/mmal-vchiq.h"
> diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
> index 721b15b7e13b9f25cee7619575bbfa1a4734cce8..10138c1454dd7fdcbab6b95ea41f8e1ac2defc4b 100644
> --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
> +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
> @@ -30,11 +30,12 @@
> #include <linux/uaccess.h>
> #include <soc/bcm2835/raspberrypi-firmware.h>
>
> -#include "vchiq_core.h"
> +#include <linux/vchiq/vchiq_core.h>
> +#include <linux/vchiq/vchiq_arm.h>
> +#include <linux/vchiq/vchiq_bus.h>
> +#include <linux/vchiq/vchiq_debugfs.h>
> +
> #include "vchiq_ioctl.h"
> -#include "vchiq_arm.h"
> -#include "vchiq_bus.h"
> -#include "vchiq_debugfs.h"
>
> #define DEVICE_NAME "vchiq"
>
> diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_bus.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_bus.c
> index 41ece91ab88aa647a348910a0b913d0b28a8c761..5d55dbff82150a84b15483e71718c48f5cb8caea 100644
> --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_bus.c
> +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_bus.c
> @@ -11,8 +11,8 @@
> #include <linux/slab.h>
> #include <linux/string.h>
>
> -#include "vchiq_arm.h"
> -#include "vchiq_bus.h"
> +#include <linux/vchiq/vchiq_arm.h>
> +#include <linux/vchiq/vchiq_bus.h>
>
> static int vchiq_bus_type_match(struct device *dev, const struct device_driver *drv)
> {
> diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
> index e2cac0898b8faa3c255de6b8562c7096a9683c49..ac0379f5f45dfa331dc2fec8d580d176f931cf2b 100644
> --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
> +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
> @@ -15,8 +15,8 @@
> #include <linux/rcupdate.h>
> #include <linux/sched/signal.h>
>
> -#include "vchiq_arm.h"
> -#include "vchiq_core.h"
> +#include <linux/vchiq/vchiq_arm.h>
> +#include <linux/vchiq/vchiq_core.h>
>
> #define VCHIQ_SLOT_HANDLER_STACK 8192
>
> diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_debugfs.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_debugfs.c
> index d5f7f61c5626934b819e8ff322e22ae3d6158b31..b1a8f1abafc2fa83132b1a02ba343d71315950de 100644
> --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_debugfs.c
> +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_debugfs.c
> @@ -5,9 +5,9 @@
> */
>
> #include <linux/debugfs.h>
> -#include "vchiq_core.h"
> -#include "vchiq_arm.h"
> -#include "vchiq_debugfs.h"
> +#include <linux/vchiq/vchiq_core.h>
> +#include <linux/vchiq/vchiq_arm.h>
> +#include <linux/vchiq/vchiq_debugfs.h>
>
> #ifdef CONFIG_DEBUG_FS
>
> diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_dev.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_dev.c
> index 3b20ba5c736221ce1cacfc9ce86eca623382a30b..781d6dd64ee33816b52b62f1f25bcd33363d8e02 100644
> --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_dev.c
> +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_dev.c
> @@ -11,10 +11,11 @@
> #include <linux/compat.h>
> #include <linux/miscdevice.h>
>
> -#include "vchiq_core.h"
> +#include <linux/vchiq/vchiq_core.h>
> +#include <linux/vchiq/vchiq_arm.h>
> +#include <linux/vchiq/vchiq_debugfs.h>
> +
> #include "vchiq_ioctl.h"
> -#include "vchiq_arm.h"
> -#include "vchiq_debugfs.h"
>
> static const char *const ioctl_names[] = {
> "CONNECT",
> diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_ioctl.h b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_ioctl.h
> index afb71a83cfe7035e5dd61003fa99fd514ca18047..638469f18f859a0c7e738ef5bed7bf3c3ebebe59 100644
> --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_ioctl.h
> +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_ioctl.h
> @@ -5,8 +5,7 @@
> #define VCHIQ_IOCTLS_H
>
> #include <linux/ioctl.h>
> -
> -#include "../../include/linux/raspberrypi/vchiq.h"
> +#include <linux/vchiq/vchiq.h>
>
> #define VCHIQ_IOC_MAGIC 0xc4
> #define VCHIQ_INVALID_HANDLE (~0)
> diff --git a/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c b/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c
> index 3fe482bd279390a7586c49bde00f38c61558ca8e..f5e141908b0f91ca4172d48aee37f0329d239d7c 100644
> --- a/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c
> +++ b/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c
> @@ -22,11 +22,12 @@
> #include <linux/mm.h>
> #include <linux/slab.h>
> #include <linux/completion.h>
> +#include <linux/vchiq/vchiq.h>
> #include <linux/vmalloc.h>
> #include <media/videobuf2-vmalloc.h>
>
> -#include "../include/linux/raspberrypi/vchiq.h"
> -#include "../interface/vchiq_arm/vchiq_arm.h"
> +#include <linux/vchiq/vchiq_arm.h>
> +
> #include "mmal-common.h"
> #include "mmal-vchiq.h"
> #include "mmal-msg.h"
> diff --git a/drivers/staging/vc04_services/include/linux/raspberrypi/vchiq.h b/include/linux/vchiq/vchiq.h
> similarity index 100%
> rename from drivers/staging/vc04_services/include/linux/raspberrypi/vchiq.h
> rename to include/linux/vchiq/vchiq.h
> diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h b/include/linux/vchiq/vchiq_arm.h
> similarity index 100%
> rename from drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h
> rename to include/linux/vchiq/vchiq_arm.h
> diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_bus.h b/include/linux/vchiq/vchiq_bus.h
> similarity index 100%
> rename from drivers/staging/vc04_services/interface/vchiq_arm/vchiq_bus.h
> rename to include/linux/vchiq/vchiq_bus.h
> diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_cfg.h b/include/linux/vchiq/vchiq_cfg.h
> similarity index 100%
> rename from drivers/staging/vc04_services/interface/vchiq_arm/vchiq_cfg.h
> rename to include/linux/vchiq/vchiq_cfg.h
> diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h b/include/linux/vchiq/vchiq_core.h
> similarity index 99%
> rename from drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h
> rename to include/linux/vchiq/vchiq_core.h
> index 9b4e766990a493d6e9d4e0604f2c84f4e7b77804..dbcb19e7a6d39b94967261c4ab23d6325e999249 100644
> --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h
> +++ b/include/linux/vchiq/vchiq_core.h
> @@ -15,7 +15,7 @@
> #include <linux/spinlock_types.h>
> #include <linux/wait.h>
>
> -#include "../../include/linux/raspberrypi/vchiq.h"
> +#include "vchiq.h"
> #include "vchiq_cfg.h"
>
> /* Do this so that we can test-build the code on non-rpi systems */
> diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_debugfs.h b/include/linux/vchiq/vchiq_debugfs.h
> similarity index 100%
> rename from drivers/staging/vc04_services/interface/vchiq_arm/vchiq_debugfs.h
> rename to include/linux/vchiq/vchiq_debugfs.h
>
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2025-08-27 12:40 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-27 6:24 [PATCH 0/5] staging: Destage VCHIQ interface and MMAL Jai Luthra
2025-08-27 6:24 ` [PATCH 1/5] include: linux: Destage VCHIQ interface headers Jai Luthra
2025-08-27 12:40 ` Laurent Pinchart [this message]
2025-08-27 14:33 ` Umang Jain
2025-08-27 19:05 ` Stefan Wahren
2025-08-28 2:17 ` Florian Fainelli
2025-08-28 6:19 ` Stefan Wahren
2025-09-03 13:48 ` Jai Luthra
2025-09-03 15:03 ` Stefan Wahren
2025-09-03 16:16 ` Florian Fainelli
2025-09-03 16:13 ` Florian Fainelli
2025-08-27 6:24 ` [PATCH 2/5] staging: vc04_services: Cleanup formatting TODO entry Jai Luthra
2025-08-27 12:45 ` Laurent Pinchart
2025-08-27 18:55 ` Stefan Wahren
2025-08-27 6:24 ` [PATCH 3/5] platform/broadcom: Destage VCHIQ interface Jai Luthra
2025-08-27 6:24 ` [PATCH 4/5] media: staging: Drop bcm2835-camera driver Jai Luthra
2025-08-27 12:48 ` Laurent Pinchart
2025-08-27 19:18 ` Stefan Wahren
2025-09-01 10:59 ` Dave Stevenson
2025-09-03 13:40 ` Jai Luthra
2025-09-08 12:00 ` Stefan Wahren
2025-09-09 11:57 ` Peter Robinson
2025-08-27 6:24 ` [PATCH 5/5] platform/broadcom: Destage VCHIQ MMAL driver Jai Luthra
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=20250827124016.GF5650@pendragon.ideasonboard.com \
--to=laurent.pinchart@ideasonboard.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=dave.stevenson@raspberrypi.com \
--cc=florian.fainelli@broadcom.com \
--cc=gregkh@linuxfoundation.org \
--cc=jai.luthra@ideasonboard.com \
--cc=kernel-list@raspberrypi.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rpi-kernel@lists.infradead.org \
--cc=linux-staging@lists.linux.dev \
--cc=rjui@broadcom.com \
--cc=sbranden@broadcom.com \
--cc=uajain@igalia.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
all inboxes | Powered by JetHome®