diff options
author | Thierry Reding <treding@nvidia.com> | 2017-12-20 09:39:14 +0100 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2017-12-21 14:55:55 +0100 |
commit | ebae8d07435ae91314f4a28d69b530d09c625815 (patch) | |
tree | fbe41c4c436502a2f073a3c352d3b14a3886cf15 /drivers/gpu/drm/tegra/plane.h | |
parent | 4c69ac12e39d3d623686d1c421b05d604e1c6db9 (diff) | |
download | linux-stable-ebae8d07435ae91314f4a28d69b530d09c625815.tar.gz linux-stable-ebae8d07435ae91314f4a28d69b530d09c625815.tar.bz2 linux-stable-ebae8d07435ae91314f4a28d69b530d09c625815.zip |
drm/tegra: dc: Implement legacy blending
This implements alpha blending on legacy display controllers (Tegra20,
Tegra30 and Tegra114). While it's theoretically possible to support the
zpos property to enable userspace to specify the Z-order of each plane
individually, this is not currently supported and the same fixed Z-
order as previously defined is used.
Reverts commit 71835caa00e8 ("drm/tegra: fb: Force alpha formats") since
the opaque formats are now supported.
Reported-by: Dmitry Osipenko <digetx@gmail.com>
Fixes: 7772fdaef939 ("drm/tegra: Support ARGB and ABGR formats")
Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/gpu/drm/tegra/plane.h')
-rw-r--r-- | drivers/gpu/drm/tegra/plane.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/drm/tegra/plane.h b/drivers/gpu/drm/tegra/plane.h index dca66cb95d25..6938719e7e5d 100644 --- a/drivers/gpu/drm/tegra/plane.h +++ b/drivers/gpu/drm/tegra/plane.h @@ -40,6 +40,10 @@ struct tegra_plane_state { struct tegra_bo_tiling tiling; u32 format; u32 swap; + + /* used for legacy blending support only */ + bool opaque; + bool dependent[3]; }; static inline struct tegra_plane_state * @@ -58,5 +62,9 @@ int tegra_plane_state_add(struct tegra_plane *plane, int tegra_plane_format(u32 fourcc, u32 *format, u32 *swap); bool tegra_plane_format_is_yuv(unsigned int format, bool *planar); +bool tegra_plane_format_has_alpha(unsigned int format); +int tegra_plane_format_get_alpha(unsigned int opaque, unsigned int *alpha); +void tegra_plane_check_dependent(struct tegra_plane *tegra, + struct tegra_plane_state *state); #endif /* TEGRA_PLANE_H */ |