mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
staging: vc04_services: Drop bcm2835-camera driver
The bcm2835-camera driver is replaced by the V4L2 bcm2835-unicam driver that is already upstream. So drop it from staging. This also simplifies destaging of VCHIQ MMAL, by reducing the users of the MMAL API (this driver is one of them). Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Jai Luthra <jai.luthra@ideasonboard.com> Acked-by: Stefan Wahren <wahrenst@gmx.net> Link: https://patch.msgid.link/20251029-vchiq-destage-v3-1-da8d6c83c2c5@ideasonboard.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
23413fe138
commit
90204a38a7
@@ -48,8 +48,6 @@ endif
|
||||
|
||||
source "drivers/staging/vc04_services/bcm2835-audio/Kconfig"
|
||||
|
||||
source "drivers/staging/vc04_services/bcm2835-camera/Kconfig"
|
||||
|
||||
source "drivers/staging/vc04_services/vchiq-mmal/Kconfig"
|
||||
|
||||
endif
|
||||
|
||||
@@ -12,6 +12,5 @@ vchiq-objs += interface/vchiq_arm/vchiq_dev.o
|
||||
endif
|
||||
|
||||
obj-$(CONFIG_SND_BCM2835) += bcm2835-audio/
|
||||
obj-$(CONFIG_VIDEO_BCM2835) += bcm2835-camera/
|
||||
obj-$(CONFIG_BCM2835_VCHIQ_MMAL) += vchiq-mmal/
|
||||
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
config VIDEO_BCM2835
|
||||
tristate "BCM2835 Camera"
|
||||
depends on MEDIA_SUPPORT
|
||||
depends on VIDEO_DEV && (ARCH_BCM2835 || COMPILE_TEST)
|
||||
select BCM2835_VCHIQ if HAS_DMA
|
||||
select BCM2835_VCHIQ_MMAL if HAS_DMA
|
||||
select VIDEOBUF2_VMALLOC
|
||||
select BTREE
|
||||
help
|
||||
Say Y here to enable camera host interface devices for
|
||||
Broadcom BCM2835 SoC. This operates over the VCHIQ interface
|
||||
to a service running on VideoCore.
|
||||
@@ -1,6 +0,0 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
bcm2835-v4l2-$(CONFIG_VIDEO_BCM2835) := \
|
||||
bcm2835-camera.o \
|
||||
controls.o
|
||||
|
||||
obj-$(CONFIG_VIDEO_BCM2835) += bcm2835-v4l2.o
|
||||
@@ -1,17 +0,0 @@
|
||||
1) Support dma-buf memory management.
|
||||
|
||||
In order to zero-copy import camera images into the 3D or display
|
||||
pipelines, we need to export our buffers through dma-buf so that the
|
||||
vc4 driver can import them. This may involve bringing in the VCSM
|
||||
driver (which allows long-term management of regions of memory in the
|
||||
space that the VPU reserved and Linux otherwise doesn't have access
|
||||
to), or building some new protocol that allows VCSM-style management
|
||||
of Linux's CMA memory.
|
||||
|
||||
2) Avoid extra copies for padding of images.
|
||||
|
||||
We expose V4L2_PIX_FMT_* formats that have a specified stride/height
|
||||
padding in the V4L2 spec, but that padding doesn't match what the
|
||||
hardware can do. If we exposed the native padding requirements
|
||||
through the V4L2 "multiplanar" formats, the firmware would have one
|
||||
less copy it needed to do.
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,142 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
/*
|
||||
* Broadcom BCM2835 V4L2 driver
|
||||
*
|
||||
* Copyright © 2013 Raspberry Pi (Trading) Ltd.
|
||||
*
|
||||
* Authors: Vincent Sanders @ Collabora
|
||||
* Dave Stevenson @ Broadcom
|
||||
* (now dave.stevenson@raspberrypi.org)
|
||||
* Simon Mellor @ Broadcom
|
||||
* Luke Diamand @ Broadcom
|
||||
*
|
||||
* core driver device
|
||||
*/
|
||||
|
||||
#define V4L2_CTRL_COUNT 29 /* number of v4l controls */
|
||||
|
||||
enum {
|
||||
COMP_CAMERA = 0,
|
||||
COMP_PREVIEW,
|
||||
COMP_IMAGE_ENCODE,
|
||||
COMP_VIDEO_ENCODE,
|
||||
COMP_COUNT
|
||||
};
|
||||
|
||||
enum {
|
||||
CAM_PORT_PREVIEW = 0,
|
||||
CAM_PORT_VIDEO,
|
||||
CAM_PORT_CAPTURE,
|
||||
CAM_PORT_COUNT
|
||||
};
|
||||
|
||||
extern int bcm2835_v4l2_debug;
|
||||
|
||||
struct bcm2835_mmal_dev {
|
||||
/* v4l2 devices */
|
||||
struct v4l2_device v4l2_dev;
|
||||
struct video_device vdev;
|
||||
struct mutex mutex;
|
||||
|
||||
/* controls */
|
||||
struct v4l2_ctrl_handler ctrl_handler;
|
||||
struct v4l2_ctrl *ctrls[V4L2_CTRL_COUNT];
|
||||
enum v4l2_scene_mode scene_mode;
|
||||
struct mmal_colourfx colourfx;
|
||||
int hflip;
|
||||
int vflip;
|
||||
int red_gain;
|
||||
int blue_gain;
|
||||
enum mmal_parameter_exposuremode exposure_mode_user;
|
||||
enum v4l2_exposure_auto_type exposure_mode_v4l2_user;
|
||||
/* active exposure mode may differ if selected via a scene mode */
|
||||
enum mmal_parameter_exposuremode exposure_mode_active;
|
||||
enum mmal_parameter_exposuremeteringmode metering_mode;
|
||||
unsigned int manual_shutter_speed;
|
||||
bool exp_auto_priority;
|
||||
bool manual_iso_enabled;
|
||||
u32 iso;
|
||||
|
||||
/* allocated mmal instance and components */
|
||||
struct vchiq_mmal_instance *instance;
|
||||
struct vchiq_mmal_component *component[COMP_COUNT];
|
||||
int camera_use_count;
|
||||
|
||||
struct v4l2_window overlay;
|
||||
|
||||
struct {
|
||||
unsigned int width; /* width */
|
||||
unsigned int height; /* height */
|
||||
unsigned int stride; /* stride */
|
||||
unsigned int buffersize; /* buffer size with padding */
|
||||
struct mmal_fmt *fmt;
|
||||
struct v4l2_fract timeperframe;
|
||||
|
||||
/* H264 encode bitrate */
|
||||
int encode_bitrate;
|
||||
/* H264 bitrate mode. CBR/VBR */
|
||||
int encode_bitrate_mode;
|
||||
/* H264 profile */
|
||||
enum v4l2_mpeg_video_h264_profile enc_profile;
|
||||
/* H264 level */
|
||||
enum v4l2_mpeg_video_h264_level enc_level;
|
||||
/* JPEG Q-factor */
|
||||
int q_factor;
|
||||
|
||||
struct vb2_queue vb_vidq;
|
||||
|
||||
/* VC start timestamp for streaming */
|
||||
s64 vc_start_timestamp;
|
||||
/* Kernel start timestamp for streaming */
|
||||
ktime_t kernel_start_ts;
|
||||
/* Sequence number of last buffer */
|
||||
u32 sequence;
|
||||
|
||||
struct vchiq_mmal_port *port; /* port being used for capture */
|
||||
/* camera port being used for capture */
|
||||
struct vchiq_mmal_port *camera_port;
|
||||
/* component being used for encode */
|
||||
struct vchiq_mmal_component *encode_component;
|
||||
/* number of frames remaining which driver should capture */
|
||||
unsigned int frame_count;
|
||||
/* last frame completion */
|
||||
struct completion frame_cmplt;
|
||||
|
||||
} capture;
|
||||
|
||||
unsigned int camera_num;
|
||||
unsigned int max_width;
|
||||
unsigned int max_height;
|
||||
unsigned int rgb_bgr_swapped;
|
||||
};
|
||||
|
||||
int bcm2835_mmal_init_controls(struct bcm2835_mmal_dev *dev, struct v4l2_ctrl_handler *hdl);
|
||||
|
||||
int bcm2835_mmal_set_all_camera_controls(struct bcm2835_mmal_dev *dev);
|
||||
int set_framerate_params(struct bcm2835_mmal_dev *dev);
|
||||
|
||||
/* Debug helpers */
|
||||
|
||||
#define v4l2_dump_pix_format(level, debug, dev, pix_fmt, desc) \
|
||||
{ \
|
||||
v4l2_dbg(level, debug, dev, \
|
||||
"%s: w %u h %u field %u pfmt 0x%x bpl %u sz_img %u colorspace 0x%x priv %u\n", \
|
||||
desc, \
|
||||
(pix_fmt)->width, (pix_fmt)->height, (pix_fmt)->field, \
|
||||
(pix_fmt)->pixelformat, (pix_fmt)->bytesperline, \
|
||||
(pix_fmt)->sizeimage, (pix_fmt)->colorspace, (pix_fmt)->priv); \
|
||||
}
|
||||
|
||||
#define v4l2_dump_win_format(level, debug, dev, win_fmt, desc) \
|
||||
{ \
|
||||
v4l2_dbg(level, debug, dev, \
|
||||
"%s: w %u h %u l %u t %u field %u chromakey %06X clip %p " \
|
||||
"clipcount %u bitmap %p\n", \
|
||||
desc, \
|
||||
(win_fmt)->w.width, (win_fmt)->w.height, \
|
||||
(win_fmt)->w.left, (win_fmt)->w.top, \
|
||||
(win_fmt)->field, \
|
||||
(win_fmt)->chromakey, \
|
||||
(win_fmt)->clips, (win_fmt)->clipcount, \
|
||||
(win_fmt)->bitmap); \
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user