OSDN Git Service

drm/panel: boe-tv101wum-nl6: Ensure DSI writes succeed during disable
[tomoyo/tomoyo-test1.git] / drivers / gpu / drm / panel / panel-boe-tv101wum-nl6.c
index 857a2f0..c924f11 100644 (file)
@@ -1193,14 +1193,11 @@ static int boe_panel_enter_sleep_mode(struct boe_panel *boe)
        return 0;
 }
 
-static int boe_panel_unprepare(struct drm_panel *panel)
+static int boe_panel_disable(struct drm_panel *panel)
 {
        struct boe_panel *boe = to_boe_panel(panel);
        int ret;
 
-       if (!boe->prepared)
-               return 0;
-
        ret = boe_panel_enter_sleep_mode(boe);
        if (ret < 0) {
                dev_err(panel->dev, "failed to set panel off: %d\n", ret);
@@ -1209,6 +1206,16 @@ static int boe_panel_unprepare(struct drm_panel *panel)
 
        msleep(150);
 
+       return 0;
+}
+
+static int boe_panel_unprepare(struct drm_panel *panel)
+{
+       struct boe_panel *boe = to_boe_panel(panel);
+
+       if (!boe->prepared)
+               return 0;
+
        if (boe->desc->discharge_on_disable) {
                regulator_disable(boe->avee);
                regulator_disable(boe->avdd);
@@ -1528,6 +1535,7 @@ static enum drm_panel_orientation boe_panel_get_orientation(struct drm_panel *pa
 }
 
 static const struct drm_panel_funcs boe_panel_funcs = {
+       .disable = boe_panel_disable,
        .unprepare = boe_panel_unprepare,
        .prepare = boe_panel_prepare,
        .enable = boe_panel_enable,