]> git.baikalelectronics.ru Git - kernel.git/commit
drm/panel: boe-tv101wum-nl6: Ensure DSI writes succeed during disable
authorStephen Boyd <swboyd@chromium.org>
Fri, 6 Jan 2023 03:01:08 +0000 (19:01 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Feb 2023 10:28:09 +0000 (11:28 +0100)
commita6a69f18674b8c423eeb1c39f68d2622042b9c46
treeefa39b3898a04ad1ff657255dd9f612c70637060
parentb71b96283b9e11fb83000e55dd1eaf992b2d0ccb
drm/panel: boe-tv101wum-nl6: Ensure DSI writes succeed during disable

[ Upstream commit 99c09da65ddcc8c4fc45be7323a1b13a0fc91d8a ]

The unprepare sequence has started to fail after moving to panel bridge
code in the msm drm driver (commit cd2dd87fce0f ("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: cd2dd87fce0f ("drm/msm/dsi: switch to DRM_PANEL_BRIDGE")
Fixes: 55d02c59a88d ("drm/panel: support for boe tv101wum-nl6 wuxga dsi video mode panel")
Cc: yangcong <yangcong5@huaqin.corp-partner.google.com>
Cc: Douglas Anderson <dianders@chromium.org>
Cc: Jitao Shi <jitao.shi@mediatek.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Rob Clark <robdclark@chromium.org>
Cc: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230106030108.2542081-1-swboyd@chromium.org
(cherry picked from commit 2109b09e3b8248e7ed666ec57a5f6216867c543e)
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c