summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFancy Fang <chen.fang@nxp.com>2018-06-06 23:20:43 +0800
committerLeonard Crestez <leonard.crestez@nxp.com>2018-08-24 12:41:33 +0300
commite52dc47ec6356544453933cd1685ad851b10a165 (patch)
treee72e5bb14f749e8cd276b199841a6ad86a1a3dda
parentc30528f1567ca9cad24117e15f443ff45bcbc895 (diff)
MLK-18535-6 drm/imx: core: add LCDIF support
Allows the LCDIF to be one of the supported client components. And set the 'legacyfb_depth' of LCDIF to be 32. Signed-off-by: Fancy Fang <chen.fang@nxp.com>
-rw-r--r--drivers/gpu/drm/imx/imx-drm-core.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/gpu/drm/imx/imx-drm-core.c b/drivers/gpu/drm/imx/imx-drm-core.c
index 502177b914c9..b41c0e4551ae 100644
--- a/drivers/gpu/drm/imx/imx-drm-core.c
+++ b/drivers/gpu/drm/imx/imx-drm-core.c
@@ -29,6 +29,7 @@
#include <video/imx-ipu-v3.h>
#include <video/dpu.h>
#include <video/imx-dcss.h>
+#include <video/imx-lcdif.h>
#include "imx-drm.h"
@@ -252,6 +253,18 @@ static int compare_of(struct device *dev, void *data)
struct dcss_client_platformdata *pdata = dev->platform_data;
return pdata->of_node == np;
+ } else if (strcmp(dev->driver->name, "imx-lcdif-crtc") == 0) {
+ struct lcdif_client_platformdata *pdata = dev->platform_data;
+#if IS_ENABLED(CONFIG_DRM_FBDEV_EMULATION)
+ /* set legacyfb_depth to be 32 for lcdif, since
+ * default format of the connectors attached to
+ * lcdif is usually RGB888
+ */
+ if (pdata->of_node == np)
+ legacyfb_depth = 32;
+#endif
+
+ return pdata->of_node == np;
}
/* This is a special case for dpu bliteng. */