From 950296ac28380d0b6c7b5b4ea0dd890f205c86a3 Mon Sep 17 00:00:00 2001 From: Marek Szyprowski Date: Mon, 30 Nov 2015 14:53:24 +0100 Subject: drm/exynos: mixer: enable video overlay plane only when VP is available Video overlay plane should be registered only when suitable hardware sub-block (Video Processor) is available. Signed-off-by: Marek Szyprowski Reviewed-by: Gustavo Padovan Signed-off-by: Inki Dae [backport of mainline commit ab14420125c3cd1111f57731f0f9359c4e64d76a to let Enlightenment to use video/osd graphics plane] Signed-off-by: Marek Szyprowski Change-Id: Iea4dd02abb408aa188b46f6ed099b0231ef99b6d --- drivers/gpu/drm/exynos/exynos_mixer.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c b/drivers/gpu/drm/exynos/exynos_mixer.c index 55d4fcddc3a2..930ed9ce018f 100644 --- a/drivers/gpu/drm/exynos/exynos_mixer.c +++ b/drivers/gpu/drm/exynos/exynos_mixer.c @@ -42,6 +42,7 @@ #include "exynos_mixer.h" #define MIXER_WIN_NR 3 +#define VP_DEFAULT_WIN 2 #define MIXER_DEFAULT_WIN 0 /* The pixelformats that are natively supported by the mixer. */ @@ -1233,6 +1234,8 @@ static int mixer_bind(struct device *dev, struct device *manager, void *data) return ret; for (zpos = 0; zpos < MIXER_WIN_NR; zpos++) { + if (zpos == VP_DEFAULT_WIN && !ctx->vp_enabled) + continue; type = (zpos == MIXER_DEFAULT_WIN) ? DRM_PLANE_TYPE_PRIMARY : DRM_PLANE_TYPE_OVERLAY; ret = exynos_plane_init(drm_dev, &ctx->planes[zpos], -- cgit v1.2.3