[PATCH v4 03/11] PM / devfreq: rockchip-dfi: drop incorrect shift of LP5 bank mode

Sebastian Reichel sebastian.reichel at collabora.com
Thu Nov 19 05:01:53 PST 2026


When the driver got converted to the FIELD_PREP_WM16 macro, it was
missed that the lp5_bank_mode variable is already shifted in
rk3588_dfi_init() resulting in FIELD_PREP_WM16() effectively doing a
double shift and thus writing 0.

As most Rockchip boards use LPDDR4 (incl. all of mine) and DFI is more
or less exclusively used for debugging with upstream kernel so far, this
hasn't been noticed until now.

Reported-by: Sashiko <sashiko-bot at kernel.org>
Closes: https://lore.kernel.org/all/sashiko-outbox-219117@kernel.org/
Cc: stable at vger.kernel.org
Fixes: 7e85ac9da1ac ("PM / devfreq: rockchip-dfi: switch to FIELD_PREP_WM16 macro")
Signed-off-by: Sebastian Reichel <sebastian.reichel at collabora.com>
---
 drivers/devfreq/event/rockchip-dfi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/devfreq/event/rockchip-dfi.c b/drivers/devfreq/event/rockchip-dfi.c
index e0b942028e50..22f82cb6e33f 100644
--- a/drivers/devfreq/event/rockchip-dfi.c
+++ b/drivers/devfreq/event/rockchip-dfi.c
@@ -800,7 +800,7 @@ static int rk3588_dfi_init(struct rockchip_dfi *dfi)
 
 	if (dfi->ddr_type == ROCKCHIP_DDRTYPE_LPDDR5) {
 		regmap_read(regmap_pmu, RK3588_PMUGRF_OS_REG6, &reg6);
-		dfi->lp5_bank_mode = FIELD_GET(RK3588_PMUGRF_OS_REG6_LP5_BANK_MODE, reg6) << 7;
+		dfi->lp5_bank_mode = FIELD_GET(RK3588_PMUGRF_OS_REG6_LP5_BANK_MODE, reg6);
 		dfi->lp5_ckr = FIELD_GET(RK3588_PMUGRF_OS_REG6_LP5_CKR, reg6);
 		if (dfi->lp5_ckr)
 			dfi->count_multiplier *= 2;

-- 
2.53.0




More information about the Linux-rockchip mailing list