Skip to content

Commit

Permalink
drm/tegra: plane: Fix RGB565 format on older Tegra
Browse files Browse the repository at this point in the history
The opaque/alpha format conversion code is currently only looking at
XRGB formats because they have an equivalent ARGB format. The opaque
format for RGB565 is RGB565 itself, much like the YUV formats map to
themselves.

Reported-by: Dmitry Osipenko <digetx@gmail.com>
Fixes: ebae8d0 ("drm/tegra: dc: Implement legacy blending")
Signed-off-by: Thierry Reding <treding@nvidia.com>
  • Loading branch information
Thierry Reding committed Mar 15, 2018
1 parent 7928b2c commit 8a927d6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/gpu/drm/tegra/plane.c
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,10 @@ int tegra_plane_format_get_alpha(unsigned int opaque, unsigned int *alpha)
case WIN_COLOR_DEPTH_B8G8R8X8:
*alpha = WIN_COLOR_DEPTH_B8G8R8A8;
return 0;

case WIN_COLOR_DEPTH_B5G6R5:
*alpha = opaque;
return 0;
}

return -EINVAL;
Expand Down

0 comments on commit 8a927d6

Please sign in to comment.