[Letux-kernel] jz4780 read out LCDC setup for HDMI
Paul Boddie
paul at boddie.org.uk
Sat Jul 18 22:57:14 CEST 2020
On Saturday, 18 July 2020 20:03:35 CEST H. Nikolaus Schaller wrote:
>
> Here is a hdmi-5.8-rc5.txt created on the latest kernel but by the same
> script.
> If you do a diff to the working hdmi-3.0.8.txt you may check for significant
> and insignificant differences. Most worrying to me is that the LCDC has some
> quite different parameters. Using exactly the same panel it should be
> almost the same...
Yes, there are some curious differences.
The LCD configuration register has negative hsync polarity in the 5.8-rc5
kernel register dump, presumably because I didn't set the appropriate mode
flags to assert positive hsync and negative vsync. Looking for guidance, I
found the drivers/gpu/drm/bridge/nwl-dsi.c file that uses a mode_fixup
operation to introduce these settings. And there was also a way of setting the
bus flags for pixel clock polarity. So, thanks to our friends at NXP and
Purism for the examples!
I'm not going to claim that the other register differences are not important,
but there can be some legitimate variation. One thing that indicates that the
peripheral is active in the 5.8-rc5 configuration is the presence of a value
in the JZ_REG_LCD_IID register. Here, it is using one of the values that I
have set in the driver for the JZ_REG_LCD_FID0 and JZ_REG_LCD_FID1 registers,
indicating that a frame successfully caused an interrupt condition. I don't
think the 3.0.8 kernel uses interrupts in the same way, and that influences
the control register and various other registers.
Testing some changes to the mode and bus flags doesn't give a picture, and
although the modetest utility claims that the "CRTC" uses positive hsync and
vsync, a message I sent to various driver maintainers a while ago also
indicated this. Only inspection of the registers might indicate success or
otherwise, here.
Anyway, I just pushed these most recent changes.
Paul
More information about the Letux-kernel
mailing list