diff options
author | Stijn Tintel <stijn@linux-ipv6.be> | 2018-11-10 13:03:18 +0200 |
---|---|---|
committer | Stijn Tintel <stijn@linux-ipv6.be> | 2018-12-18 23:19:21 +0200 |
commit | f5919b65d4c671fd5083838c7a445f319f9a13c8 (patch) | |
tree | 2c791d2a5dea5bbbb0b85f86f74afce2647c0726 /target/linux/brcm2708/patches-4.14/950-0367-staging-bcm2835-camera-Skip-ISP-pass-to-eliminate-pa.patch | |
parent | 822b4c3b250a254e74407056ccfd5c6aa38da162 (diff) | |
download | upstream-f5919b65d4c671fd5083838c7a445f319f9a13c8.tar.gz upstream-f5919b65d4c671fd5083838c7a445f319f9a13c8.tar.bz2 upstream-f5919b65d4c671fd5083838c7a445f319f9a13c8.zip |
brcm2708: add kernel 4.14 support
Patch generation process:
- rebase rpi/rpi-4.14.y on v4.14.89 from linux-stable
- git format-patch v4.14.89
Patches skipped during rebase:
- lan78xx: Read MAC address from DT if present
- lan78xx: Enable LEDs and auto-negotiation
- Revert "softirq: Let ksoftirqd do its job"
- sc16is7xx: Fix for multi-channel stall
- lan78xx: Ignore DT MAC address if already valid
- lan78xx: Simple patch to prevent some crashes
- tcp_write_queue_purge clears all the SKBs in the write queue
- Revert "lan78xx: Simple patch to prevent some crashes"
- lan78xx: Connect phy early
- Arm: mm: ftrace: Only set text back to ro after kernel has been marked ro
- Revert "Revert "softirq: Let ksoftirqd do its job""
- ASoC: cs4265: SOC_SINGLE register value error fix
- Revert "ASoC: cs4265: SOC_SINGLE register value error fix"
- Revert "net: pskb_trim_rcsum() and CHECKSUM_COMPLETE are friends"
- Revert "Revert "net: pskb_trim_rcsum() and CHECKSUM_COMPLETE are friends""
Patches dropped after rebase:
- net: Add non-mainline source for rtl8192cu wlan
- net: Fix rtl8192cu build errors on other platforms
- brcm: adds support for BCM43341 wifi
- brcmfmac: Mute expected startup 'errors'
- ARM64: Fix build break for RTL8187/RTL8192CU wifi
- ARM64: Enable RTL8187/RTL8192CU wifi in build config
- This is the driver for Sony CXD2880 DVB-T2/T tuner + demodulator
- brcmfmac: add CLM download support
- brcmfmac: request_firmware_direct is quieter
- Sets the BCDC priority to constant 0
- brcmfmac: Disable ARP offloading when promiscuous
- brcmfmac: Avoid possible out-of-bounds read
- brcmfmac: Delete redundant length check
- net: rtl8192cu: Normalize indentation
- net: rtl8192cu: Fix implicit fallthrough warnings
- Revert "Sets the BCDC priority to constant 0"
- media: cxd2880: Bump to match 4.18.y version
- media: cxd2880-spi: Bump to match 4.18.y version
- Revert "mm: alloc_contig: re-allow CMA to compact FS pages"
- Revert "Revert "mm: alloc_contig: re-allow CMA to compact FS pages""
- cxd2880: CXD2880_SPI_DRV should select DVB_CXD2880 with
MEDIA_SUBDRV_AUTOSELECT
- 950-0421-HID-hid-bigbenff-driver-for-BigBen-Interactive-PS3OF.patch
- 950-0453-Add-hid-bigbenff-to-list-of-have_special_driver-for-.patch
Make I2C built-in instead of modular as in upstream defconfig; also the
easiest way to get MFD_ARIZONA enabled, which is required by
kmod-sound-soc-rpi-cirrus.
Add missing compatible strings from
4.9/960-add-rasbperrypi-compatible.patch, using upstream names for
compute modules.
Add extra patch to enable the LEDs on lan78xx.
Compile-tested: bcm2708, bcm2709, bcm2710 (with CONFIG_ALL_KMODS=y)
Runtime-tested: bcm2708, bcm2710
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Diffstat (limited to 'target/linux/brcm2708/patches-4.14/950-0367-staging-bcm2835-camera-Skip-ISP-pass-to-eliminate-pa.patch')
-rw-r--r-- | target/linux/brcm2708/patches-4.14/950-0367-staging-bcm2835-camera-Skip-ISP-pass-to-eliminate-pa.patch | 231 |
1 files changed, 231 insertions, 0 deletions
diff --git a/target/linux/brcm2708/patches-4.14/950-0367-staging-bcm2835-camera-Skip-ISP-pass-to-eliminate-pa.patch b/target/linux/brcm2708/patches-4.14/950-0367-staging-bcm2835-camera-Skip-ISP-pass-to-eliminate-pa.patch new file mode 100644 index 0000000000..610a9bc9f9 --- /dev/null +++ b/target/linux/brcm2708/patches-4.14/950-0367-staging-bcm2835-camera-Skip-ISP-pass-to-eliminate-pa.patch @@ -0,0 +1,231 @@ +From 7efa934859d354d8c331d2c99a6126020ce0310d Mon Sep 17 00:00:00 2001 +From: Dave Stevenson <6by9@users.noreply.github.com> +Date: Thu, 10 May 2018 12:42:07 -0700 +Subject: [PATCH 367/454] staging: bcm2835-camera: Skip ISP pass to eliminate + padding. + +commit dd9bb50522733befceac9cbe0b68f5ad4e5106ff upstream. + +Interleaved RGB and single plane YUV formats can be delivered by the +GPU without the secondary step of removing padding, as the +bytesperline field can be set appropriately. + +Planar YUV needs the GPU to still remove padding, as there is no way +to report that there is padding between the planes (ie on the height). +The multi-planar formats are NOT applicable, as there is no easy way +to make them contiguous in memory (ie one large allocation that gets +broken up). The whole task is passed across to videobuf2 which has no +notion of that requirement. + +v2: Changes by anholt from the downstream driver: Flag two more planar + formats as needing padding removal, and remove broken userspace + workaround. + +Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org> +Signed-off-by: Eric Anholt <eric@anholt.net> +Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> +--- + .../bcm2835-camera/bcm2835-camera.c | 44 ++++++++++++++----- + .../bcm2835-camera/mmal-common.h | 3 ++ + 2 files changed, 35 insertions(+), 12 deletions(-) + +--- a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c ++++ b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c +@@ -88,6 +88,7 @@ static struct mmal_fmt formats[] = { + .depth = 12, + .mmal_component = MMAL_COMPONENT_CAMERA, + .ybbp = 1, ++ .remove_padding = 1, + }, + { + .name = "4:2:2, packed, YUYV", +@@ -97,6 +98,7 @@ static struct mmal_fmt formats[] = { + .depth = 16, + .mmal_component = MMAL_COMPONENT_CAMERA, + .ybbp = 2, ++ .remove_padding = 0, + }, + { + .name = "RGB24 (LE)", +@@ -106,6 +108,7 @@ static struct mmal_fmt formats[] = { + .depth = 24, + .mmal_component = MMAL_COMPONENT_CAMERA, + .ybbp = 3, ++ .remove_padding = 0, + }, + { + .name = "JPEG", +@@ -115,6 +118,7 @@ static struct mmal_fmt formats[] = { + .depth = 8, + .mmal_component = MMAL_COMPONENT_IMAGE_ENCODE, + .ybbp = 0, ++ .remove_padding = 0, + }, + { + .name = "H264", +@@ -124,6 +128,7 @@ static struct mmal_fmt formats[] = { + .depth = 8, + .mmal_component = MMAL_COMPONENT_VIDEO_ENCODE, + .ybbp = 0, ++ .remove_padding = 0, + }, + { + .name = "MJPEG", +@@ -133,6 +138,7 @@ static struct mmal_fmt formats[] = { + .depth = 8, + .mmal_component = MMAL_COMPONENT_VIDEO_ENCODE, + .ybbp = 0, ++ .remove_padding = 0, + }, + { + .name = "4:2:2, packed, YVYU", +@@ -142,6 +148,7 @@ static struct mmal_fmt formats[] = { + .depth = 16, + .mmal_component = MMAL_COMPONENT_CAMERA, + .ybbp = 2, ++ .remove_padding = 0, + }, + { + .name = "4:2:2, packed, VYUY", +@@ -151,6 +158,7 @@ static struct mmal_fmt formats[] = { + .depth = 16, + .mmal_component = MMAL_COMPONENT_CAMERA, + .ybbp = 2, ++ .remove_padding = 0, + }, + { + .name = "4:2:2, packed, UYVY", +@@ -160,6 +168,7 @@ static struct mmal_fmt formats[] = { + .depth = 16, + .mmal_component = MMAL_COMPONENT_CAMERA, + .ybbp = 2, ++ .remove_padding = 0, + }, + { + .name = "4:2:0, planar, NV12", +@@ -169,6 +178,7 @@ static struct mmal_fmt formats[] = { + .depth = 12, + .mmal_component = MMAL_COMPONENT_CAMERA, + .ybbp = 1, ++ .remove_padding = 1, + }, + { + .name = "RGB24 (BE)", +@@ -178,6 +188,7 @@ static struct mmal_fmt formats[] = { + .depth = 24, + .mmal_component = MMAL_COMPONENT_CAMERA, + .ybbp = 3, ++ .remove_padding = 0, + }, + { + .name = "4:2:0, planar, YVU", +@@ -187,6 +198,7 @@ static struct mmal_fmt formats[] = { + .depth = 12, + .mmal_component = MMAL_COMPONENT_CAMERA, + .ybbp = 1, ++ .remove_padding = 1, + }, + { + .name = "4:2:0, planar, NV21", +@@ -196,6 +208,7 @@ static struct mmal_fmt formats[] = { + .depth = 12, + .mmal_component = MMAL_COMPONENT_CAMERA, + .ybbp = 1, ++ .remove_padding = 1, + }, + { + .name = "RGB32 (BE)", +@@ -205,6 +218,7 @@ static struct mmal_fmt formats[] = { + .depth = 32, + .mmal_component = MMAL_COMPONENT_CAMERA, + .ybbp = 4, ++ .remove_padding = 0, + }, + }; + +@@ -962,9 +976,19 @@ static int vidioc_try_fmt_vid_cap(struct + &f->fmt.pix.height, MIN_HEIGHT, dev->max_height, + 1, 0); + f->fmt.pix.bytesperline = f->fmt.pix.width * mfmt->ybbp; ++ if (!mfmt->remove_padding) { ++ int align_mask = ((32 * mfmt->depth) >> 3) - 1; ++ /* GPU isn't removing padding, so stride is aligned to 32 */ ++ f->fmt.pix.bytesperline = ++ (f->fmt.pix.bytesperline + align_mask) & ~align_mask; ++ v4l2_dbg(1, bcm2835_v4l2_debug, &dev->v4l2_dev, ++ "Not removing padding, so bytes/line = %d, " ++ "(align_mask %d)\n", ++ f->fmt.pix.bytesperline, align_mask); ++ } + + /* Image buffer has to be padded to allow for alignment, even though +- * we then remove that padding before delivering the buffer. ++ * we sometimes then remove that padding before delivering the buffer. + */ + f->fmt.pix.sizeimage = ((f->fmt.pix.height + 15) & ~15) * + (((f->fmt.pix.width + 31) & ~31) * mfmt->depth) >> 3; +@@ -997,6 +1021,7 @@ static int mmal_setup_components(struct + struct vchiq_mmal_port *port = NULL, *camera_port = NULL; + struct vchiq_mmal_component *encode_component = NULL; + struct mmal_fmt *mfmt = get_format(f); ++ u32 remove_padding; + + BUG_ON(!mfmt); + +@@ -1065,6 +1090,12 @@ static int mmal_setup_components(struct + camera_port->format.encoding = MMAL_ENCODING_RGB24; + } + ++ remove_padding = mfmt->remove_padding; ++ vchiq_mmal_port_parameter_set(dev->instance, ++ camera_port, ++ MMAL_PARAMETER_NO_IMAGE_PADDING, ++ &remove_padding, sizeof(remove_padding)); ++ + camera_port->format.encoding_variant = 0; + camera_port->es.video.width = f->fmt.pix.width; + camera_port->es.video.height = f->fmt.pix.height; +@@ -1542,7 +1573,6 @@ static int __init mmal_init(struct bm283 + { + int ret; + struct mmal_es_format_local *format; +- u32 bool_true = 1; + u32 supported_encodings[MAX_SUPPORTED_ENCODINGS]; + int param_size; + struct vchiq_mmal_component *camera; +@@ -1626,11 +1656,6 @@ static int __init mmal_init(struct bm283 + format->es->video.frame_rate.num = 0; /* Rely on fps_range */ + format->es->video.frame_rate.den = 1; + +- vchiq_mmal_port_parameter_set(dev->instance, +- &camera->output[MMAL_CAMERA_PORT_VIDEO], +- MMAL_PARAMETER_NO_IMAGE_PADDING, +- &bool_true, sizeof(bool_true)); +- + format = &camera->output[MMAL_CAMERA_PORT_CAPTURE].format; + + format->encoding = MMAL_ENCODING_OPAQUE; +@@ -1652,11 +1677,6 @@ static int __init mmal_init(struct bm283 + dev->capture.enc_profile = V4L2_MPEG_VIDEO_H264_PROFILE_HIGH; + dev->capture.enc_level = V4L2_MPEG_VIDEO_H264_LEVEL_4_0; + +- vchiq_mmal_port_parameter_set(dev->instance, +- &camera->output[MMAL_CAMERA_PORT_CAPTURE], +- MMAL_PARAMETER_NO_IMAGE_PADDING, +- &bool_true, sizeof(bool_true)); +- + /* get the preview component ready */ + ret = vchiq_mmal_component_init( + dev->instance, "ril.video_render", +--- a/drivers/staging/vc04_services/bcm2835-camera/mmal-common.h ++++ b/drivers/staging/vc04_services/bcm2835-camera/mmal-common.h +@@ -31,6 +31,9 @@ struct mmal_fmt { + int depth; + u32 mmal_component; /* MMAL component index to be used to encode */ + u32 ybbp; /* depth of first Y plane for planar formats */ ++ bool remove_padding; /* Does the GPU have to remove padding, ++ * or can we do hide padding via bytesperline. ++ */ + }; + + /* buffer for one video frame */ |