drm: disable pipeline's blocks when no plane was committed [1/1]

PD#SWPL-121840

Problem:
uboot enable vpp osd1 src control register when plugout hdmitx cable.
drm driver did not do logo_init.
when change bootanimation to bootvideo, then the screen will show osd

Solution:
disable pipeline's blocks when no plane was committed

Verify:
ah212, S5, T7c

Test:
DRM-OSD-27

Change-Id: I366ff01fcfbae6229e593d2a835c97cab64269af
Signed-off-by: yujun.zhang <yujun.zhang@amlogic.com>
This commit is contained in:
yujun.zhang
2024-04-10 23:10:43 +08:00
committed by gongwei.chen
parent 57bf9257d7
commit 66ea3e6d07
+16 -1
View File
@@ -751,7 +751,7 @@ int vpu_osd_pipeline_update(struct meson_vpu_sub_pipeline *sub_pipeline,
int i;
#endif
int crtc_index;
int crtc_index, j;
unsigned long id;
struct meson_vpu_block *mvb;
struct meson_vpu_block_state *mvbs, *old_mvbs;
@@ -774,6 +774,21 @@ int vpu_osd_pipeline_update(struct meson_vpu_sub_pipeline *sub_pipeline,
arm_fbc_check_error();
affected_blocks = old_mvsps->enable_blocks | new_mvsps->enable_blocks;
if (affected_blocks == 0) {
for (j = 0; j < MESON_MAX_BLOCKS; j++) {
DRM_DEBUG("Disabling blocks because of initial disabled status!\n");
mvb = vpu_blocks[j];
if (!mvb || mvb->type != MESON_BLK_VPPBLEND || mvb->index != crtc_index)
continue;
old_mvbs = meson_vpu_block_get_old_state(mvb, old_state);
old_mvbs->sub = &pipeline->subs[crtc_index];
if (mvb->ops && mvb->ops->disable)
mvb->ops->disable(mvb, old_mvbs);
}
}
for_each_set_bit(id, &affected_blocks, 32) {
mvb = vpu_blocks[id];
if (mvb->type == MESON_BLK_VIDEO)