Skip to content

Panel drivers unable to send DSI commands in .unprepare callback #91

@minlexx

Description

@minlexx

When you turn display off, you see this in dmesg:

[  154.587399] panel-tianma-nt36672a c994000.dsi.0: failed to send DCS off cmds: -110

or similar:

[  121.295290] panel-jdi-fhd-r63452 994000.dsi.0: transmit data failed: -22
[  121.295368] panel-jdi-fhd-r63452 994000.dsi.0: Failed to un-initialize panel: -22

So panel's .unprepare callback fails, panel is still marked as perpared.

Then during following turning display on, you see:

[  159.940071] panel-tianma-nt36672a c994000.dsi.0: Skipping prepare of already prepared panel

which breaks e.g. touchscreen in panel follower mode.


🌀 There exists some solution in sdm845-mainline kernel:

But this is not very acceptable upstream, Dmitry didn't like it: https://lore.kernel.org/all/kjlcqkfipct4d54hrtmwdsrifxvuq3qocv5bcmwsufrbxtvvq2@52grw5ijqx4k/

I don't think this is correct. If the driver sends enable commands in
prepare, it should be able to send commands during unprepare too.
... this flag ctx->panel.prepare_prev_first = true;
The flag should also invert the order of post_disable chain. It well
might be that the drm/msm/dsi driver shuts down the DSI link too soon.
Please consider fixing the MSM DSI driver instead.


🌀 The solution in msm8916-mainline kernel is 2 commits:

comment from minecrell:

I think my first commit is fine / „correct“, so you can first try only that one
And see if you get the errors mentioned in the second one. The second one needs a cleaner solution
I think the first commit does that (fixes the msm dsi driver).
If I hadn’t run into the mess with the second commit, I would have submitted it :/

Need to figure out which solution is "better" / upstreamable 🤔

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is neededupstreamingThis should go upstream

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions