mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-13 14:14:37 +00:00
imx-drm: ipuv3-plane: allow local alpha in ipu_plane_mode_set()
For the overlay plane scanning out a framebuffer with an alpha component, enable the DP local alpha feature on the partial plane. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
eb3a13230b
commit
e6245fc78b
1 changed files with 10 additions and 2 deletions
|
@ -148,14 +148,22 @@ int ipu_plane_mode_set(struct ipu_plane *ipu_plane, struct drm_crtc *crtc,
|
||||||
ret);
|
ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
ipu_dp_set_global_alpha(ipu_plane->dp, 1, 0, 1);
|
ipu_dp_set_global_alpha(ipu_plane->dp, true, 0, true);
|
||||||
break;
|
break;
|
||||||
case IPU_DP_FLOW_SYNC_FG:
|
case IPU_DP_FLOW_SYNC_FG:
|
||||||
ipu_dp_setup_channel(ipu_plane->dp,
|
ipu_dp_setup_channel(ipu_plane->dp,
|
||||||
ipu_drm_fourcc_to_colorspace(fb->pixel_format),
|
ipu_drm_fourcc_to_colorspace(fb->pixel_format),
|
||||||
IPUV3_COLORSPACE_UNKNOWN);
|
IPUV3_COLORSPACE_UNKNOWN);
|
||||||
ipu_dp_set_window_pos(ipu_plane->dp, crtc_x, crtc_y);
|
ipu_dp_set_window_pos(ipu_plane->dp, crtc_x, crtc_y);
|
||||||
break;
|
/* Enable local alpha on partial plane */
|
||||||
|
switch (fb->pixel_format) {
|
||||||
|
case DRM_FORMAT_ARGB8888:
|
||||||
|
case DRM_FORMAT_ABGR8888:
|
||||||
|
ipu_dp_set_global_alpha(ipu_plane->dp, false, 0, false);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = ipu_dmfc_init_channel(ipu_plane->dmfc, crtc_w);
|
ret = ipu_dmfc_init_channel(ipu_plane->dmfc, crtc_w);
|
||||||
|
|
Loading…
Reference in a new issue