1 From 813cf104c571bf54e155d6be247c32a8f6aa3e2e Mon Sep 17 00:00:00 2001
2 From: Fancy Fang <chen.fang@nxp.com>
3 Date: Wed, 6 Jun 2018 23:20:43 +0800
4 Subject: [PATCH] MLK-18535-6 drm/imx: core: add LCDIF support
6 Allows the LCDIF to be one of the supported client
7 components. And set the 'legacyfb_depth' of LCDIF
10 Signed-off-by: Fancy Fang <chen.fang@nxp.com>
12 drivers/gpu/drm/imx/imx-drm-core.c | 13 +++++++++++++
13 1 file changed, 13 insertions(+)
15 --- a/drivers/gpu/drm/imx/imx-drm-core.c
16 +++ b/drivers/gpu/drm/imx/imx-drm-core.c
18 #include <linux/platform_device.h>
20 #include <video/imx-ipu-v3.h>
21 +#include <video/imx-lcdif.h>
23 #include <drm/drm_atomic.h>
24 #include <drm/drm_atomic_helper.h>
25 @@ -110,6 +111,18 @@ static int compare_of(struct device *dev
26 struct dpu_client_platformdata *pdata = dev->platform_data;
28 return pdata->of_node == np;
29 + } else if (strcmp(dev->driver->name, "imx-lcdif-crtc") == 0) {
30 + struct lcdif_client_platformdata *pdata = dev->platform_data;
31 +#if IS_ENABLED(CONFIG_DRM_FBDEV_EMULATION)
32 + /* set legacyfb_depth to be 32 for lcdif, since
33 + * default format of the connectors attached to
34 + * lcdif is usually RGB888
36 + if (pdata->of_node == np)
37 + legacyfb_depth = 32;
40 + return pdata->of_node == np;
43 /* Special case for LDB, one device for two channels */