summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/exynos/exynos_drm_vidi.c
diff options
context:
space:
mode:
authorMarek Szyprowski <m.szyprowski@samsung.com>2015-08-31 00:53:57 +0900
committerSeung-Woo Kim <sw0312.kim@samsung.com>2016-12-14 13:51:53 +0900
commitc3eccdda14877eb1681f63038d173b902306e0c4 (patch)
treeb09425bada26426928df8693af7ebf483080223b /drivers/gpu/drm/exynos/exynos_drm_vidi.c
parent173b41f44bf9c3b64f0930366cb15f9aac1338dc (diff)
drm/exynos: Properly report supported formats for each device
Exynos DRM reported that all planes for all supported sub-devices supports only three pixel formats: XRGB24, ARGB24 and NV12. This patch lets each Exynos DRM sub-drivers to provide the list of supported pixel formats and registers this list to DRM core. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com> [jy0922.shim: backported from original mainline commit] Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Change-Id: I7f486b9f2d776a8fdd8cb0c758100eba8de31ef6
Diffstat (limited to 'drivers/gpu/drm/exynos/exynos_drm_vidi.c')
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_vidi.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_vidi.c b/drivers/gpu/drm/exynos/exynos_drm_vidi.c
index 7bdc5d463b15..ba249e711433 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_vidi.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_vidi.c
@@ -84,6 +84,12 @@ static const char fake_edid_info[] = {
0x00, 0x00, 0x00, 0x06
};
+static const uint32_t formats[] = {
+ DRM_FORMAT_XRGB8888,
+ DRM_FORMAT_ARGB8888,
+ DRM_FORMAT_NV12,
+};
+
static int vidi_enable_vblank(struct exynos_drm_crtc *crtc)
{
struct vidi_context *ctx = crtc->ctx;
@@ -473,7 +479,8 @@ static int vidi_bind(struct device *dev, struct device *master, void *data)
type = (zpos == ctx->default_win) ? DRM_PLANE_TYPE_PRIMARY :
DRM_PLANE_TYPE_OVERLAY;
ret = exynos_plane_init(drm_dev, &ctx->planes[zpos],
- 1 << ctx->pipe, type, zpos);
+ 1 << ctx->pipe, type, formats,
+ ARRAY_SIZE(formats), zpos);
if (ret)
return ret;
}