[PATCH 01/10] platform/raspberrypi: vchiq-mmal: Move headers to include/linux
Jai Luthra
jai.luthra at ideasonboard.com
Tue Jan 13 09:24:23 PST 2026
Hi Kieran,
Quoting Kieran Bingham (2026-01-13 22:20:30)
> Quoting Jai Luthra (2026-01-13 09:05:21)
> > Now that VCHIQ interface is destaged, different drivers (like ISP or
> > codec) no longer live under the same tree as VCHIQ MMAL, but in their
> > relevant trees like media or audio.
> >
> > Enable access to VCHIQ headers for such drivers by moving these headers
> > under include/linux/raspberrypi with other VCHIQ related headers.
> >
> > Signed-off-by: Jai Luthra <jai.luthra at ideasonboard.com>
> > ---
> > MAINTAINERS | 1 +
> > drivers/platform/raspberrypi/vchiq-mmal/mmal-vchiq.c | 9 ++++-----
> > .../vchiq-mmal => include/linux/raspberrypi}/mmal-common.h | 2 ++
> > .../vchiq-mmal => include/linux/raspberrypi}/mmal-encodings.h | 0
> > .../vchiq-mmal => include/linux/raspberrypi}/mmal-msg-common.h | 0
> > .../vchiq-mmal => include/linux/raspberrypi}/mmal-msg-format.h | 0
> > .../vchiq-mmal => include/linux/raspberrypi}/mmal-msg-port.h | 0
> > .../vchiq-mmal => include/linux/raspberrypi}/mmal-msg.h | 0
> > .../vchiq-mmal => include/linux/raspberrypi}/mmal-parameters.h | 0
> > .../vchiq-mmal => include/linux/raspberrypi}/mmal-vchiq.h | 0
> > 10 files changed, 7 insertions(+), 5 deletions(-)
> >
> > diff --git a/MAINTAINERS b/MAINTAINERS
> > index 816cceb5dc2d066665501aa8bbc04a2edd751087..16002c21fe06913ed57f495265b0b1ad14772c55 100644
> > --- a/MAINTAINERS
> > +++ b/MAINTAINERS
> > @@ -4927,6 +4927,7 @@ F: Documentation/devicetree/bindings/pci/brcm,stb-pcie.yaml
> > F: drivers/pci/controller/pcie-brcmstb.c
> > F: drivers/platform/raspberrypi/vchiq-*
> > F: drivers/staging/vc04_services
> > +F: include/linux/raspberrypi/mmal*
> > F: include/linux/raspberrypi/vchiq*
> > N: bcm2711
> > N: bcm2712
> > diff --git a/drivers/platform/raspberrypi/vchiq-mmal/mmal-vchiq.c b/drivers/platform/raspberrypi/vchiq-mmal/mmal-vchiq.c
> > index a228098d8cc0af5d5900b92b2847a1626a6d599c..3ead81dd2d0f48be7a5dd87256c38d6ba0dbcd0e 100644
> > --- a/drivers/platform/raspberrypi/vchiq-mmal/mmal-vchiq.c
> > +++ b/drivers/platform/raspberrypi/vchiq-mmal/mmal-vchiq.c
> > @@ -22,17 +22,16 @@
> > #include <linux/mm.h>
> > #include <linux/slab.h>
> > #include <linux/completion.h>
> > +#include <linux/raspberrypi/mmal-common.h>
> > +#include <linux/raspberrypi/mmal-parameters.h>
> > +#include <linux/raspberrypi/mmal-vchiq.h>
> > +#include <linux/raspberrypi/mmal-msg.h>
> > #include <linux/raspberrypi/vchiq.h>
> > #include <linux/raspberrypi/vchiq_arm.h>
> > #include <linux/raspberrypi/vc_sm_knl.h>
> > #include <linux/vmalloc.h>
> > #include <media/videobuf2-vmalloc.h>
> >
> > -#include "mmal-common.h"
> > -#include "mmal-parameters.h"
> > -#include "mmal-vchiq.h"
> > -#include "mmal-msg.h"
> > -
The mmal-common.h header got moved above videobuf2-vmalloc.h here ....
> > /*
> > * maximum number of components supported.
> > * This matches the maximum permitted by default on the VPU
> > diff --git a/drivers/platform/raspberrypi/vchiq-mmal/mmal-common.h b/include/linux/raspberrypi/mmal-common.h
> > similarity index 97%
> > rename from drivers/platform/raspberrypi/vchiq-mmal/mmal-common.h
> > rename to include/linux/raspberrypi/mmal-common.h
> > index 6c5092a68b99594a0234f56b48b785fbc611bf5a..e7f065c539bcae7480a8dc2000d2a1e4cec7883c 100644
> > --- a/drivers/platform/raspberrypi/vchiq-mmal/mmal-common.h
> > +++ b/include/linux/raspberrypi/mmal-common.h
> > @@ -16,6 +16,8 @@
> > #ifndef MMAL_COMMON_H
> > #define MMAL_COMMON_H
> >
> > +#include <media/videobuf2-v4l2.h>
> > +
>
> Is this spurious? I could understand the changes up in mmal-vchiq.c
> above but I don't see how this relates to the move?
>
.... which exposed the fact that mmal-common.h references to `struct
vb2_v4l2_buffer` without including the relevant header, so clangd
complained and populated it for me, and I forgot to mention it in the
commit message.
Sorry for the confusion. Not a spurious change. Is this fine as a note in
the commit message, or should I fix the header as a separate commit in v2?
>
> > #define MMAL_FOURCC(a, b, c, d) ((a) | (b << 8) | (c << 16) | (d << 24))
> > #define MMAL_MAGIC MMAL_FOURCC('m', 'm', 'a', 'l')
> >
[...]
Thanks,
Jai
More information about the linux-arm-kernel
mailing list