[Letux-kernel] jz4780 read out LCDC setup for HDMI
Paul Boddie
paul at boddie.org.uk
Thu Jun 4 19:29:30 CEST 2020
On Thursday 4. June 2020 17.18.09 H. Nikolaus Schaller wrote:
>
> I have booted the latest letux-5.7 and now, the lcdc got initialized!
> So maybe something has improved in the DRM subsystem without our activity.
>
> root at letux:~# cat /sys/kernel/debug/regmap/13050000.lcdc0/registers
> 00: 00f00840
This is the configuration register, set up fairly normally.
> 04: 00000003
> 08: 0000000d
These are the sync pulse definitions.
> 0c: 0520026e
These are the "virtual" display dimensions: 1312x622.
> 10: 011b051b
> 14: 0014026c
And these are the horizontal and vertical picture settings: 283-1307 and
20-620, suggesting a resolution of 1044x600, I guess.
> 18: 00000000
> 1c: 00000000
> 20: 00000000
> 24: 00000000
> 28: 00000000
> 2c: 00000000
These should probably all be zero.
> 30: 24002008
This indicates that the LCD controller is enabled. It's the fairly standard
configuration for the controller with end-of-frame interrupts enabled, and so
on.
> 34: 00000004
Here, we see the "FIFO 0" underrun condition, although that occurs in the
3.0.8 kernel, too, from your earlier output. Maybe I shouldn't be so worried
about that.
> 38: 00000000
This should be the frame identifier (see below).
> 3c: 00000000
This should probably be zero.
> 40: 0e2ee000
This is the DMA descriptor #0 physical address.
> 44: 01000000
> 48: deafbead
> 4c: 00096000
And these are the framebuffer physical address, frame identifier and command
(framebuffer size of 614400 words).
> 50: 0007626f
This is the DMA descriptor #1 physical address.
> 54: 01050010
> 58: 2d544d47
> 5c: 00000032
These are the registers affected by descriptor #1, quite possibly not set up
to sensible values.
> root at letux:~#
>
> Still there is no image.
>
> > I did now boot with the Imagination system in Flash memory.
> > It is an 3.0.8-Kernel. And my HDMI monitor works out of the box.
>
> I did boot with both kernel and did run my scripts (using devmem2)
> on both devices. The register values of each kernel are attached.
Thanks for doing this: it may be useful to see what differences there are.
Looking at the 3.0.8 LCD controller registers, there are many familiar things
from the source code (and from the 3.18 sources).
> Main difference for the PHY seems to be in the audio area, but there
> are also some HDMI_IH, HDMI_VP and HDMI_FC registers where I don't
> have any idea what they are about.
IH is interrupt handling, VP is video packetization and FC is frame composer.
Although the latter two are not entirely self-explanatory, I now have some
idea of what they do.
> As mentioned above the LCDC has been initialized (without me
> recognising this first). But register values are completely different.
One thing to note about the 3.0.8 kernel is that it might not be very clever
about picking a display resolution. At the moment, though, the upstream LCD
driver is not likely to be doing anything specific for the JZ4780, and I think
that some of the extra features may be needed to produce a picture via HDMI,
such as the RGB control register. It is also possible that the on-screen
display (OSD) functionality is somehow involved.
Paul
More information about the Letux-kernel
mailing list