From f07e572f6447465d8938679533d604e402b0f066 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Thu, 18 Feb 2021 18:04:33 +0100 Subject: bcm27xx: import latest patches from the RPi foundation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit bcm2708: boot tested on RPi B+ v1.2 bcm2709: boot tested on RPi 3B v1.2 and RPi 4B v1.1 4G bcm2710: boot tested on RPi 3B v1.2 bcm2711: boot tested on RPi 4B v1.1 4G Signed-off-by: Álvaro Fernández Rojas --- ...2835-codec-Remove-height-padding-for-ISP-.patch | 61 ++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 target/linux/bcm27xx/patches-5.4/950-0194-staging-bcm2835-codec-Remove-height-padding-for-ISP-.patch (limited to 'target/linux/bcm27xx/patches-5.4/950-0194-staging-bcm2835-codec-Remove-height-padding-for-ISP-.patch') diff --git a/target/linux/bcm27xx/patches-5.4/950-0194-staging-bcm2835-codec-Remove-height-padding-for-ISP-.patch b/target/linux/bcm27xx/patches-5.4/950-0194-staging-bcm2835-codec-Remove-height-padding-for-ISP-.patch new file mode 100644 index 0000000000..7a94ffa663 --- /dev/null +++ b/target/linux/bcm27xx/patches-5.4/950-0194-staging-bcm2835-codec-Remove-height-padding-for-ISP-.patch @@ -0,0 +1,61 @@ +From 03b7c70e9164f7b7f0af0cf0b79e689ef97e796b Mon Sep 17 00:00:00 2001 +From: Dave Stevenson +Date: Thu, 2 May 2019 14:32:21 +0100 +Subject: [PATCH] staging: bcm2835-codec: Remove height padding for ISP + role + +The ISP has no need for heights to be a multiple of macroblock +sizes, therefore doesn't require the align on the height. +Remove it for the ISP role. (It is required for the codecs). + +Signed-off-by: Dave Stevenson +--- + .../bcm2835-codec/bcm2835-v4l2-codec.c | 13 ++++++++----- + 1 file changed, 8 insertions(+), 5 deletions(-) + +--- a/drivers/staging/vc04_services/bcm2835-codec/bcm2835-v4l2-codec.c ++++ b/drivers/staging/vc04_services/bcm2835-codec/bcm2835-v4l2-codec.c +@@ -1015,7 +1015,8 @@ static int vidioc_g_fmt_vid_cap(struct f + return vidioc_g_fmt(file2ctx(file), f); + } + +-static int vidioc_try_fmt(struct v4l2_format *f, struct bcm2835_codec_fmt *fmt) ++static int vidioc_try_fmt(struct bcm2835_codec_ctx *ctx, struct v4l2_format *f, ++ struct bcm2835_codec_fmt *fmt) + { + /* + * The V4L2 specification requires the driver to correct the format +@@ -1034,11 +1035,13 @@ static int vidioc_try_fmt(struct v4l2_fo + f->fmt.pix.height = MIN_H; + + /* +- * Buffer must have a vertical alignment of 16 lines. ++ * For codecs the buffer must have a vertical alignment of 16 ++ * lines. + * The selection will reflect any cropping rectangle when only + * some of the pixels are active. + */ +- f->fmt.pix.height = ALIGN(f->fmt.pix.height, 16); ++ if (ctx->dev->role != ISP) ++ f->fmt.pix.height = ALIGN(f->fmt.pix.height, 16); + } + f->fmt.pix.bytesperline = get_bytesperline(f->fmt.pix.width, + fmt); +@@ -1065,7 +1068,7 @@ static int vidioc_try_fmt_vid_cap(struct + fmt = find_format(f, ctx->dev, true); + } + +- return vidioc_try_fmt(f, fmt); ++ return vidioc_try_fmt(ctx, f, fmt); + } + + static int vidioc_try_fmt_vid_out(struct file *file, void *priv, +@@ -1084,7 +1087,7 @@ static int vidioc_try_fmt_vid_out(struct + if (!f->fmt.pix.colorspace) + f->fmt.pix.colorspace = ctx->colorspace; + +- return vidioc_try_fmt(f, fmt); ++ return vidioc_try_fmt(ctx, f, fmt); + } + + static int vidioc_s_fmt(struct bcm2835_codec_ctx *ctx, struct v4l2_format *f, -- cgit v1.2.3