From a7a9b2a0f5a1a58b16ceff97a7bdedb6e9b8bf2c Mon Sep 17 00:00:00 2001 From: Jernej Skrabec Date: Sun, 8 Nov 2020 23:26:38 +0100 Subject: [PATCH] Allwinner: Remove merged patches in Linux 5.9.6 --- .../linux/0001-backport-from-5.10.patch | 176 ------------------ ...pers-Fix-dma_buf_mmap-forwarding-bug.patch | 82 -------- 2 files changed, 258 deletions(-) delete mode 100644 projects/Allwinner/patches/linux/0109-drm-shme-helpers-Fix-dma_buf_mmap-forwarding-bug.patch diff --git a/projects/Allwinner/patches/linux/0001-backport-from-5.10.patch b/projects/Allwinner/patches/linux/0001-backport-from-5.10.patch index fcde3f7a80..42f88e59fb 100644 --- a/projects/Allwinner/patches/linux/0001-backport-from-5.10.patch +++ b/projects/Allwinner/patches/linux/0001-backport-from-5.10.patch @@ -1,52 +1,3 @@ -From 3658a2b7f3e16c7053eb8d70657b94bb62c5a0f4 Mon Sep 17 00:00:00 2001 -From: Jernej Skrabec -Date: Mon, 24 Aug 2020 21:36:49 +0200 -Subject: [PATCH] ARM: dts: sun8i: r40: bananapi-m2-ultra: Fix dcdc1 regulator - -DCDC1 regulator powers many different subsystems. While some of them can -work at 3.0 V, some of them can not. For example, VCC-HDMI can only work -between 3.24 V and 3.36 V. According to OS images provided by the board -manufacturer this regulator should be set to 3.3 V. - -Set DCDC1 and DCDC1SW to 3.3 V in order to fix this. - -Fixes: da7ac948fa93 ("ARM: dts: sun8i: Add board dts file for Banana Pi M2 Ultra") -Signed-off-by: Jernej Skrabec -Signed-off-by: Maxime Ripard -Link: https://lore.kernel.org/r/20200824193649.978197-1-jernej.skrabec@siol.net ---- - arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -diff --git a/arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts b/arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts -index 42d62d1ba1dc..ea15073f0c79 100644 ---- a/arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts -+++ b/arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts -@@ -223,16 +223,16 @@ ®_aldo3 { - }; - - ®_dc1sw { -- regulator-min-microvolt = <3000000>; -- regulator-max-microvolt = <3000000>; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; - regulator-name = "vcc-gmac-phy"; - }; - - ®_dcdc1 { - regulator-always-on; -- regulator-min-microvolt = <3000000>; -- regulator-max-microvolt = <3000000>; -- regulator-name = "vcc-3v0"; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ regulator-name = "vcc-3v3"; - }; - - ®_dcdc2 { --- -2.28.0 - From 12bb1887be9dc8ca88fccd4da4d8d9eaae561239 Mon Sep 17 00:00:00 2001 From: Jernej Skrabec Date: Mon, 24 Aug 2020 17:04:34 +0200 @@ -97,53 +48,6 @@ index b782041e0e04..b82031b19893 100644 -- 2.28.0 -From 2933bf3528007f834fb7f5eab033f9c5b0683f91 Mon Sep 17 00:00:00 2001 -From: Qiang Yu -Date: Sat, 22 Aug 2020 14:27:55 +0800 -Subject: [PATCH] arm64: dts: allwinner: h5: remove Mali GPU PMU module - -H5's Mali GPU PMU is not present or working corretly although -H5 datasheet record its interrupt vector. - -Adding this module will miss lead lima driver try to shutdown -it and get waiting timeout. This problem is not exposed before -lima runtime PM support is added. - -Fixes: bb39ed07e55b ("arm64: dts: allwinner: h5: Add device node for Mali-450 GPU") -Signed-off-by: Qiang Yu -Signed-off-by: Maxime Ripard -Link: https://lore.kernel.org/r/20200822062755.534761-1-yuq825@gmail.com ---- - arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi | 6 ++---- - 1 file changed, 2 insertions(+), 4 deletions(-) - -diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi -index 6735e316a39c..6c6053a18413 100644 ---- a/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi -+++ b/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi -@@ -139,8 +139,7 @@ mali: gpu@1e80000 { - , - , - , -- , -- ; -+ ; - interrupt-names = "gp", - "gpmmu", - "pp", -@@ -151,8 +150,7 @@ mali: gpu@1e80000 { - "pp2", - "ppmmu2", - "pp3", -- "ppmmu3", -- "pmu"; -+ "ppmmu3"; - clocks = <&ccu CLK_BUS_GPU>, <&ccu CLK_GPU>; - clock-names = "bus", "core"; - resets = <&ccu RST_BUS_GPU>; --- -2.28.0 - From a3ba99a24b36bc4eee5413a820e2c4f3d81593fa Mon Sep 17 00:00:00 2001 From: Jernej Skrabec Date: Tue, 25 Aug 2020 15:10:49 +0200 @@ -664,86 +568,6 @@ index 98753f00df7e..5a91b548ecc0 100644 * v4l2_m2m_reqbufs() - multi-queue-aware REQBUFS multiplexer * -From 3aa91cc1cdd3ca25c6c224cb5ccd601f44943d5f Mon Sep 17 00:00:00 2001 -From: Ezequiel Garcia -Date: Mon, 27 Jul 2020 19:05:37 +0200 -Subject: [PATCH] media: hantro: h264: Get the correct fallback reference - buffer - -If the bitstream and the application are incorrectly configuring -the reference pictures, the hardware will need to fallback -to using some other reference picture. - -When the post-processor is enabled, the fallback buffer -should be a shadow buffer (postproc.dec_q), and not a -CAPTURE queue buffer, since the latter is post-processed -and not really the output of the decoder core. - -Fixes: 8c2d66b036c77 ("media: hantro: Support color conversion via post-processing") -Signed-off-by: Ezequiel Garcia -Reviewed-by: Philipp Zabel -Signed-off-by: Hans Verkuil -Signed-off-by: Mauro Carvalho Chehab -(cherry picked from commit 6d9e8cd0553bb03e8ab9d4d2d7d17f3fb639bd86) ---- - drivers/staging/media/hantro/hantro_h264.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/drivers/staging/media/hantro/hantro_h264.c b/drivers/staging/media/hantro/hantro_h264.c -index 194d05848077..6dcd47bd9ed3 100644 ---- a/drivers/staging/media/hantro/hantro_h264.c -+++ b/drivers/staging/media/hantro/hantro_h264.c -@@ -325,7 +325,7 @@ dma_addr_t hantro_h264_get_ref_buf(struct hantro_ctx *ctx, - */ - dst_buf = hantro_get_dst_buf(ctx); - buf = &dst_buf->vb2_buf; -- dma_addr = vb2_dma_contig_plane_dma_addr(buf, 0); -+ dma_addr = hantro_get_dec_buf_addr(ctx, buf); - } - - return dma_addr; - -From 53c9bdb74ce56398ee6b17fea317a784757c642b Mon Sep 17 00:00:00 2001 -From: Ezequiel Garcia -Date: Mon, 27 Jul 2020 19:05:38 +0200 -Subject: [PATCH] media: hantro: postproc: Fix motion vector space allocation - -When the post-processor is enabled, the driver allocates -"shadow buffers" which are used for the decoder core, -and exposes the post-processed buffers to userspace. - -For this reason, extra motion vector space has to -be allocated on the shadow buffers, which the driver -wasn't doing. Fix it. - -This fix should address artifacts on high profile bitstreams. - -Fixes: 8c2d66b036c77 ("media: hantro: Support color conversion via post-processing") -Signed-off-by: Ezequiel Garcia -Reviewed-by: Philipp Zabel -Signed-off-by: Hans Verkuil -Signed-off-by: Mauro Carvalho Chehab -(cherry picked from commit 669ccf19ed2059b9d517664a2dbbf6bde87e1414) ---- - drivers/staging/media/hantro/hantro_postproc.c | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/drivers/staging/media/hantro/hantro_postproc.c b/drivers/staging/media/hantro/hantro_postproc.c -index 44062ffceaea..6d2a8f2a8f0b 100644 ---- a/drivers/staging/media/hantro/hantro_postproc.c -+++ b/drivers/staging/media/hantro/hantro_postproc.c -@@ -118,7 +118,9 @@ int hantro_postproc_alloc(struct hantro_ctx *ctx) - unsigned int num_buffers = cap_queue->num_buffers; - unsigned int i, buf_size; - -- buf_size = ctx->dst_fmt.plane_fmt[0].sizeimage; -+ buf_size = ctx->dst_fmt.plane_fmt[0].sizeimage + -+ hantro_h264_mv_size(ctx->dst_fmt.width, -+ ctx->dst_fmt.height); - - for (i = 0; i < num_buffers; ++i) { - struct hantro_aux_buf *priv = &ctx->postproc.dec_q[i]; - From ea3a9782bc2717375bf236f11738c02d5148b8a8 Mon Sep 17 00:00:00 2001 From: Jernej Skrabec Date: Tue, 25 Aug 2020 05:52:27 +0200 diff --git a/projects/Allwinner/patches/linux/0109-drm-shme-helpers-Fix-dma_buf_mmap-forwarding-bug.patch b/projects/Allwinner/patches/linux/0109-drm-shme-helpers-Fix-dma_buf_mmap-forwarding-bug.patch deleted file mode 100644 index cb30feeae4..0000000000 --- a/projects/Allwinner/patches/linux/0109-drm-shme-helpers-Fix-dma_buf_mmap-forwarding-bug.patch +++ /dev/null @@ -1,82 +0,0 @@ -commit 7dd307db3ce5c2de23eada9b8ba2272a470b27bd -Author: Daniel Vetter -Date: Tue Oct 27 22:17:48 2020 +0100 - - drm/shme-helpers: Fix dma_buf_mmap forwarding bug - - When we forward an mmap to the dma_buf exporter, they get to own - everything. Unfortunately drm_gem_mmap_obj() overwrote - vma->vm_private_data after the driver callback, wreaking the - exporter complete. This was noticed because vb2_common_vm_close blew - up on mali gpu with panfrost. - - Unfortunately drm_gem_mmap_obj also acquires a surplus reference that - we need to drop in shmem helpers, which is a bit of a mislayer - situation. Maybe the entire dma_buf_mmap forwarding should be pulled - into core gem code. - - Note that the only two other drivers which forward mmap in their own - code (etnaviv and exynos) get this somewhat right by overwriting the - gem mmap code. But they seem to still have the leak. This might be a - good excuse to move these drivers over to shmem helpers completely. - - Cc: Christian König - Cc: Sumit Semwal - Cc: Lucas Stach - Cc: Russell King - Cc: Christian Gmeiner - Cc: Inki Dae - Cc: Joonyoung Shim - Cc: Seung-Woo Kim - Cc: Kyungmin Park - Fixes: 26d3ac3cb04d ("drm/shmem-helpers: Redirect mmap for imported dma-buf") - Cc: Boris Brezillon - Cc: Thomas Zimmermann - Cc: Gerd Hoffmann - Cc: Rob Herring - Cc: dri-devel@lists.freedesktop.org - Cc: linux-media@vger.kernel.org - Cc: linaro-mm-sig@lists.linaro.org - Cc: # v5.9+ - Signed-off-by: Daniel Vetter - -diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c -index 1da67d34e55d..d586068f5509 100644 ---- a/drivers/gpu/drm/drm_gem.c -+++ b/drivers/gpu/drm/drm_gem.c -@@ -1076,6 +1076,8 @@ int drm_gem_mmap_obj(struct drm_gem_object *obj, unsigned long obj_size, - */ - drm_gem_object_get(obj); - -+ vma->vm_private_data = obj; -+ - if (obj->funcs && obj->funcs->mmap) { - ret = obj->funcs->mmap(obj, vma); - if (ret) { -@@ -1096,8 +1098,6 @@ int drm_gem_mmap_obj(struct drm_gem_object *obj, unsigned long obj_size, - vma->vm_page_prot = pgprot_decrypted(vma->vm_page_prot); - } - -- vma->vm_private_data = obj; -- - return 0; - } - EXPORT_SYMBOL(drm_gem_mmap_obj); -diff --git a/drivers/gpu/drm/drm_gem_shmem_helper.c b/drivers/gpu/drm/drm_gem_shmem_helper.c -index fb11df7aced5..8233bda4692f 100644 ---- a/drivers/gpu/drm/drm_gem_shmem_helper.c -+++ b/drivers/gpu/drm/drm_gem_shmem_helper.c -@@ -598,8 +598,13 @@ int drm_gem_shmem_mmap(struct drm_gem_object *obj, struct vm_area_struct *vma) - /* Remove the fake offset */ - vma->vm_pgoff -= drm_vma_node_start(&obj->vma_node); - -- if (obj->import_attach) -+ if (obj->import_attach) { -+ /* Drop the reference drm_gem_mmap_obj() acquired.*/ -+ drm_gem_object_put(obj); -+ vma->vm_private_data = NULL; -+ - return dma_buf_mmap(obj->dma_buf, vma, 0); -+ } - - shmem = to_drm_gem_shmem_obj(obj);