I'm still new to a lot of this stuff so my knowledge isn't 100% so if
someone sees something wrong with what I'm saying please correct me.
It looks like the DRM (Direct Render Manager) is the kernel module that
manages the display subsystem, at least the display through the LCD pins,
it's loaded when the kernel starts up, Here it is within dmesg:
[ 2.070851] serial serial0: tty port ttyS3 registered
[ 2.078095] omap_rng 48310000.rng: Random Number Generator ver. 20
[ 2.085519] [drm] Initialized vgem 1.0.0 20120112 for virtual device on
minor 0
[ 2.093108] usbcore: registered new interface driver udl
[ 2.102436] at24 0-0050: 32768 byte 24c256 EEPROM, writable, 1
bytes/write
Because the LCD panel is specified within the DTS:
lcd0:panel {
status = "okay";
compatible = "ti,tilcdc,panel";
pinctrl-names = "default";
pinctrl-0 = <&lcd_pins>;
//enable-gpios = <&gpio1 20 GPIO_ACTIVE_HIGH>;
enable-gpios = <&gpio1 20 0>;
backlight = <&lcd_backlight>;
panel-info {
ac-bias = <255>;
ac-bias-intrpt = <0>;
dma-burst-sz = <16>;
bpp = <16>;
/* bpp = <32>; */
fdd = <0x80>;
sync-edge = <0>;
sync-ctrl = <1>;
raster-order = <0>;
fifo-th = <0>;
invert-pxl-clk = <1>;
};
display-timings {
native-mode=<&timing0>;
timing0: 800x480 {
clock-frequency = <45000000>;
hactive = <800>;
vactive = <480>;
vsync-len = <3>;
vfront-porch = <13>;
vback-porch = <32>;
hsync-len = <48>;
hfront-porch = <40>;
hback-porch = <88>;
hsync-active = <1>;
vsync-active = <1>;
de-active = <1>;
pixelclk-active = <1>;
};
};
};
and the TILCDC panel driver is built within the kernel it is also loaded
during boot before the filesystem starts:
[ 24.971896] Bluetooth: HCI UART protocol QCA registered
[ 25.054865] panel panel: found backlight
[ 25.054921] panel panel: found enable GPIO
[ 25.083796] sd 0:0:0:0: Attached scsi generic sg0 type 0
TI's LCD Controller module (TILCDC) plugs into the DRM. When the TILCDC
gets loaded it queries the DRM for available displays (like a panel and/or
HDMI). The kernel will attempt to load TILCDC DRM driver because it is
specified in the DTS under the lcdc node within the am33xx.dtsi file.
lcdc: lcdc@4830e000 {
compatible = "ti,am33xx-tilcdc";
reg = <0x4830e000 0x1000>;
interrupts = <36>;
ti,hwmods = "lcdc";
status = "disabled";
};
(The 'status' field is overridden to 'okay' within my dts file)
When I built the kernel I changed the TILCDC DRM driver to an external
module instead of a built in one. Now instead of the kernel loading the
module while booting it must wait until the the filesystem is loaded before
it can attempt to load the module.
Here is where the kernel loads the TILCDC module
[ 25.100373] OF: graph: no port node found in /ocp/lcdc@4830e000
[ 25.121599] Bluetooth: hci0: change remote baud rate command in firmware
[ 25.177123] usbcore: registered new interface driver cdc_ether
[ 25.196841] OF: graph: no port node found in /ocp/lcdc@4830e000
[ 25.282171] tilcdc 4830e000.lcdc: Check if componentized
[ 25.282191] tilcdc 4830e000.lcdc: Not componentized
[ 25.282199] tilcdc 4830e000.lcdc: Look for remote node
[ 25.282217] OF: graph: no port node found in /ocp/lcdc@4830e000
[ 25.347611] tilcdc 4830e000.lcdc: Return 0!
[ 25.347624] tilcdc 4830e000.lcdc: Found encoders and/or connectors
[ 25.347638] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 25.347643] [drm] No driver support for vblank timestamp query.
[ 25.420388] Console: switching to colour frame buffer device 100x30
[ 25.430403] tilcdc 4830e000.lcdc: fb0: frame buffer device
The kernel knows what modules are in the filesystem because it reads
/lib/module/`uname -r`/modules.* files
cospan@guppy-buddy:/lib/modules/4.14.67+$ ls -l
total 2168
drwxr-xr-x 11 root root 4096 Sep 9 02:18 kernel
-rw-r--r-- 1 root root 583616 Oct 11 01:31 modules.alias
-rw-r--r-- 1 root root 610839 Oct 11 01:31 modules.alias.bin
-rw-r--r-- 1 root root 16162 Oct 11 01:29 modules.builtin
-rw-r--r-- 1 root root 18391 Oct 11 01:31 modules.builtin.bin
-rw-r--r-- 1 root root 172045 Oct 11 01:31 modules.dep
-rw-r--r-- 1 root root 270086 Oct 11 01:31 modules.dep.bin
-rw-r--r-- 1 root root 214 Oct 11 01:31 modules.devname
-rw-r--r-- 1 root root 89017 Oct 11 01:29 modules.order
-rw-r--r-- 1 root root 381 Oct 11 01:31 modules.softdep
-rw-r--r-- 1 root root 192388 Oct 11 01:31 modules.symbols
-rw-r--r-- 1 root root 239831 Oct 11 01:31 modules.symbols.bin
cospan@guppy-buddy:/lib/modules/4.14.67+$
These files are created when you run 'depmod' on the command line. So the
first time I installed the new kernel and modules the LCD didn't work
because I needed to log in over serial and run depmod
I didn't load the modules explicitly because the DTS told the kernel to
load the modules for me whether those modules were built in to the kernel
or as separate modules within the filesystem.
Another way that this could be accomplished is by using udev and writing
some rules that will tell the kernel to load the module when some condition
happens or by explicitly calling modprobe on a kernel module directly.
Again, if I got something wrong let me know.
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/beagleboard/49b6b0fe-a6e1-4c61-8f2a-b518fcd9d7a4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.