drm/exynos: mixer: enable video overlay plane only when VP is available
authorMarek Szyprowski <m.szyprowski@samsung.com>
Mon, 30 Nov 2015 13:53:24 +0000 (14:53 +0100)
committerInki Dae <daeinki@gmail.com>
Sun, 13 Dec 2015 13:22:56 +0000 (22:22 +0900)
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>
drivers/gpu/drm/exynos/exynos_mixer.c

index 84ee339..8d2ce13 100644 (file)
@@ -1167,6 +1167,9 @@ static int mixer_bind(struct device *dev, struct device *manager, void *data)
                const uint32_t *formats;
                unsigned int fcount;
 
+               if (zpos == VP_DEFAULT_WIN && !ctx->vp_enabled)
+                       continue;
+
                if (zpos < VP_DEFAULT_WIN) {
                        formats = mixer_formats;
                        fcount = ARRAY_SIZE(mixer_formats);