diff options
author | Marek Szyprowski <m.szyprowski@samsung.com> | 2015-11-30 14:53:24 +0100 |
---|---|---|
committer | Seung-Woo Kim <sw0312.kim@samsung.com> | 2016-12-14 13:50:42 +0900 |
commit | 950296ac28380d0b6c7b5b4ea0dd890f205c86a3 (patch) | |
tree | 9bb64370f7402e7f8786a3bb3911786c246353c7 | |
parent | 80c2a9cc43b94f5683d7b07d4058e68d64b6b489 (diff) |
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 <m.szyprowski@samsung.com>
Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
[backport of mainline commit ab14420125c3cd1111f57731f0f9359c4e64d76a
to let Enlightenment to use video/osd graphics plane]
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: Iea4dd02abb408aa188b46f6ed099b0231ef99b6d
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_mixer.c | 3 |
1 files changed, 3 insertions, 0 deletions
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], |