mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
drm/rockchip: vop2: Disable all other multi area when disable area0
When area0 is disabled, all other sub multi area must be disabled, or the win may run into unexpected situlation: such as post_buf_empty or iommu fault. Change-Id: I8a92e45849cfc31af029ba0e86562751be92ddbd Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
This commit is contained in:
@@ -40,6 +40,7 @@
|
||||
* This is a feather on rk3566
|
||||
*/
|
||||
#define WIN_FEATURE_MIRROR BIT(6)
|
||||
#define WIN_FEATURE_MULTI_AREA BIT(7)
|
||||
|
||||
|
||||
#define DSP_BG_SWAP 0x1
|
||||
|
||||
@@ -1072,6 +1072,19 @@ static inline void vop2_wb_cfg_done(struct vop2_video_port *vp)
|
||||
|
||||
}
|
||||
|
||||
static void vop2_win_multi_area_disable(struct vop2_win *parent)
|
||||
{
|
||||
struct vop2 *vop2 = parent->vop2;
|
||||
struct vop2_win *area;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < vop2->registered_num_wins; i++) {
|
||||
area = &vop2->win[i];
|
||||
if (area->parent == parent)
|
||||
VOP_WIN_SET(vop2, area, enable, 0);
|
||||
}
|
||||
}
|
||||
|
||||
static void vop2_win_disable(struct vop2_win *win)
|
||||
{
|
||||
struct vop2 *vop2 = win->vop2;
|
||||
@@ -1091,6 +1104,12 @@ static void vop2_win_disable(struct vop2_win *win)
|
||||
|
||||
VOP_CLUSTER_SET(vop2, win, enable, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
* disable all other multi area win if we want disable area0 here
|
||||
*/
|
||||
if (!win->parent && (win->feature & WIN_FEATURE_MULTI_AREA))
|
||||
vop2_win_multi_area_disable(win);
|
||||
}
|
||||
|
||||
static inline void vop2_write_lut(struct vop2 *vop2, uint32_t offset, uint32_t v)
|
||||
|
||||
@@ -1027,6 +1027,7 @@ static const struct vop2_win_data rk3568_vop_win_data[] = {
|
||||
.max_upscale_factor = 8,
|
||||
.max_downscale_factor = 8,
|
||||
.dly = { 20, 47, 41 },
|
||||
.feature = WIN_FEATURE_MULTI_AREA,
|
||||
},
|
||||
|
||||
{
|
||||
@@ -1049,7 +1050,7 @@ static const struct vop2_win_data rk3568_vop_win_data[] = {
|
||||
.max_upscale_factor = 8,
|
||||
.max_downscale_factor = 8,
|
||||
.dly = { 20, 47, 41 },
|
||||
.feature = WIN_FEATURE_MIRROR,
|
||||
.feature = WIN_FEATURE_MIRROR | WIN_FEATURE_MULTI_AREA,
|
||||
},
|
||||
|
||||
{
|
||||
@@ -1072,7 +1073,7 @@ static const struct vop2_win_data rk3568_vop_win_data[] = {
|
||||
.max_upscale_factor = 8,
|
||||
.max_downscale_factor = 8,
|
||||
.dly = { 20, 47, 41 },
|
||||
.feature = WIN_FEATURE_MIRROR,
|
||||
.feature = WIN_FEATURE_MIRROR | WIN_FEATURE_MULTI_AREA,
|
||||
},
|
||||
|
||||
{
|
||||
@@ -1095,6 +1096,7 @@ static const struct vop2_win_data rk3568_vop_win_data[] = {
|
||||
.max_upscale_factor = 8,
|
||||
.max_downscale_factor = 8,
|
||||
.dly = { 20, 47, 41 },
|
||||
.feature = WIN_FEATURE_MULTI_AREA,
|
||||
},
|
||||
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user