diff options
author | Álvaro Fernández Rojas <noltari@gmail.com> | 2019-12-23 13:42:55 +0100 |
---|---|---|
committer | Álvaro Fernández Rojas <noltari@gmail.com> | 2019-12-24 18:49:44 +0100 |
commit | 67dcc43f3a22dc3a7ac07a7065971b426feeb043 (patch) | |
tree | 0b647356dce45d2c79fd46cf201daa5089cc0934 /target/linux/brcm2708/patches-4.19/950-0281-staging-bcm2835-camera-Fix-stride-on-RGB3-BGR3-forma.patch | |
parent | 47a93a810f78adce5a130d287f82b28e9b54313c (diff) | |
download | upstream-67dcc43f3a22dc3a7ac07a7065971b426feeb043.tar.gz upstream-67dcc43f3a22dc3a7ac07a7065971b426feeb043.tar.bz2 upstream-67dcc43f3a22dc3a7ac07a7065971b426feeb043.zip |
brcm2708: organize kernel patches
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Diffstat (limited to 'target/linux/brcm2708/patches-4.19/950-0281-staging-bcm2835-camera-Fix-stride-on-RGB3-BGR3-forma.patch')
-rw-r--r-- | target/linux/brcm2708/patches-4.19/950-0281-staging-bcm2835-camera-Fix-stride-on-RGB3-BGR3-forma.patch | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/target/linux/brcm2708/patches-4.19/950-0281-staging-bcm2835-camera-Fix-stride-on-RGB3-BGR3-forma.patch b/target/linux/brcm2708/patches-4.19/950-0281-staging-bcm2835-camera-Fix-stride-on-RGB3-BGR3-forma.patch deleted file mode 100644 index c4ef974a8c..0000000000 --- a/target/linux/brcm2708/patches-4.19/950-0281-staging-bcm2835-camera-Fix-stride-on-RGB3-BGR3-forma.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 69e42b6209062b9cd3fc9aea8fb53ed703509e51 Mon Sep 17 00:00:00 2001 -From: Dave Stevenson <dave.stevenson@raspberrypi.org> -Date: Fri, 30 Nov 2018 16:00:54 +0000 -Subject: [PATCH 281/806] staging: bcm2835-camera: Fix stride on RGB3/BGR3 - formats - -RGB3/BGR3 end up being 3 bytes per pixel, which meant that -the alignment code ended up trying to align using bitmasking -with a mask of 96. -That doesn't work, so switch to an arithmetic alignment for -those formats. - -Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org> ---- - .../bcm2835-camera/bcm2835-camera.c | 26 ++++++++++++++----- - 1 file changed, 20 insertions(+), 6 deletions(-) - ---- a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c -+++ b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c -@@ -1008,13 +1008,27 @@ static int vidioc_try_fmt_vid_cap(struct - 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; -+ if (mfmt->depth == 24) { -+ /* -+ * 24bpp is a pain as we can't use simple masking. -+ * Min stride is width aligned to 16, times 24bpp. -+ */ -+ f->fmt.pix.bytesperline = -+ ((f->fmt.pix.width + 15) & ~15) * 3; -+ } else { -+ /* -+ * GPU isn't removing padding, so stride is aligned to -+ * 32 -+ */ -+ int align_mask = ((32 * mfmt->depth) >> 3) - 1; -+ -+ 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); -+ "Not removing padding, so bytes/line = %d\n", -+ f->fmt.pix.bytesperline); - } - - /* Image buffer has to be padded to allow for alignment, even though |