drm/rockchip: vop2: No setup alpha if fb is NULL

We find sometimes hwc will post a plane with NULL
fb, this is no need to setup alpha.

Change-Id: I1ca475e7171c08a4182a3a98bf357d3bf00d8fdc
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
This commit is contained in:
Andy Yan
2021-02-17 15:42:27 +08:00
parent 7059ef6f76
commit 6182a760fc

View File

@@ -4128,6 +4128,8 @@ static void vop2_setup_cluster_alpha(struct vop2 *vop2, struct vop2_cluster *clu
if (top_win_vpstate) {
fb = top_win_vpstate->base.fb;
if (!fb)
return;
if (top_win_vpstate->base.pixel_blend_mode == DRM_MODE_BLEND_PREMULTI)
premulti_en = true;
else
@@ -4135,6 +4137,8 @@ static void vop2_setup_cluster_alpha(struct vop2 *vop2, struct vop2_cluster *clu
src_pixel_alpha_en = is_alpha_support(fb->format->format);
}
fb = bottom_win_vpstate->base.fb;
if (!fb)
return;
dst_pixel_alpha_en = is_alpha_support(fb->format->format);
alpha_config.src_premulti_en = premulti_en;
alpha_config.dst_premulti_en = false;