提交 5467a8b8 编写于 作者: T Thierry Reding

drm/tegra: dc: Restore YUV overlay support

Commit ebae8d07 ("drm/tegra: dc: Implement legacy blending") broke
support for YUV overlays by accident. The reason is that YUV formats are
considered opaque because they have no alpha component, but on the other
hand no corresponding format with an alpha component can be returned. In
the case of YUV formats, the opaque format is the same as the alpha
format, so add the special case to restore YUV overlay support.
Reported-by: NDmitry Osipenko <digetx@gmail.com>
Signed-off-by: NThierry Reding <treding@nvidia.com>
上级 ebae8d07
...@@ -276,6 +276,11 @@ bool tegra_plane_format_has_alpha(unsigned int format) ...@@ -276,6 +276,11 @@ bool tegra_plane_format_has_alpha(unsigned int format)
int tegra_plane_format_get_alpha(unsigned int opaque, unsigned int *alpha) int tegra_plane_format_get_alpha(unsigned int opaque, unsigned int *alpha)
{ {
if (tegra_plane_format_is_yuv(opaque, NULL)) {
*alpha = opaque;
return 0;
}
switch (opaque) { switch (opaque) {
case WIN_COLOR_DEPTH_B5G5R5X1: case WIN_COLOR_DEPTH_B5G5R5X1:
*alpha = WIN_COLOR_DEPTH_B5G5R5A1; *alpha = WIN_COLOR_DEPTH_B5G5R5A1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册