mirror of
https://github.com/torvalds/linux.git
synced 2026-06-08 14:42:37 +02:00
drm/rockchip: vop: add vop_win_disable for win state control
Change-Id: Idd0ee2e61331f6d01e7528172a464cae92c1b001 Signed-off-by: Sandy Huang <hjc@rock-chips.com>
This commit is contained in:
parent
a9c39f81ac
commit
8aaf010974
|
|
@ -465,6 +465,23 @@ static bool vop_is_allwin_disabled(struct vop *vop)
|
|||
return true;
|
||||
}
|
||||
|
||||
static void vop_win_disable(struct vop *vop, struct vop_win *win)
|
||||
{
|
||||
/*
|
||||
* FIXUP: some of the vop scale would be abnormal after windows power
|
||||
* on/off so deinit scale to scale_none mode.
|
||||
*/
|
||||
if (win->phy->scl && win->phy->scl->ext) {
|
||||
VOP_SCL_SET_EXT(vop, win, yrgb_hor_scl_mode, SCALE_NONE);
|
||||
VOP_SCL_SET_EXT(vop, win, yrgb_ver_scl_mode, SCALE_NONE);
|
||||
VOP_SCL_SET_EXT(vop, win, cbcr_hor_scl_mode, SCALE_NONE);
|
||||
VOP_SCL_SET_EXT(vop, win, cbcr_ver_scl_mode, SCALE_NONE);
|
||||
}
|
||||
|
||||
VOP_WIN_SET(vop, win, enable, 0);
|
||||
VOP_WIN_SET(vop, win, gate, 0);
|
||||
}
|
||||
|
||||
static void vop_disable_allwin(struct vop *vop)
|
||||
{
|
||||
int i;
|
||||
|
|
@ -472,14 +489,7 @@ static void vop_disable_allwin(struct vop *vop)
|
|||
for (i = 0; i < vop->num_wins; i++) {
|
||||
struct vop_win *win = &vop->win[i];
|
||||
|
||||
if (win->phy->scl && win->phy->scl->ext) {
|
||||
VOP_SCL_SET_EXT(vop, win, yrgb_hor_scl_mode, SCALE_NONE);
|
||||
VOP_SCL_SET_EXT(vop, win, yrgb_ver_scl_mode, SCALE_NONE);
|
||||
VOP_SCL_SET_EXT(vop, win, cbcr_hor_scl_mode, SCALE_NONE);
|
||||
VOP_SCL_SET_EXT(vop, win, cbcr_ver_scl_mode, SCALE_NONE);
|
||||
}
|
||||
VOP_WIN_SET(vop, win, enable, 0);
|
||||
VOP_WIN_SET(vop, win, gate, 0);
|
||||
vop_win_disable(vop, win);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1482,19 +1492,7 @@ static void vop_plane_atomic_disable(struct drm_plane *plane,
|
|||
|
||||
spin_lock(&vop->reg_lock);
|
||||
|
||||
/*
|
||||
* FIXUP: some of the vop scale would be abnormal after windows power
|
||||
* on/off so deinit scale to scale_none mode.
|
||||
*/
|
||||
if (win->phy->scl && win->phy->scl->ext) {
|
||||
VOP_SCL_SET_EXT(vop, win, yrgb_hor_scl_mode, SCALE_NONE);
|
||||
VOP_SCL_SET_EXT(vop, win, yrgb_ver_scl_mode, SCALE_NONE);
|
||||
VOP_SCL_SET_EXT(vop, win, cbcr_hor_scl_mode, SCALE_NONE);
|
||||
VOP_SCL_SET_EXT(vop, win, cbcr_ver_scl_mode, SCALE_NONE);
|
||||
}
|
||||
VOP_WIN_SET(vop, win, enable, 0);
|
||||
if (win->area_id == 0)
|
||||
VOP_WIN_SET(vop, win, gate, 0);
|
||||
vop_win_disable(vop, win);
|
||||
|
||||
/*
|
||||
* IC design bug: in the bandwidth tension environment when close win2,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user