From 71e5fb0dc879ea7527eb2dc51a3fadaca7c60d22 Mon Sep 17 00:00:00 2001 From: heitbaum Date: Wed, 17 Nov 2021 18:42:29 +1100 Subject: [PATCH] linux (Rockchip): patches upstreamed in 5.15.3 --- .../linux-0002-rockchip-from-list.patch | 31 ----------------- .../default/linux-0011-v4l2-from-list.patch | 34 ------------------- .../linux-2000-v4l-wip-rkvdec-vp9.patch | 25 -------------- 3 files changed, 90 deletions(-) diff --git a/projects/Rockchip/patches/linux/default/linux-0002-rockchip-from-list.patch b/projects/Rockchip/patches/linux/default/linux-0002-rockchip-from-list.patch index 811b7eb5ad..3da53d8bc8 100644 --- a/projects/Rockchip/patches/linux/default/linux-0002-rockchip-from-list.patch +++ b/projects/Rockchip/patches/linux/default/linux-0002-rockchip-from-list.patch @@ -289,37 +289,6 @@ index 95fedcf56e4a..38e75b275bb6 100644 host->ios.clock = 0; -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Alex Bee -Date: Wed, 23 Jun 2021 13:59:26 +0200 -Subject: [PATCH] arm64: dts: rockchip: Fix GPU register width for RK3328 - -As can be seen in RK3328's TRM the register range for the GPU is -0xff300000 to 0xff330000. -It would (and does in vendor kernel) overlap with the registers of -the HEVC encoder (node/driver do not exist yet in upstream kernel). -See already existing h265e_mmu node. - -Fixes: 752fbc0c8da7 ("arm64: dts: rockchip: add rk3328 mali gpu node") -Signed-off-by: Alex Bee ---- - arch/arm64/boot/dts/rockchip/rk3328.dtsi | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/arch/arm64/boot/dts/rockchip/rk3328.dtsi b/arch/arm64/boot/dts/rockchip/rk3328.dtsi -index becc1c61b182..5b2020590f53 100644 ---- a/arch/arm64/boot/dts/rockchip/rk3328.dtsi -+++ b/arch/arm64/boot/dts/rockchip/rk3328.dtsi -@@ -599,7 +599,7 @@ saradc: adc@ff280000 { - - gpu: gpu@ff300000 { - compatible = "rockchip,rk3328-mali", "arm,mali-450"; -- reg = <0x0 0xff300000 0x0 0x40000>; -+ reg = <0x0 0xff300000 0x0 0x30000>; - interrupts = , - , - , - From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Alex Bee Date: Wed, 23 Jun 2021 16:59:18 +0200 diff --git a/projects/Rockchip/patches/linux/default/linux-0011-v4l2-from-list.patch b/projects/Rockchip/patches/linux/default/linux-0011-v4l2-from-list.patch index 07dc5ef7bf..85407b59c0 100644 --- a/projects/Rockchip/patches/linux/default/linux-0011-v4l2-from-list.patch +++ b/projects/Rockchip/patches/linux/default/linux-0011-v4l2-from-list.patch @@ -161,40 +161,6 @@ index 9852c3519f56..f3ff3e709169 100644 WRITE_PPS(sps->log2_max_frame_num_minus4, LOG2_MAX_FRAME_NUM_MINUS4); WRITE_PPS(sps->max_num_ref_frames, MAX_NUM_REF_FRAMES); -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Jonas Karlman -Date: Mon, 6 Jul 2020 21:54:35 +0000 -Subject: [PATCH] media: rkvdec: h264: Do not override output buffer sizeimage - -The output buffer sizeimage is currently forced to 2 bytes per pixel, this -can lead to high memory usage for 4K content when multiple output buffers -is created by userspace. - -Do not override output buffer sizeimage and let userspace have control of -output buffer sizeimage by only setting sizeimage if none is provided. - -Signed-off-by: Jonas Karlman ---- - drivers/staging/media/rkvdec/rkvdec-h264.c | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/drivers/staging/media/rkvdec/rkvdec-h264.c b/drivers/staging/media/rkvdec/rkvdec-h264.c -index f3ff3e709169..503ae683d0fd 100644 ---- a/drivers/staging/media/rkvdec/rkvdec-h264.c -+++ b/drivers/staging/media/rkvdec/rkvdec-h264.c -@@ -1015,8 +1015,9 @@ static int rkvdec_h264_adjust_fmt(struct rkvdec_ctx *ctx, - struct v4l2_pix_format_mplane *fmt = &f->fmt.pix_mp; - - fmt->num_planes = 1; -- fmt->plane_fmt[0].sizeimage = fmt->width * fmt->height * -- RKVDEC_H264_MAX_DEPTH_IN_BYTES; -+ if (!fmt->plane_fmt[0].sizeimage) -+ fmt->plane_fmt[0].sizeimage = fmt->width * fmt->height * -+ RKVDEC_H264_MAX_DEPTH_IN_BYTES; - return 0; - } - - From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Jonas Karlman Date: Mon, 6 Jul 2020 21:54:35 +0000 diff --git a/projects/Rockchip/patches/linux/default/linux-2000-v4l-wip-rkvdec-vp9.patch b/projects/Rockchip/patches/linux/default/linux-2000-v4l-wip-rkvdec-vp9.patch index 0c30dd7bad..b0bc10c98b 100644 --- a/projects/Rockchip/patches/linux/default/linux-2000-v4l-wip-rkvdec-vp9.patch +++ b/projects/Rockchip/patches/linux/default/linux-2000-v4l-wip-rkvdec-vp9.patch @@ -3650,31 +3650,6 @@ index fbaf0303f7c2..2c0c6dcbd066 100644 } }; -@@ -373,7 +421,7 @@ static int rkvdec_s_output_fmt(struct file *file, void *priv, - struct v4l2_m2m_ctx *m2m_ctx = ctx->fh.m2m_ctx; - const struct rkvdec_coded_fmt_desc *desc; - struct v4l2_format *cap_fmt; -- struct vb2_queue *peer_vq; -+ struct vb2_queue *peer_vq, *vq; - int ret; - - /* -@@ -385,6 +433,15 @@ static int rkvdec_s_output_fmt(struct file *file, void *priv, - if (vb2_is_busy(peer_vq)) - return -EBUSY; - -+ /* -+ * Some codecs like VP9 can contain dynamic resolution changes which -+ * are currently not supported by the V4L2 API or driver, so return -+ * an error if userspace tries to reconfigure the output format. -+ */ -+ vq = v4l2_m2m_get_vq(m2m_ctx, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE); -+ if (vb2_is_busy(vq)) -+ return -EINVAL; -+ - ret = rkvdec_s_fmt(file, priv, f, rkvdec_try_output_fmt); - if (ret) - return ret; diff --git a/drivers/staging/media/rkvdec/rkvdec.h b/drivers/staging/media/rkvdec/rkvdec.h index fa24bcb6ff42..18dd721172d8 100644 --- a/drivers/staging/media/rkvdec/rkvdec.h