Skip to content

Commit a3ee9e0

Browse files
bebarinoThomas Zimmermann
authored andcommitted
drm/panel: boe-tv101wum-nl6: Ensure DSI writes succeed during disable
The unprepare sequence has started to fail after moving to panel bridge code in the msm drm driver (commit 007ac02 ("drm/msm/dsi: switch to DRM_PANEL_BRIDGE")). You'll see messages like this in the kernel logs: panel-boe-tv101wum-nl6 ae94000.dsi.0: failed to set panel off: -22 This is because boe_panel_enter_sleep_mode() needs an operating DSI link to set the panel into sleep mode. Performing those writes in the unprepare phase of bridge ops is too late, because the link has already been torn down by the DSI controller in post_disable, i.e. the PHY has been disabled, etc. See dsi_mgr_bridge_post_disable() for more details on the DSI . Split the unprepare function into a disable part and an unprepare part. For now, just the DSI writes to enter sleep mode are put in the disable function. This fixes the panel off routine and keeps the panel happy. My Wormdingler has an integrated touchscreen that stops responding to touch if the panel is only half disabled too. This patch fixes it. And finally, this saves power when the screen is off because without this fix the regulators for the panel are left enabled when nothing is being displayed on the screen. Fixes: 007ac02 ("drm/msm/dsi: switch to DRM_PANEL_BRIDGE") Fixes: a869b9d ("drm/panel: support for boe tv101wum-nl6 wuxga dsi video mode panel") Cc: yangcong <[email protected]> Cc: Douglas Anderson <[email protected]> Cc: Jitao Shi <[email protected]> Cc: Sam Ravnborg <[email protected]> Cc: Rob Clark <[email protected]> Cc: Dmitry Baryshkov <[email protected]> Signed-off-by: Stephen Boyd <[email protected]> Reviewed-by: Douglas Anderson <[email protected]> Signed-off-by: Douglas Anderson <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] (cherry picked from commit c913cd5) Signed-off-by: Thomas Zimmermann <[email protected]>
1 parent 9074109 commit a3ee9e0

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1193,14 +1193,11 @@ static int boe_panel_enter_sleep_mode(struct boe_panel *boe)
11931193
return 0;
11941194
}
11951195

1196-
static int boe_panel_unprepare(struct drm_panel *panel)
1196+
static int boe_panel_disable(struct drm_panel *panel)
11971197
{
11981198
struct boe_panel *boe = to_boe_panel(panel);
11991199
int ret;
12001200

1201-
if (!boe->prepared)
1202-
return 0;
1203-
12041201
ret = boe_panel_enter_sleep_mode(boe);
12051202
if (ret < 0) {
12061203
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)
12091206

12101207
msleep(150);
12111208

1209+
return 0;
1210+
}
1211+
1212+
static int boe_panel_unprepare(struct drm_panel *panel)
1213+
{
1214+
struct boe_panel *boe = to_boe_panel(panel);
1215+
1216+
if (!boe->prepared)
1217+
return 0;
1218+
12121219
if (boe->desc->discharge_on_disable) {
12131220
regulator_disable(boe->avee);
12141221
regulator_disable(boe->avdd);
@@ -1528,6 +1535,7 @@ static enum drm_panel_orientation boe_panel_get_orientation(struct drm_panel *pa
15281535
}
15291536

15301537
static const struct drm_panel_funcs boe_panel_funcs = {
1538+
.disable = boe_panel_disable,
15311539
.unprepare = boe_panel_unprepare,
15321540
.prepare = boe_panel_prepare,
15331541
.enable = boe_panel_enable,

0 commit comments

Comments
 (0)