drm/panel: move hardcode timing top of mode list
authorMark Yao <mark.yao@rock-chips.com>
Thu, 9 Feb 2017 08:38:43 +0000 (16:38 +0800)
committerMark Yao <mark.yao@rock-chips.com>
Thu, 9 Feb 2017 09:33:29 +0000 (17:33 +0800)
Change-Id: I76cc9ae6cfdac77e8ed0953da35b17491f5fae6c
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
drivers/gpu/drm/panel/panel-simple.c

index 76636f475df91eb7f1526b44458cf640763ccd0f..d542e86cbfd5ce91d7dd2d2cc7edd8c7fac9992c 100644 (file)
@@ -271,6 +271,12 @@ static int panel_simple_get_modes(struct drm_panel *panel)
        struct panel_simple *p = to_panel_simple(panel);
        int num = 0;
 
+       /* add device node plane modes */
+       num += panel_simple_of_get_native_mode(p);
+
+       /* add hard-coded panel modes */
+       num += panel_simple_get_fixed_modes(p);
+
        /* probe EDID if a DDC bus is available */
        if (p->ddc) {
                struct edid *edid = drm_get_edid(panel->connector, p->ddc);
@@ -281,12 +287,6 @@ static int panel_simple_get_modes(struct drm_panel *panel)
                }
        }
 
-       /* add hard-coded panel modes */
-       num += panel_simple_get_fixed_modes(p);
-
-       /* add device node plane modes */
-       num += panel_simple_of_get_native_mode(p);
-
        return num;
 }