Skip to content

Commit 72594ed

Browse files
committed
staging: vc04_services: bcm2835-camera: Add back the downstream driver
Signed-off-by: Dave Stevenson <[email protected]>
1 parent 4c470f1 commit 72594ed

File tree

9 files changed

+3649
-0
lines changed

9 files changed

+3649
-0
lines changed

drivers/platform/raspberrypi/vchiq-mmal/mmal-parameters.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,7 @@ enum mmal_parameter_awbmode {
368368
MMAL_PARAM_AWBMODE_INCANDESCENT,
369369
MMAL_PARAM_AWBMODE_FLASH,
370370
MMAL_PARAM_AWBMODE_HORIZON,
371+
MMAL_PARAM_AWBMODE_GREYWORLD,
371372
};
372373

373374
enum mmal_parameter_imagefx {

drivers/staging/vc04_services/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
if BCM_VIDEOCORE
33

44
source "drivers/staging/vc04_services/bcm2835-audio/Kconfig"
5+
source "drivers/staging/vc04_services/bcm2835-camera/Kconfig"
56

67
endif
78

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
# SPDX-License-Identifier: GPL-2.0
22
obj-$(CONFIG_SND_BCM2835) += bcm2835-audio/
3+
obj-$(CONFIG_VIDEO_BCM2835) += bcm2835-camera/
34

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# SPDX-License-Identifier: GPL-2.0
2+
config VIDEO_BCM2835
3+
tristate "BCM2835 Camera"
4+
depends on MEDIA_SUPPORT
5+
depends on VIDEO_DEV && (ARCH_BCM2835 || COMPILE_TEST)
6+
select BCM2835_VCHIQ if HAS_DMA
7+
select BCM2835_VCHIQ_MMAL if HAS_DMA
8+
select VIDEOBUF2_VMALLOC
9+
select BTREE
10+
help
11+
Say Y here to enable camera host interface devices for
12+
Broadcom BCM2835 SoC. This operates over the VCHIQ interface
13+
to a service running on VideoCore.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# SPDX-License-Identifier: GPL-2.0
2+
bcm2835-v4l2-$(CONFIG_VIDEO_BCM2835) := \
3+
bcm2835-camera.o \
4+
controls.o
5+
6+
obj-$(CONFIG_VIDEO_BCM2835) += bcm2835-v4l2.o
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
1) Support dma-buf memory management.
2+
3+
In order to zero-copy import camera images into the 3D or display
4+
pipelines, we need to export our buffers through dma-buf so that the
5+
vc4 driver can import them. This may involve bringing in the VCSM
6+
driver (which allows long-term management of regions of memory in the
7+
space that the VPU reserved and Linux otherwise doesn't have access
8+
to), or building some new protocol that allows VCSM-style management
9+
of Linux's CMA memory.
10+
11+
2) Avoid extra copies for padding of images.
12+
13+
We expose V4L2_PIX_FMT_* formats that have a specified stride/height
14+
padding in the V4L2 spec, but that padding doesn't match what the
15+
hardware can do. If we exposed the native padding requirements
16+
through the V4L2 "multiplanar" formats, the firmware would have one
17+
less copy it needed to do.

0 commit comments

Comments
 (0)