Skip to content

Commit b63a553

Browse files
saschahauermmind
authored andcommitted
drm/rockchip: vop2: Use regcache_sync() to fix suspend/resume
afa965a ("drm/rockchip: vop2: fix suspend/resume") uses regmap_reinit_cache() to fix the suspend/resume issue with the VOP2 driver. During discussion it came up that we should rather use regcache_sync() instead. As the original patch is already applied fix this up in this follow-up patch. Fixes: afa965a ("drm/rockchip: vop2: fix suspend/resume") Cc: [email protected] Signed-off-by: Sascha Hauer <[email protected]> Signed-off-by: Heiko Stuebner <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 7363d6b commit b63a553

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

drivers/gpu/drm/rockchip/rockchip_drm_vop2.c

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,6 @@ struct vop2 {
215215
struct vop2_win win[];
216216
};
217217

218-
static const struct regmap_config vop2_regmap_config;
219-
220218
static struct vop2_video_port *to_vop2_video_port(struct drm_crtc *crtc)
221219
{
222220
return container_of(crtc, struct vop2_video_port, crtc);
@@ -841,11 +839,7 @@ static void vop2_enable(struct vop2 *vop2)
841839
return;
842840
}
843841

844-
ret = regmap_reinit_cache(vop2->map, &vop2_regmap_config);
845-
if (ret) {
846-
drm_err(vop2->drm, "failed to reinit cache: %d\n", ret);
847-
return;
848-
}
842+
regcache_sync(vop2->map);
849843

850844
if (vop2->data->soc_id == 3566)
851845
vop2_writel(vop2, RK3568_OTP_WIN_EN, 1);
@@ -875,6 +869,8 @@ static void vop2_disable(struct vop2 *vop2)
875869

876870
pm_runtime_put_sync(vop2->dev);
877871

872+
regcache_mark_dirty(vop2->map);
873+
878874
clk_disable_unprepare(vop2->aclk);
879875
clk_disable_unprepare(vop2->hclk);
880876
}

0 commit comments

Comments
 (0)