for reference, that xlsm file works… sortof. The macros are all broken badly in libreoffice.
The algorithms are;
adjust_Tclk_zero(){
Ths_rqst = G16;
Tclk_prepare = G10;
Tclk_zero = f11;
do {
modResult = (Ths_rqst + Tclk_prepare + Tclk_zero) mod 8;
if (modResult = 0) break;
Tclk_zero++;
} while (modResult != 0);
f11 = Tclk_zero;
}
reset_Tclk_zero(){
G10 = f10;
f11 = If(MOD(If(E11=255, ROUNDUP((E11-D11)*($f$50/100)+D11, 0), ROUNDUP(D11*($f$50/100)+D11,0)),2)=0, If(E11=255, ROUNDUP((E11-D11)*($f$50/100)+D11, 0), ROUNDUP(D11*($f$50/100)+D11,0)), If(E11=255, ROUNDUP((E11-D11)*($f$50/100)+D11, 0), ROUNDUP(D11*($f$50/100)+D11,0))-1);
G11 = If(MOD(($f$16 + $G$10 + $f$11), 8)=0, $f$11, ""INVALID"");
}
Basically works by first reset, then adjust.
reset:
G10 = f10,
Set some meaningless cell, like I11, to =If(MOD(If(E11=255, ROUNDUP((E11-D11)($f$50/100)+D11, 0), ROUNDUP(D11($f$50/100)+D11,0)),2)=0, If(E11=255, ROUNDUP((E11-D11)($f$50/100)+D11, 0), ROUNDUP(D11($f$50/100)+D11,0)), If(E11=255, ROUNDUP((E11-D11)($f$50/100)+D11, 0), ROUNDUP(D11($f$50/100)+D11,0))-1)
Copy the calculated value from I11 into f11
The value of G11 is already fine, just leave it.
Adjust:
Now begin incrementing the value stored in f11 until G4 displays “VALID”.
Now you can copy your timing parameters from B29 through B39 into the panel configuration field labeled “qcom,mdss-dsi-panel-timings”.
Also, I believe that I have identified a reasonable mechanism for calculating horizontal/vertical back/front porch/pulse:
Generate modeline: The Xfree86 Modeline Generator
Paste modeline to video timing calculator: http://www.epanorama.net/faq/vga2rgb/calc.html
Copy results from section 2 and paste to panel configuration.