diff options
author | Thierry Reding <treding@nvidia.com> | 2017-10-12 17:30:55 +0200 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2017-12-13 14:16:39 +0100 |
commit | 7772fdaef939891d790c3461a4d1681417e0f51f (patch) | |
tree | df2c8b597329ad2f2274c17906325371599cf2f0 /drivers/gpu/drm/tegra/plane.c | |
parent | drm/tegra: dc: Add Tegra186 support (diff) | |
download | linux-7772fdaef939891d790c3461a4d1681417e0f51f.tar.xz linux-7772fdaef939891d790c3461a4d1681417e0f51f.zip |
drm/tegra: Support ARGB and ABGR formats
These formats can easily be supported on all generations of Tegra.
Note that the XRGB and XBGR formats that we supported were in fact using
the ARGB and ABGR Tegra formats. This happened to work in cases where no
alpha was being considered. This change is also a fix for those formats.
Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/gpu/drm/tegra/plane.c')
-rw-r--r-- | drivers/gpu/drm/tegra/plane.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/drm/tegra/plane.c b/drivers/gpu/drm/tegra/plane.c index 78b24aa1ac83..88b5aea4a48e 100644 --- a/drivers/gpu/drm/tegra/plane.c +++ b/drivers/gpu/drm/tegra/plane.c @@ -111,10 +111,18 @@ int tegra_plane_format(u32 fourcc, u32 *format, u32 *swap) switch (fourcc) { case DRM_FORMAT_XBGR8888: + *format = WIN_COLOR_DEPTH_R8G8B8X8; + break; + + case DRM_FORMAT_ABGR8888: *format = WIN_COLOR_DEPTH_R8G8B8A8; break; case DRM_FORMAT_XRGB8888: + *format = WIN_COLOR_DEPTH_B8G8R8X8; + break; + + case DRM_FORMAT_ARGB8888: *format = WIN_COLOR_DEPTH_B8G8R8A8; break; |