Corruption on dual-DSI dual-DSC CMD-mode panels
As requested by @abhinavk in #34 (comment 2087098), here's an issue to track the progress around supporting DSC on bonded DSI (2:2:2
toplogy).
This is on the Sony Xperia 1 III (sm8350-sony-xperia-sagami-pdx215.dts
) with ana6707_amb650yl01
panel. It hosts 4 modes, 1644x3840
and 1096x2560
resolutions, both at 60 and 120Hz refresh rate. 1096x2560@60
is used in the dumps below.
For completeness the Xperia 1 IV (sm8450) has a mostly identical panel, but it has not been tested yet: https://github.com/sonyxperiadev/kernel-copyleft-dts/blob/64.1.A.0.xxx/display-devicetree/display/dsi-panel-ana6707_amb650yl01-uhd-pdx223.dtsi
Together with this devcoredump:
Most notably:
- Only the left encoder seems to emit data, the right side of the panel remains static and corrupted;
- Every 5th-or-so slice seems to be interpreted correctly by the panel and shows readable framebuffer consle.
For this to work many kernel changes are needed that I am working towards upstreaming, as long as we can figure out this last issue which is likely a misconfiguration of the DSC or DSI block(s). They are spread far and wide on a massive development branch, but according to @abhinav there was no need to spend time sorting these out and pointing to a clean branch containing them. Instead, if someone (from Qcom) can help me validate and hopefully pin-point a register issue in the provided devcoredump, I will work towards cleaning, publishing and upstreaming these patches. The current work-in-progress is available at https://github.com/somainline/linux/commits/marijn/panel-exclusives.
Non-exhaustive list of what has already been done to support DSC on dual-DSI:
- Better support for active-CTL (both architectural as well as register programming), which is a combination of my changes on top of those from @lumag;
- Replacement of hardcoded 2:2:1 topology codepaths to also support this 2:2:2 topology (and 1:1:1 for e.g. the FairPhone 5 that @lucaweiss is working on);
- Proper disablement of DSC multiplex mode (while retaining split-panel) when using bonded-DSI with multiple DSC encoders;
- Boilerplate to support passing only half the (DSC) width to both DSI encoders, so that their math for clocks and number of slices/pixels to send remains correct.
For example, over the width of this panel 1096 pixels are sent in two slices. However, because there are two encoders, both panels only see 512 pixels with a slice width of 1 (this has been confirmed with a downstream kernel).