lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250601232937.3510379-30-sashal@kernel.org>
Date: Sun,  1 Jun 2025 19:28:22 -0400
From: Sasha Levin <sashal@...nel.org>
To: patches@...ts.linux.dev,
	stable@...r.kernel.org
Cc: Nicolas Dufresne <nicolas.dufresne@...labora.com>,
	Benjamin Gaignard <benjamin.gaignard@...labora.com>,
	Hans Verkuil <hverkuil@...all.nl>,
	Sasha Levin <sashal@...nel.org>,
	p.zabel@...gutronix.de,
	mchehab@...nel.org,
	heiko@...ech.de,
	linux-media@...r.kernel.org,
	linux-rockchip@...ts.infradead.org,
	linux-arm-kernel@...ts.infradead.org,
	linux-kernel@...r.kernel.org
Subject: [PATCH AUTOSEL 6.14 030/102] media: verisilicon: Enable wide 4K in AV1 decoder

From: Nicolas Dufresne <nicolas.dufresne@...labora.com>

[ Upstream commit 311e40e877bd980bc665e6c8d3b15d96f0ec2aa8 ]

Tested on RK3588, this decoder is capable of handling WUHD, so bump the
maximum width and height accordingly.

Reviewed-by: Benjamin Gaignard <benjamin.gaignard@...labora.com>
Signed-off-by: Nicolas Dufresne <nicolas.dufresne@...labora.com>
Signed-off-by: Hans Verkuil <hverkuil@...all.nl>
Signed-off-by: Sasha Levin <sashal@...nel.org>
---

**YES** This commit should be backported to stable kernel trees. ##
Analysis This is a **bug fix** that corrects an artificial limitation in
the AV1 decoder driver, not a new feature addition. Here's my detailed
analysis: ### Nature of the Change The commit changes format capability
declarations from `FMT_UHD_WIDTH/HEIGHT` (3840x2160) to
`FMT_4K_WIDTH/HEIGHT` (4096x2304) for the RK3588 AV1 decoder. Looking at
the constants in the codebase: - `FMT_UHD_WIDTH` = 3840,
`FMT_UHD_HEIGHT` = 2160 (standard UHD) - `FMT_4K_WIDTH` = 4096,
`FMT_4K_HEIGHT` = 2304 (Cinema 4K) ### Why This is a Bug Fix 1.
**Hardware Capability vs Driver Limitation**: The commit message states
this was "Tested on RK3588" and confirms the decoder is "capable of
handling WUHD", indicating the hardware already supports these
resolutions but the driver was artificially limiting them. 2. **User-
Visible Problem**: Users with Cinema 4K content (4096x2160 or wider)
would experience decode failures despite having capable hardware. 3.
**No New Hardware Features**: This doesn't enable new hardware
functionality - it simply removes an incorrect software limitation. ###
Risk Assessment - Very Low 1. **Minimal Code Changes**: Only changes
constant values in format capability arrays - no algorithmic logic
changes. 2. **Backward Compatibility**: Existing UHD content (3840x2160)
continues to work exactly as before. 3. **Self-Contained**: Changes are
isolated to the verisilicon media driver, affecting only format
capability declarations. 4. **No API Changes**: No changes to userspace
interfaces or kernel APIs. ### Comparison to Similar Backported Commit
This change is very similar to commit #5 in the reference examples
(marked "Backport Status: YES"): - Both increase maximum supported
resolution after hardware testing - Both are minimal, low-risk changes
to capability declarations - Both fix user-visible decode failures for
content the hardware can actually handle ### Stable Tree Benefits 1.
**Fixes decode failures** for users with Cinema 4K AV1 content 2.
**Improves hardware utilization** by removing artificial limitations 3.
**Very low regression risk** due to minimal, well-contained changes 4.
**Meets all stable tree criteria**: important fix, minimal risk, no new
features This commit clearly qualifies for stable backporting as it
fixes a user-visible bug with minimal risk and no architectural changes.

 .../platform/verisilicon/rockchip_vpu_hw.c    | 20 +++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/media/platform/verisilicon/rockchip_vpu_hw.c b/drivers/media/platform/verisilicon/rockchip_vpu_hw.c
index 964122e7c3559..b64f0658f7f1e 100644
--- a/drivers/media/platform/verisilicon/rockchip_vpu_hw.c
+++ b/drivers/media/platform/verisilicon/rockchip_vpu_hw.c
@@ -85,10 +85,10 @@ static const struct hantro_fmt rockchip_vpu981_postproc_fmts[] = {
 		.postprocessed = true,
 		.frmsize = {
 			.min_width = ROCKCHIP_VPU981_MIN_SIZE,
-			.max_width = FMT_UHD_WIDTH,
+			.max_width = FMT_4K_WIDTH,
 			.step_width = MB_DIM,
 			.min_height = ROCKCHIP_VPU981_MIN_SIZE,
-			.max_height = FMT_UHD_HEIGHT,
+			.max_height = FMT_4K_HEIGHT,
 			.step_height = MB_DIM,
 		},
 	},
@@ -99,10 +99,10 @@ static const struct hantro_fmt rockchip_vpu981_postproc_fmts[] = {
 		.postprocessed = true,
 		.frmsize = {
 			.min_width = ROCKCHIP_VPU981_MIN_SIZE,
-			.max_width = FMT_UHD_WIDTH,
+			.max_width = FMT_4K_WIDTH,
 			.step_width = MB_DIM,
 			.min_height = ROCKCHIP_VPU981_MIN_SIZE,
-			.max_height = FMT_UHD_HEIGHT,
+			.max_height = FMT_4K_HEIGHT,
 			.step_height = MB_DIM,
 		},
 	},
@@ -318,10 +318,10 @@ static const struct hantro_fmt rockchip_vpu981_dec_fmts[] = {
 		.match_depth = true,
 		.frmsize = {
 			.min_width = ROCKCHIP_VPU981_MIN_SIZE,
-			.max_width = FMT_UHD_WIDTH,
+			.max_width = FMT_4K_WIDTH,
 			.step_width = MB_DIM,
 			.min_height = ROCKCHIP_VPU981_MIN_SIZE,
-			.max_height = FMT_UHD_HEIGHT,
+			.max_height = FMT_4K_HEIGHT,
 			.step_height = MB_DIM,
 		},
 	},
@@ -331,10 +331,10 @@ static const struct hantro_fmt rockchip_vpu981_dec_fmts[] = {
 		.match_depth = true,
 		.frmsize = {
 			.min_width = ROCKCHIP_VPU981_MIN_SIZE,
-			.max_width = FMT_UHD_WIDTH,
+			.max_width = FMT_4K_WIDTH,
 			.step_width = MB_DIM,
 			.min_height = ROCKCHIP_VPU981_MIN_SIZE,
-			.max_height = FMT_UHD_HEIGHT,
+			.max_height = FMT_4K_HEIGHT,
 			.step_height = MB_DIM,
 		},
 	},
@@ -344,10 +344,10 @@ static const struct hantro_fmt rockchip_vpu981_dec_fmts[] = {
 		.max_depth = 2,
 		.frmsize = {
 			.min_width = ROCKCHIP_VPU981_MIN_SIZE,
-			.max_width = FMT_UHD_WIDTH,
+			.max_width = FMT_4K_WIDTH,
 			.step_width = MB_DIM,
 			.min_height = ROCKCHIP_VPU981_MIN_SIZE,
-			.max_height = FMT_UHD_HEIGHT,
+			.max_height = FMT_4K_HEIGHT,
 			.step_height = MB_DIM,
 		},
 	},
-- 
2.39.5


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ