diff --git a/drivers/amlogic/media/video_sink/video.c b/drivers/amlogic/media/video_sink/video.c index 8c8260e2a225..b4947ded6e28 100644 --- a/drivers/amlogic/media/video_sink/video.c +++ b/drivers/amlogic/media/video_sink/video.c @@ -4120,7 +4120,8 @@ SET_FILTER: new_frame = cur_pipbuf; } } - vd_layer[0].dispbuf_mapping = &cur_pipbuf; + if (new_frame || cur_pipbuf) + vd_layer[0].dispbuf_mapping = &cur_pipbuf; cur_blackout = blackout_pip | force_blackout; } else if (vd1_path_id != VFM_PATH_INVAILD) { /* priamry display on VD1 */ @@ -4140,7 +4141,8 @@ SET_FILTER: new_frame = cur_dispbuf; } } - vd_layer[0].dispbuf_mapping = &cur_dispbuf; + if (new_frame || cur_dispbuf) + vd_layer[0].dispbuf_mapping = &cur_dispbuf; cur_blackout = blackout | force_blackout; } else { cur_blackout = 1; @@ -4237,7 +4239,8 @@ SET_FILTER: new_frame2 = cur_dispbuf; } } - vd_layer[1].dispbuf_mapping = &cur_dispbuf; + if (new_frame2 || cur_dispbuf) + vd_layer[1].dispbuf_mapping = &cur_dispbuf; cur_blackout = blackout | force_blackout; } else if (vd2_path_id != VFM_PATH_INVAILD) { /* pip display in VD2 */ @@ -4256,7 +4259,8 @@ SET_FILTER: new_frame2 = cur_pipbuf; } } - vd_layer[1].dispbuf_mapping = &cur_pipbuf; + if (new_frame2 || cur_pipbuf) + vd_layer[1].dispbuf_mapping = &cur_pipbuf; cur_blackout = blackout_pip | force_blackout; } else { cur_blackout = 1; diff --git a/drivers/amlogic/media/video_sink/video_hw.c b/drivers/amlogic/media/video_sink/video_hw.c index ab8d27ce974d..c4405320a3d6 100644 --- a/drivers/amlogic/media/video_sink/video_hw.c +++ b/drivers/amlogic/media/video_sink/video_hw.c @@ -2329,10 +2329,10 @@ static void disable_vd1_blend(struct video_layer_s *layer) if (layer->dispbuf && is_local_vf(layer->dispbuf)) layer->dispbuf = NULL; - if (layer->dispbuf_mapping && - *layer->dispbuf_mapping && - is_local_vf(*layer->dispbuf_mapping)) { - *layer->dispbuf_mapping = NULL; + if (layer->dispbuf_mapping) { + if (*layer->dispbuf_mapping && + is_local_vf(*layer->dispbuf_mapping)) + *layer->dispbuf_mapping = NULL; layer->dispbuf_mapping = NULL; layer->dispbuf = NULL; } @@ -2364,10 +2364,10 @@ static void disable_vd2_blend(struct video_layer_s *layer) if (layer->dispbuf && is_local_vf(layer->dispbuf)) layer->dispbuf = NULL; - if (layer->dispbuf_mapping && - *layer->dispbuf_mapping && - is_local_vf(*layer->dispbuf_mapping)) { - *layer->dispbuf_mapping = NULL; + if (layer->dispbuf_mapping) { + if (*layer->dispbuf_mapping && + is_local_vf(*layer->dispbuf_mapping)) + *layer->dispbuf_mapping = NULL; layer->dispbuf_mapping = NULL; layer->dispbuf = NULL; }