пт, 27 лист. 2026 р. о 11:21 Svyatoslav Ryhel <[email protected]> пише: > > пт, 27 лист. 2026 р. о 08:22 Mikko Perttunen <[email protected]> пише: > > > > On Sunday, November 22, 2026 5:18 PM Svyatoslav Ryhel wrote: > > > Parameterize configuration based on bus flags passed from the bridge or > > > panel. The list of supported flags includes now pixel clock polarity, > > > display enable (DE) polarity, and data alignment. > > > > > > Signed-off-by: Svyatoslav Ryhel <[email protected]> > > > --- ... > > > + /* configure DATA order and alignment */ > > > + value = DISP_DATA_FORMAT_DF1P1C | DISP_ORDER_RED_BLUE; > > > + > > > + if (bus_flags & DRM_BUS_FLAG_DATA_LSB_TO_MSB) > > > + value |= DISP_ALIGNMENT_LSB; > > > + else > > > + value &= ~DISP_ALIGNMENT_LSB; > > > > DRM_BUS_FLAG_DATA_LSB_TO_MSB does not seem the correct thing to check > > here. According to the TRM, DISP_ALIGNMENT doesn't swap between LSB/MSB > > bit ordering in a classical way, instead: > > > > // DISP_DATA_ALIGNMENT = 0 (MSB) > > LD[23:0] = {R[1:0], G[1:0], B[1:0], > > R[7:2], G[7:2], B[7:2]}; > > > > // DISP_DATA_ALIGNMENT = 1 (LSB) > > LD[23:0] = {R[7:0], G[7:0], B[7:0]}; > > > > I suppose MSB is more natural for 18-bit panels and LSB for 24-bit > > panels depending on the layout. So the correct value depends on how the > > panel is wired to the SoC on the board. Hence, I think we should > > describe this with a new property in device tree under rgb/dbi or > > endpoint node. Something like 'nvidia,rgb888-wiring' for LSB? And > > document that this means the above kind of wiring - not all RGB888 > > panels use it. > > > > Ugh, why is this so confusing... >
Using 'nvidia,rgb888-wiring' may be confusing since as you mentioned not all RGB888 panels use it. I can add 'nvidia,data-alignment' to rgb properties and set 0 to msb (default) and 1 to lsb, or directly set boolean `nvidia,data-alignment-lsb`. Let me know which is preferred. > > > + > > > tegra_dc_writel(rgb->dc, value, DC_DISP_DISP_INTERFACE_CONTROL); > > > > > > tegra_dc_commit(rgb->dc); > > > -- > > > 2.53.0 > > >
