aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/tegra/plane.h
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2017-12-20 09:39:14 +0100
committerThierry Reding <treding@nvidia.com>2017-12-21 14:55:55 +0100
commitebae8d07435ae91314f4a28d69b530d09c625815 (patch)
treefbe41c4c436502a2f073a3c352d3b14a3886cf15 /drivers/gpu/drm/tegra/plane.h
parentdrm/tegra: Correct timeout in tegra_syncpt_wait (diff)
downloadlinux-dev-ebae8d07435ae91314f4a28d69b530d09c625815.tar.xz
linux-dev-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.h8
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 */