summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/imx
diff options
context:
space:
mode:
authorFancy Fang <chen.fang@nxp.com>2018-08-31 11:27:29 +0800
committerFancy Fang <chen.fang@nxp.com>2018-09-03 10:35:13 +0800
commitd47cc975a606019f1200bbb865d60e64f8ad850b (patch)
tree43ec78fb24fbd2d0ada7dfa8141f9c817a0536e7 /drivers/gpu/drm/imx
parent606571bee0b530ad35e503fd04bb82eca078ce59 (diff)
MLK-19318 drm/imx: lcdif: avoid log print when no device attached
In the 'lcdif_crtc_atomic_check()', when the 'bus_format' is zero which means that there is no valid display peripherals attached to LCDIF, return directly to avoid below error log to make noises, since the error log is not cared in this case. Signed-off-by: Fancy Fang <chen.fang@nxp.com> (cherry picked from commit 25d2b80f637af06094f56c60d46404af3b7ff381)
Diffstat (limited to 'drivers/gpu/drm/imx')
-rw-r--r--drivers/gpu/drm/imx/lcdif/lcdif-crtc.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/imx/lcdif/lcdif-crtc.c b/drivers/gpu/drm/imx/lcdif/lcdif-crtc.c
index 6873c24fbcd4..df7618c308f0 100644
--- a/drivers/gpu/drm/imx/lcdif/lcdif-crtc.c
+++ b/drivers/gpu/drm/imx/lcdif/lcdif-crtc.c
@@ -112,6 +112,13 @@ static int lcdif_crtc_atomic_check(struct drm_crtc *crtc,
struct lcdif_crtc *lcdif_crtc = to_lcdif_crtc(crtc);
struct imx_crtc_state *imx_crtc_state = to_imx_crtc_state(state);
+ /* return directly when no devices attached
+ * to LCDIF to avoid below error messsage to
+ * make noises in this case.
+ */
+ if (!imx_crtc_state->bus_format)
+ return -EINVAL;
+
/* check the requested bus format can be
* supported by LCDIF CTRC or not
*/