Skip to content

Commit fdfaa7b

Browse files
committed
HACK drm/panel: move some dsi commands from unprepare to disable
The commit 007ac02 ("drm/msm/dsi: switch to DRM_PANEL_BRIDGE") breaks panels which send DSI commands in their .unprepare callbacks. Migrate to using .disable for that for some panels. Inspired-by: https://gitlab.com/sdm845-mainline/linux/-/commit/88d6f2060e1f4fd283075079088844e0474e8d8b Co-developed-by: Joel Selvaraj <[email protected]> Signed-off-by: Joel Selvaraj <[email protected]> Co-developed-by: Caleb Connolly <[email protected]> Signed-off-by: Caleb Connolly <[email protected]> Signed-off-by: Alexey Minnekhanov <[email protected]>
1 parent 68a6d52 commit fdfaa7b

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

drivers/gpu/drm/panel/panel-novatek-nt36672a.c

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -821,19 +821,25 @@ static int nt36672a_panel_power_off(struct drm_panel *panel)
821821
return ret;
822822
}
823823

824-
static int nt36672a_panel_unprepare(struct drm_panel *panel)
824+
static int nt36672a_panel_disable(struct drm_panel *panel)
825825
{
826826
struct nt36672a_panel *pinfo = to_nt36672a_panel(panel);
827-
int ret;
827+
int ret = 0;
828828

829829
/* send off cmds */
830830
if (pinfo->desc->off_cmds) {
831831
ret = pinfo->desc->off_cmds(panel);
832832
if (ret < 0)
833833
dev_err(panel->dev, "failed to send DCS off cmds: %d\n", ret);
834-
return ret;
835834
}
836835

836+
return ret;
837+
}
838+
839+
static int nt36672a_panel_unprepare(struct drm_panel *panel)
840+
{
841+
int ret;
842+
837843
ret = nt36672a_panel_power_off(panel);
838844
if (ret < 0)
839845
dev_err(panel->dev, "power_off failed ret = %d\n", ret);
@@ -909,6 +915,7 @@ static int nt36672a_panel_get_modes(struct drm_panel *panel,
909915
}
910916

911917
static const struct drm_panel_funcs panel_funcs = {
918+
.disable = nt36672a_panel_disable,
912919
.unprepare = nt36672a_panel_unprepare,
913920
.prepare = nt36672a_panel_prepare,
914921
.get_modes = nt36672a_panel_get_modes,

0 commit comments

Comments
 (0)