FAILED: patch "[PATCH] media: rockchip: rga: fix rotation on rev0 hardware" failed to apply to 5.15-stable tree
Subsystems (4)
Sasha Levin
maintainerThe patch below does not apply to the 5.15-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.15.y
git checkout FETCH_HEAD
git cherry-pick -x a67578c0179850e80cf08b1e0b8b1eb857f0fc46
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '[email protected]' --subject-prefix 'PATCH 5.15.y' 'HEAD^..'
Thanks,
Sasha
------------------ original commit in Linus's tree ------------------
From a67578c0179850e80cf08b1e0b8b1eb857f0fc46 Mon Sep 17 00:00:00 2001
From: John Keeping <[email protected]>
Date: Tue, 29 Sep 2026 10:41:42 +0100
Subject: [PATCH] media: rockchip: rga: fix rotation on rev0 hardware
On RK3288 where the RGA reports version zero [1], rotating a buffer gives corrupt output where one edge will be truncated. This is a result of some adjustment done specifically for hardware revision zero. But it seems this is not necessary and there is no evidence for why this adjustment should be applied on these hardware revisions.
Comparing the TRMs between RK3288 with revision zero and RK3588 with revision 3.2 there is evidence of new features supported by later hardware, but nothing indicating any difference in behaviour for rotation which is supported by all hardware revisions.
The logic here looks wrong anyway, since it's bizarre that minor revision zero would need the adjustment for _all_ major revisions. This was added with the initial version of the driver in commit f7e7b48e6d796 ("[media] rockchip/rga: v4l2 m2m support") so there is no detail in the Git history to indicate why this special-case might be needed.
[1] Comparing with the vendor code, it seems this is actually 1.3 with the hardware reporting zero more by coincidence than design since the version register is not defined for RK3288.
--- drivers/media/platform/rockchip/rga/rga-hw.c | 8 -------- 1 file changed, 8 deletions(-)
drivers/media/platform/rockchip/rga/rga-hw.c +0 -8
@@ -158,7 +158,6 @@ static void rga_cmd_set_dst_addr(struct rga_ctx *ctx, dma_addr_t dma_addr)static void rga_cmd_set_trans_info (struct rga_ctx *ctx) { -struct rockchip_rga *rga = ctx->rga;u32 *dest = ctx->cmdbuf_virt;unsigned int scale_dst_w, scale_dst_h;unsigned int src_h, src_w, dst_h, dst_w;
@@ -251,13 +250,6 @@ static void rga_cmd_set_trans_info(struct rga_ctx *ctx)*/ if (src_info.data.rot_mode ==RGA_SRC_ROT_MODE_90_DEGREE || src_info.data.rot_mode ==RGA_SRC_ROT_MODE_270_DEGREE ) { -if (rga->version.major ==0 || rga->version.minor ==0 ) { -if (dst_w == src_h) - src_h -=8 ; -if (abs (src_w - dst_h) <16 ) - src_w -=16 ; - } - scale_dst_h = dst_w; scale_dst_w = dst_h; }else {
Signature · 1 line
2.53.0