mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 02:50:49 +09:00
drm/rockchip: vop: add support mcu panel psr mode
Psr mode can help reduce power consumption when using the mcu panel, which supports to refresh the image on its own while it remains unchanged. Signed-off-by: Sandy Huang <hjc@rock-chips.com> Signed-off-by: Damon Ding <damon.ding@rock-chips.com> Change-Id: Ie50b4e93fca2e11537c6b4715f15f8cc6008cfc7
This commit is contained in:
@@ -2183,7 +2183,17 @@ static void vop_crtc_atomic_disable_for_psr(struct drm_crtc *crtc,
|
||||
{
|
||||
struct vop *vop = to_vop(crtc);
|
||||
|
||||
vop_disable_all_planes(vop);
|
||||
/*
|
||||
* For mcu interface, if mcu_hold_mode is enabled, the wins will stop
|
||||
* accessing DDR and the interface will also stop output.
|
||||
*
|
||||
* In addition, the regs operations in vop_disable_all_planes() will
|
||||
* not take effect when the mcu_hold_mode is enabled.
|
||||
*/
|
||||
if (vop->mcu_timing.mcu_pix_total)
|
||||
VOP_CTRL_SET(vop, mcu_hold_mode, 1);
|
||||
else
|
||||
vop_disable_all_planes(vop);
|
||||
drm_crtc_vblank_off(crtc);
|
||||
vop->aclk_rate = clk_get_rate(vop->aclk);
|
||||
clk_set_rate(vop->aclk, vop->aclk_rate / 3);
|
||||
@@ -4129,6 +4139,8 @@ static void vop_crtc_atomic_enable(struct drm_crtc *crtc,
|
||||
if (vop->aclk_rate_reset)
|
||||
clk_set_rate(vop->aclk, vop->aclk_rate);
|
||||
vop->aclk_rate_reset = false;
|
||||
if (vop->mcu_timing.mcu_pix_total)
|
||||
VOP_CTRL_SET(vop, mcu_hold_mode, 0);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user