]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
media: verisilicon: Fix AV1 decoder clock frequency
authorNicolas Dufresne <nicolas.dufresne@collabora.com>
Mon, 17 Feb 2025 21:46:54 +0000 (16:46 -0500)
committerHans Verkuil <hverkuil@xs4all.nl>
Fri, 20 Jun 2025 11:20:17 +0000 (13:20 +0200)
The desired clock frequency was correctly set to 400MHz in the device tree
but was lowered by the driver to 300MHz breaking 4K 60Hz content playback.
Fix the issue by removing the driver call to clk_set_rate(), which reduce
the amount of board specific code.

Fixes: 003afda97c65 ("media: verisilicon: Enable AV1 decoder on rk3588")
Cc: stable@vger.kernel.org
Reviewed-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
drivers/media/platform/verisilicon/rockchip_vpu_hw.c

index acd29fa41d2d10af7803fe145c39ffb5f7267157..02673be9878e1e6ca007404a4b7c20ae065d20ce 100644 (file)
@@ -17,7 +17,6 @@
 
 #define RK3066_ACLK_MAX_FREQ (300 * 1000 * 1000)
 #define RK3288_ACLK_MAX_FREQ (400 * 1000 * 1000)
-#define RK3588_ACLK_MAX_FREQ (300 * 1000 * 1000)
 
 #define ROCKCHIP_VPU981_MIN_SIZE 64
 
@@ -454,13 +453,6 @@ static int rk3066_vpu_hw_init(struct hantro_dev *vpu)
        return 0;
 }
 
-static int rk3588_vpu981_hw_init(struct hantro_dev *vpu)
-{
-       /* Bump ACLKs to max. possible freq. to improve performance. */
-       clk_set_rate(vpu->clocks[0].clk, RK3588_ACLK_MAX_FREQ);
-       return 0;
-}
-
 static int rockchip_vpu_hw_init(struct hantro_dev *vpu)
 {
        /* Bump ACLK to max. possible freq. to improve performance. */
@@ -821,7 +813,6 @@ const struct hantro_variant rk3588_vpu981_variant = {
        .codec_ops = rk3588_vpu981_codec_ops,
        .irqs = rk3588_vpu981_irqs,
        .num_irqs = ARRAY_SIZE(rk3588_vpu981_irqs),
-       .init = rk3588_vpu981_hw_init,
        .clk_names = rk3588_vpu981_vpu_clk_names,
        .num_clocks = ARRAY_SIZE(rk3588_vpu981_vpu_clk_names)
 };