On Tue, Nov 24, 2026 at 04:38:43PM +0200, Tomi Valkeinen wrote: > I felt that approach was a bit odd (and if I recall right, failed with > my OLDI panel), and in my tidss version I just used the clock rate > directly from the clk_get_rate() (see dispc_vp_readout_mode):
Thanks, good to know I'm not the only one it didn't work for. v2 does the same: the functional clock rate divided by the LCDC divider, rounded to the nearest kHz. What I added is a 1% tolerance on the pixel clock in tilcdc's CRTC compare hook. When tilcdc_crtc_set_clk() can't get the exact rate, the clock read back after a commit differs from the mode by a few kHz: here, asking for 16941 kHz gets 16940.69 kHz from the display PLL. Out of 20 pixel clocks between 16.9 and 45 MHz, four were off by up to 0.015% and the exact comparison reported them as mismatches. Since you know tilcdc: do you know why tilcdc_crtc_mode_fixup() flips the HSYNC polarity? Its comment says the LCDC aligns VS on the second edge of HS, but I couldn't find that in the AM335x TRM, where IHS directly sets the polarity of the HSYNC pin. As it is, a panel needing an active low HSYNC has to leave hsync-active out of its DT timings. Thanks, Màxim
