drm timing problems in sama5d3 Xplained.

Alex Vazquez avazquez.dev at gmail.com
Mon Sep 5 09:04:51 UTC 2016


Hi All.
I am using DRM in a sama5d3 Xplained with display TM43 and I've found with
the following problem:
I deleted the network interfaces in the device tree for my system to boot
faster. My problem is that now the startup script run before the driver has
loaded correctly.
I explain better:
The startup script begin to appear before the creation of the framebuffer
message appears. (See LogKernel.txt)

atmel-hlcdc-display-controller atmel-hlcdc-dc: fb0:  frame buffer device


1 - I can't use the framebuffer until the message is not displayed. (This
did not matter. I want to use drm.)
2 - DRM don't work fine. If I try to paint on the screen (using planes)
before the message it is created framebuffer appears, nothing appears on
the display.

This problem I can replicate with the demo atmel if I remove network
interfaces in the device tree and adding a startup script that uses drm.

I add the demo with the modified device tree so you can prove that occurs.

https://drive.google.com/file/d/0B3EMwEbIHhkAbDhGMU1BcEVoYkU/view?usp=sharing

You only need to add the startup script in /etc/rcS.d/

#!/bin/sh
> modetest -M atmel-hlcdc -P 26:480x272+0+0 at AR15


I also tested with the latest version of kernel 4.8 RC3 and the problem is
still happening.

Thanks!
Regards!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20160905/1161cb33/attachment.html>
-------------- next part --------------
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.1.0-linux4sam_5.3 (ldesroches at ibiza) (gcc version 5.2.0 (GCC) ) #1 Sat Apr 16 13:00:00 CEST 2016
[    0.000000] CPU: ARMv7 Processor [410fc051] revision 1 (ARMv7), cr=10c53c7d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] Machine model: Atmel SAMA5D3 Xplained TM43xx
[    0.000000] cma: Reserved 64 MiB at 0x28000000
[    0.000000] Memory policy: Data cache writeback
[    0.000000] On node 0 totalpages: 65536
[    0.000000] free_area_init_node: node 0, pgdat c06e20c4, node_mem_map cfdda000
[    0.000000]   Normal zone: 512 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 65536 pages, LIFO batch:15
[    0.000000] CPU: All CPU(s) started in SVC mode.
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Built 1 zonelists in Zone order, mobility grouping off.  Total pages: 65024
[    0.000000] Kernel command line: console=ttyS0,115200 mtdparts=atmel_nand:256k(bootstrap)ro,512k(uboot)ro,256k(env),256k(env_redundant),256k(spare),512k(dtb),6M(kernel)ro,-(ro6
[    0.000000] PID hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Memory: 186824K/262144K available (4985K kernel code, 179K rwdata, 1660K rodata, 192K init, 159K bss, 9784K reserved, 65536K cma-reserved)
[    0.000000] Virtual kernel memory layout:
                   vector  : 0xffff0000 - 0xffff1000   (   4 kB)
                   fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
                   vmalloc : 0xd0800000 - 0xff000000   ( 744 MB)
                   lowmem  : 0xc0000000 - 0xd0000000   ( 256 MB)
                   modules : 0xbf000000 - 0xc0000000   (  16 MB)
                     .text : 0xc0008000 - 0xc0685928   (6647 kB)
                     .init : 0xc0686000 - 0xc06b6000   ( 192 kB)
                     .data : 0xc06b6000 - 0xc06e2ed8   ( 180 kB)
                      .bss : 0xc06e2ed8 - 0xc070ad3c   ( 160 kB)
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] clocksource pit: mask: 0xfffffff max_cycles: 0xfffffff, max_idle_ns: 14479245754 ns
[    0.000000] sched_clock: 32 bits at 100 Hz, resolution 10000000ns, wraps every 21474836475000000ns
[    0.000000] Console: colour dummy device 80x30
[    0.050000] Calibrating delay loop... 351.43 BogoMIPS (lpj=1757184)
[    0.060000] pid_max: default: 32768 minimum: 301
[    0.060000] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.060000] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.060000] CPU: Testing write buffer coherency: ok
[    0.060000] Setting up static identity map for 0x20008200 - 0x20008258
[    0.060000] devtmpfs: initialized
[    0.070000] VFP support v0.3: implementor 41 architecture 2 part 30 variant 5 rev 1
[    0.080000] clocksource jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.080000] pinctrl core: initialized pinctrl subsystem
[    0.080000] NET: Registered protocol family 16
[    0.110000] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.110000] cpuidle: using governor ladder
[    0.110000] cpuidle: using governor menu
[    0.110000] AT91: Detected SoC family: sama5d3
[    0.110000] AT91: Detected SoC: sama5d36, revision 2
[    0.130000] gpio-at91 fffff200.gpio: at address d0818200
[    0.130000] gpio-at91 fffff400.gpio: at address d081a400
[    0.130000] gpio-at91 fffff600.gpio: at address d081c600
[    0.130000] gpio-at91 fffff800.gpio: at address d081e800
[    0.140000] gpio-at91 fffffa00.gpio: at address d0820a00
[    0.140000] pinctrl-at91 ahb:apb:pinctrl at fffff200: initialized AT91 pinctrl driver
[    0.140000] tcb_clksrc: tc0 at 16.000 MHz
[    0.140000] clocksource tcb_clksrc: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 115833966437 ns
[    1.380000] at_hdmac ffffe600.dma-controller: Atmel AHB DMA Controller ( cpy set slave sg-cpy ), 8 channels
[    1.380000] at_hdmac ffffe800.dma-controller: Atmel AHB DMA Controller ( cpy set slave sg-cpy ), 8 channels
[    1.390000] SCSI subsystem initialized
[    1.390000] usbcore: registered new interface driver usbfs
[    1.390000] usbcore: registered new interface driver hub
[    1.390000] usbcore: registered new device driver usb
[    1.390000] at91_i2c f0014000.i2c: using dma0chan0 (tx) and dma0chan1 (rx) for DMA transfers
[    1.390000] at91_i2c f0014000.i2c: AT91 i2c bus driver (hw version: 0x402).
[    1.400000] at91_i2c f0018000.i2c: using dma0chan2 (tx) and dma0chan3 (rx) for DMA transfers
[    1.400000] at91_i2c f0018000.i2c: AT91 i2c bus driver (hw version: 0x402).
[    1.400000] at91_i2c f801c000.i2c: can't use DMA, error -19
[    1.400000] at91_i2c f801c000.i2c: AT91 i2c bus driver (hw version: 0x402).
[    1.400000] media: Linux media interface: v0.10
[    1.400000] Linux video capture interface: v2.00
[    1.400000] Advanced Linux Sound Architecture Driver Initialized.
[    1.410000] Switched to clocksource tcb_clksrc
[    1.450000] NET: Registered protocol family 2
[    1.450000] TCP established hash table entries: 2048 (order: 1, 8192 bytes)
[    1.450000] TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
[    1.450000] TCP: Hash tables configured (established 2048 bind 2048)
[    1.450000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    1.450000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    1.450000] NET: Registered protocol family 1
[    1.450000] RPC: Registered named UNIX socket transport module.
[    1.450000] RPC: Registered udp transport module.
[    1.450000] RPC: Registered tcp transport module.
[    1.450000] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    1.450000] futex hash table entries: 256 (order: -1, 3072 bytes)
[    1.460000] io scheduler noop registered (default)
[    1.480000] f001c000.serial: ttyS1 at MMIO 0xf001c000 (irq = 30, base_baud = 4125000) is a ATMEL_SERIAL
[    1.480000] f0020000.serial: ttyS2 at MMIO 0xf0020000 (irq = 31, base_baud = 4125000) is a ATMEL_SERIAL
[    1.480000] f0024000.serial: ttyS5 at MMIO 0xf0024000 (irq = 32, base_baud = 4125000) is a ATMEL_SERIAL
[    1.480000] ffffee00.serial: ttyS0 at MMIO 0xffffee00 (irq = 43, base_baud = 8250000) is a ATMEL_SERIAL
[    1.860000] console [ttyS0] enabled
[    1.870000] [drm] Initialized drm 1.1.0 20060810
[    1.880000] brd: module loaded
[    1.900000] loop: module loaded
[    1.900000] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    1.910000] [drm] No driver support for vblank timestamp query.
[    1.910000] atmel-hlcdc-display-controller atmel-hlcdc-dc: failed to create HLCDC outputs: -517
[    1.920000] atmel-hlcdc-display-controller atmel-hlcdc-dc: failed to initialize mode setting
[    1.930000] atmel_nand_nfc 70000000.nfc: NFC is probed.
[    1.940000] atmel_nand 60000000.nand: Use On Flash BBT
[    1.940000] atmel_nand 60000000.nand: Using dma0chan4 for DMA transfers.
[    1.950000] nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xda
[    1.950000] nand: Micron MT29F2G08ABAEAWP
[    1.960000] nand: 256 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    1.960000] atmel_nand 60000000.nand: minimum ECC: 4 bits in 512 bytes
[    1.970000] atmel_nand 60000000.nand: Initialize PMECC params, cap: 4, sector: 512
[    1.970000] atmel_nand 60000000.nand: Using NFC Sram read 
[    1.980000] Bad block table found at page 131008, version 0x01
[    1.980000] Bad block table found at page 130944, version 0x01
[    1.990000] 8 cmdlinepart partitions found on MTD device atmel_nand
[    1.990000] Creating 8 MTD partitions on "atmel_nand":
[    2.000000] 0x000000000000-0x000000040000 : "bootstrap"
[    2.000000] 0x000000040000-0x0000000c0000 : "uboot"
[    2.010000] 0x0000000c0000-0x000000100000 : "env"
[    2.020000] 0x000000100000-0x000000140000 : "env_redundant"
[    2.020000] 0x000000140000-0x000000180000 : "spare"
[    2.030000] 0x000000180000-0x000000200000 : "dtb"
[    2.040000] 0x000000200000-0x000000800000 : "kernel"
[    2.040000] 0x000000800000-0x000010000000 : "rootfs"
[    2.050000] atmel_spi f0004000.spi: version: 0x213
[    2.050000] atmel_spi f0004000.spi: Using dma0chan5 (tx) and dma0chan6 (rx) for DMA transfers
[    2.060000] atmel_spi f0004000.spi: Atmel SPI Controller at 0xf0004000 (irq 26)
[    2.070000] atmel_spi f8008000.spi: version: 0x213
[    2.070000] atmel_spi f8008000.spi: Using dma1chan0 (tx) and dma1chan1 (rx) for DMA transfers
[    2.080000] atmel_spi f8008000.spi: Atmel SPI Controller at 0xf8008000 (irq 35)
[    2.090000] CAN device driver interface
[    2.090000] at91_can f000c000.can: device registered (reg_base=d089e000, irq=49)
[    2.100000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    2.110000] ehci-atmel: EHCI Atmel driver
[    2.110000] atmel-ehci 700000.ehci: EHCI Host Controller
[    2.120000] atmel-ehci 700000.ehci: new USB bus registered, assigned bus number 1
[    2.120000] atmel-ehci 700000.ehci: irq 53, io mem 0x00700000
[    2.150000] atmel-ehci 700000.ehci: USB 2.0 started, EHCI 1.00
[    2.150000] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    2.160000] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.160000] usb usb1: Product: EHCI Host Controller
[    2.160000] usb usb1: Manufacturer: Linux 4.1.0-linux4sam_5.3 ehci_hcd
[    2.170000] usb usb1: SerialNumber: 700000.ehci
[    2.170000] hub 1-0:1.0: USB hub found
[    2.180000] hub 1-0:1.0: 3 ports detected
[    2.180000] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    2.190000] ohci-atmel: OHCI Atmel driver
[    2.190000] at91_ohci 600000.ohci: USB Host Controller
[    2.190000] at91_ohci 600000.ohci: new USB bus registered, assigned bus number 2
[    2.200000] at91_ohci 600000.ohci: irq 53, io mem 0x00600000
[    2.260000] usb usb2: New USB device found, idVendor=1d6b, idProduct=0001
[    2.260000] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.270000] usb usb2: Product: USB Host Controller
[    2.270000] usb usb2: Manufacturer: Linux 4.1.0-linux4sam_5.3 ohci_hcd
[    2.280000] usb usb2: SerialNumber: at91
[    2.280000] hub 2-0:1.0: USB hub found
[    2.290000] hub 2-0:1.0: 3 ports detected
[    2.290000] usbcore: registered new interface driver cdc_acm
[    2.300000] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[    2.300000] usbcore: registered new interface driver usb-storage
[    2.310000] usbcore: registered new interface driver usbserial
[    2.310000] usbcore: registered new interface driver usbserial_generic
[    2.320000] usbserial: USB Serial support registered for generic
[    2.320000] usbcore: registered new interface driver ftdi_sio
[    2.330000] usbserial: USB Serial support registered for FTDI USB Serial Device
[    2.330000] usbcore: registered new interface driver pl2303
[    2.340000] usbserial: USB Serial support registered for pl2303
[    2.350000] qt1070 1-001b: AT42QT1070 firmware version 15
[    2.830000] input: AT42QT1070 QTouch Sensor as /devices/soc0/ahb/ahb:apb/f0018000.i2c/i2c-1/1-001b/input/input0
[    2.840000] atmel_mxt_ts 1-004a: __mxt_read_reg: i2c transfer failed (-121)
[    2.840000] atmel_mxt_ts 1-004a: mxt_bootloader_read: i2c recv failed (-121)
[    2.850000] atmel_mxt_ts 1-004a: Trying alternate bootloader address
[    2.860000] atmel_mxt_ts 1-004a: mxt_bootloader_read: i2c recv failed (-121)
[    3.070000] atmel_mxt_ts 1-004a: Try a second time to init maxtouch
[    3.110000] rtc rtc0: alarm rollover not handled
[    3.120000] rtc rtc0: invalid alarm value: 1900-1-1 0:0:0
[    3.120000] atmel_mxt_ts 1-004a: Direct firmware load for maxtouch.cfg failed with error -2
[    3.130000] at91_rtc fffffeb0.rtc: rtc core: registered fffffeb0.rtc as rtc0
[    3.130000] at91_rtc fffffeb0.rtc: AT91 Real Time Clock driver.
[    3.140000] i2c /dev entries driver
[    3.140000] input: Atmel maXTouch Touchscreen as /devices/soc0/ahb/ahb:apb/f0018000.i2c/i2c-1/1-004a/input/input1
[    3.150000] atmel_mxt_ts 1-004a: Family: 130 Variant: 36 Firmware V2.1.AA Objects: 24
[    3.160000] AT91: Starting after user reset
[    3.170000] sdhci: Secure Digital Host Controller Interface driver
[    3.170000] sdhci: Copyright(c) Pierre Ossman
[    3.180000] atmel_mci f0000000.mmc: version: 0x505
[    3.180000] atmel_mci f0000000.mmc: using dma0chan7 for DMA transfers
[    3.230000] atmel_mci f0000000.mmc: Atmel MCI controller at 0xf0000000 irq 25, 1 slots
[    3.230000] atmel_mci f8000000.mmc: version: 0x505
[    3.240000] atmel_mci f8000000.mmc: using dma1chan2 for DMA transfers
[    3.280000] atmel_mci f8000000.mmc: Atmel MCI controller at 0xf8000000 irq 34, 1 slots
[    3.280000] sdhci-pltfm: SDHCI platform and OF driver helper
[    3.290000] ledtrig-cpu: registered to indicate activity on CPUs
[    3.290000] atmel_aes f8038000.aes: version: 0x135
[    3.300000] atmel_aes f8038000.aes: Atmel AES - Using dma1chan3, dma1chan4 for DMA transfers
[    3.310000] atmel_sha f8034000.sha: version: 0x410
[    3.310000] atmel_sha f8034000.sha: using dma1chan5 for DMA transfers
[    3.320000] atmel_sha f8034000.sha: Atmel SHA1/SHA256/SHA224/SHA384/SHA512
[    3.330000] atmel_tdes f803c000.tdes: version: 0x701
[    3.330000] atmel_tdes f803c000.tdes: using dma1chan6, dma1chan7 for DMA transfers
[    3.340000] atmel_tdes f803c000.tdes: Atmel DES/TDES
[    3.340000] usbcore: registered new interface driver usbhid
[    3.350000] usbhid: USB HID core driver
[    3.350000] iio iio:device0: Resolution used: 12 bits
[    3.360000] iio iio:device0: ADC Touch screen is disabled.
[    3.370000] NET: Registered protocol family 17
[    3.370000] can: controller area network core (rev 20120528 abi 9)
[    3.380000] NET: Registered protocol family 29
[    3.380000] can: raw protocol (rev 20120528)
[    3.380000] can: broadcast manager protocol (rev 20120528 t)
[    3.390000] can: netlink gateway (rev 20130117) max_hops=1
[    3.400000] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    3.400000] [drm] No driver support for vblank timestamp query.
[    3.410000] atmel-hlcdc-display-controller atmel-hlcdc-dc: DRM device successfully registered
[    3.420000] ubi0: attaching mtd7
[    4.050000] random: nonblocking pool is initialized
[    4.400000] ubi0: scanning is finished
[    4.410000] ubi0: attached mtd7 (name "rootfs", size 248 MiB)
[    4.420000] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[    4.420000] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[    4.430000] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
[    4.430000] ubi0: good PEBs: 1980, bad PEBs: 4, corrupted PEBs: 0
[    4.440000] ubi0: user volume: 1, internal volumes: 1, max. volumes count: 128
[    4.440000] ubi0: max/mean erase counter: 2/0, WL threshold: 4096, image sequence number: 1326480871
[    4.450000] ubi0: available PEBs: 0, total reserved PEBs: 1980, PEBs reserved for bad PEB handling: 36
[    4.460000] ubi0: background thread "ubi_bgt0d" started, PID 655
[    4.470000] input: gpio_keys as /devices/soc0/gpio_keys/input/input2
[    4.470000] at91_rtc fffffeb0.rtc: setting system clock to 2016-04-16 11:04:23 UTC (1460804663)
[    4.490000] mmc0-card-supply: disabling
[    4.490000] panel-power-supply: disabling
[    4.490000] ALSA device list:
[    4.490000]   No soundcards found.
[    4.500000] UBIFS (ubi0:0): background thread "ubifs_bgt0_0" started, PID 664
[    4.530000] UBIFS (ubi0:0): recovery needed
[    4.600000] UBIFS (ubi0:0): recovery completed
[    4.600000] UBIFS (ubi0:0): UBIFS: mounted UBI device 0, volume 0, name "rootfs"
[    4.610000] UBIFS (ubi0:0): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[    4.620000] UBIFS (ubi0:0): FS size: 244936704 bytes (233 MiB, 1929 LEBs), journal size 9023488 bytes (8 MiB, 72 LEBs)
[    4.630000] UBIFS (ubi0:0): reserved for root: 0 bytes (0 KiB)
[    4.630000] UBIFS (ubi0:0): media format: w4/r0 (latest is w4/r0), UUID 379EA0A8-80A6-4EE4-97C9-D7B52727962B, small LPT model
[    4.640000] VFS: Mounted root (ubifs filesystem) on device 0:14.
[    4.650000] devtmpfs: mounted
[    4.650000] Freeing unused kernel memory: 192K (c0686000 - c06b6000)
************** Launch modetest -M atmel-hlcdc -P 26:480x272+0+0 at AR15 *************************
[    7.420000] atmel-hlcdc-display-controller atmel-hlcdc-dc: fb0:  frame buffer device
[    7.420000] atmel-hlcdc-display-controller atmel-hlcdc-dc: registered panic notifier
[   38.860000] udevd[707]: starting version 182
[   39.140000] atmel_usba_udc 500000.gadget: MMIO registers at 0xf8030000 mapped at d0b10000
[   39.140000] atmel_usba_udc 500000.gadget: FIFO at 0x00500000 mapped at d2200000
[   40.130000] ubi0 error: ubi_open_volume: cannot open device 0, volume 0, error -16
[   40.650000] g_serial gadget: Gadget Serial v2.4
[   40.650000] g_serial gadget: g_serial ready
[   41.020000] g_serial gadget: high-speed config #2: CDC ACM config


More information about the dri-devel mailing list