Skip to content

Conversation

@z3ntu
Copy link
Contributor

@z3ntu z3ntu commented Oct 14, 2023

The downstream msm-4.9 driver is unconditinally calling mdss_dsi_set_tear_on with command mode panels, replicate the same in the driver generator.

When this doesn't get enabled then the panel doesn't generate any Tearing Effect output signal which is used by MDSS.

See downstream: https://gerrit-public.fairphone.software/plugins/gitiles/kernel/msm-4.9/+/refs/heads/int/13/fp3/drivers/video/fbdev/msm/mdss_dsi.c#1776
This is observed with the following panel: https://gerrit-public.fairphone.software/plugins/gitiles/kernel/msm-4.9/+/refs/heads/int/13/fp3/arch/arm64/boot/dts/qcom/dsi-hx83112b-djn-1080p-cmd.dtsi (seen by the panel being stuck at 30Hz instead of 60Hz)


Draft: Not sure though if this solution is acceptable / good for any cmd mode panel. I'm assuming most already call this during the _on commands.

Also probably we should also call mipi_dsi_dcs_set_tear_off during _off, since downstream also calls this there (see the mdss_dsi.c file above with mdss_dsi_set_tear_off)?

@stephan-gh
Copy link
Member

Not sure though if this solution is acceptable / good for any cmd mode panel. I'm assuming most already call this during the _on commands.

Maybe you can add a check to avoid generating this command twice?

Also probably we should also call mipi_dsi_dcs_set_tear_off during _off, since downstream also calls this there (see the mdss_dsi.c file above with mdss_dsi_set_tear_off)?

Probably yes then...

@z3ntu
Copy link
Contributor Author

z3ntu commented Oct 14, 2023

Sounds like you don't think this is a terrible idea so I'll spend some more effort on making this proper 😉

I see in the msm8953 panel drivers a bunch of panels that do have this call right now so I guess those will be my test subjects.

@MarijnS95
Copy link
Contributor

Yes it is quite often missing but sometimes already part of the panel-on commands, maybe it's unconditionally sent twice and probably doesn't hurt.

The downstream msm-4.9 driver is unconditinally calling
mdss_dsi_set_tear_on with command mode panels, replicate the same in the
driver generator, but only add the call if it hasn't already been
present in the commands, as is seen on some panels.

When this doesn't get enabled then the panel doesn't generate any
Tearing Effect output signal which is used by MDSS.
@z3ntu
Copy link
Contributor Author

z3ntu commented Feb 22, 2025

@stephan-gh I've implemented the requested change, not sure it's implemented great though. I wanted to iterate through the commands and see if DCSCommand.SET_TEAR_ON was present instead of doing this string check, but it seems this is no longer available in the function where I placed the code.

Alternatively we could probably append that command in generate_driver and also re-use the function definition from mipi.py. Let me know.

@z3ntu
Copy link
Contributor Author

z3ntu commented May 23, 2025

@stephan-gh ping

@z3ntu z3ntu marked this pull request as ready for review June 11, 2025 08:58
@stephan-gh
Copy link
Member

@z3ntu Sorry, I missed replying to this PR somehow. What about

Also probably we should also call mipi_dsi_dcs_set_tear_off during _off, since downstream also calls this there (see the mdss_dsi.c file above with mdss_dsi_set_tear_off)?

Here you just seem to have the set_tear_on?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants