From 540e7236053a7d69b7caf95887bd61f679ca1ee9 Mon Sep 17 00:00:00 2001 From: Mark Yao Date: Wed, 17 Aug 2016 08:56:56 +0800 Subject: [PATCH] drm/panel: keep mute when panel has no device-tree timing Since commit (f6972eb FROMLIST: drm/panel: add of display timing support), when panel has no device-tree timing, would always get noise message: [ 8.742157] /lvds_panel: could not find display-timings node [ 8.747878] /lvds_panel: no timings specified Change-Id: I9104b3017faa837807a09c21d0f948e499827ad9 Signed-off-by: Mark Yao --- drivers/gpu/drm/panel/panel-simple.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index 51fd0abd13ce..99d78eeec036 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c @@ -151,8 +151,17 @@ static int panel_simple_of_get_native_mode(struct panel_simple *panel) struct drm_connector *connector = panel->base.connector; struct drm_device *drm = panel->base.drm; struct drm_display_mode *mode; + struct device_node *timings_np; int ret; + timings_np = of_get_child_by_name(panel->dev->of_node, + "display-timings"); + if (!timings_np) { + dev_dbg(panel->dev, "failed to find display-timings node\n"); + return 0; + } + + of_node_put(timings_np); mode = drm_mode_create(drm); if (!mode) return 0; -- 2.34.1