Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rockchip-drm display-subsystem: failed to bind ff960000.mipi #1

Closed
rvdgracht opened this issue Nov 15, 2017 · 41 comments
Closed

rockchip-drm display-subsystem: failed to bind ff960000.mipi #1

rvdgracht opened this issue Nov 15, 2017 · 41 comments
Assignees
Labels

Comments

@rvdgracht
Copy link

rvdgracht commented Nov 15, 2017

When I use your "Quick and (Very) Dirty installation method" on my ASUS tinkerboard, and reboot, the board hangs during kernel load.

I've tried your latest release: v4.14.0-rc8 and v1.13 but both result in the same situation.
I'm using a 1024x600 lcd connected through hdmi (no camera).

This is my bootlog:

Model: Tinker-RK3288
DRAM: 2 GiB
MMC: dwmmc@ff0c0000: 1, dwmmc@ff0f0000: 0
*** Warning - bad CRC, using default environment

In: serial
Out: serial
Err: serial
Model: Tinker-RK3288
Net: eth0: ethernet@ff290000
Hit any key to stop autoboot: 0
Card did not respond to voltage select!
mmc_init: -95, time 2012
switch to partitions #0, OK
mmc1 is current device
Scanning mmc 1:1...
Found /extlinux/extlinux.conf
Retrieving file: /extlinux/extlinux.conf
reading /extlinux/extlinux.conf
168 bytes read in 4 ms (41 KiB/s)
Retrieving file: /hw_intf.conf
reading /hw_intf.conf
304 bytes read in 4 ms (74.2 KiB/s)
hw_conf.valid = 1
hw_conf.i2c1 = 1
hw_conf.i2c4 = 1
hw_conf.spi2 = 1
hw_conf.pwm2 = 1
hw_conf.pwm3 = 1
hw_conf.spi0 = 0
hw_conf.uart2 = 0
hw_conf.uart3 = 1
hw_conf.uart4 = 1
hw_conf.pcm = 1
hw_conf.uart1 = 1
hw_conf.dtoverlay = 0
hw_conf.dtparam = 0
1: kernel-4.4
Retrieving file: /zImage
reading /zImage
8039104 bytes read in 383 ms (20 MiB/s)
user do not assign the rootfs path, append it => sd card boot
append: earlyprintk splash plymouth.ignore-serial-consoles console=ttyS1,115200n8 rw init=/sbin/init uboot_version=2017.07-g0d53220 root=/dev/mmcblk0p2
Retrieving file: /rk3288-tinker.dtb
reading /rk3288-tinker.dtb
41048 bytes read in 8 ms (4.9 MiB/s)
libfdt fdt_path_offset() returned FDT_ERR_BADMAGIC
libfdt fdt_path_offset() returned FDT_ERR_BADMAGIC

Flattened Device Tree blob at 01f00000

Booting using the fdt blob at 0x1f00000
Loading Device Tree to 0fefc000, end 0fffefff ... OK

Starting kernel ...

[ 0.000000] Booting Linux on physical CPU 0x500
[ 0.000000] Linux version 4.13.0-RockMyy-XIII (gamer@tachibana) (gcc version 4.9.3 (Gentoo 4.9.3 p1.5, pie-0.6.4)) #1 SMP PREEMPT Mon Sep 4 22:10:50 UTC 2017
[ 0.000000] CPU: ARMv7 Processor [410fc0d1] revision 1 (ARMv7), cr=10c5387d
[ 0.000000] CPU: div instructions available: patching division code
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] OF: fdt: Machine model: Rockchip RK3288 Tinker Board
[ 0.000000] Memory policy: Data cache writealloc
[ 0.000000] percpu: Embedded 17 pages/cpu @eef91000 s40536 r8192 d20904 u69632
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 522752
[ 0.000000] Kernel command line: earlyprintk splash plymouth.ignore-serial-consoles console=ttyS1,115200n8 rw init=/sbin/init uboot_version=2017.07-g0d53220 root=/dev/mmcblk0p2
[ 0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
[ 0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
[ 0.000000] Memory: 2056412K/2097152K available (12288K kernel code, 957K rwdata, 3232K rodata, 1024K init, 4659K bss, 40740K reserved, 0K cma-reserved, 1310720K highmem)
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[ 0.000000] fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
[ 0.000000] vmalloc : 0xf0800000 - 0xff800000 ( 240 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xf0000000 ( 768 MB)
[ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
[ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
[ 0.000000] .text : 0xc0008000 - 0xc0d00000 (13280 kB)
[ 0.000000] .init : 0xc1100000 - 0xc1200000 (1024 kB)
[ 0.000000] .data : 0xc1200000 - 0xc12ef5c8 ( 958 kB)
[ 0.000000] .bss : 0xc12fc004 - 0xc1788d74 (4660 kB)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[ 0.000000] Preemptible hierarchical RCU implementation.
[ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[ 0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (phys).
[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[ 0.000007] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[ 0.000025] Switching to timer-based delay loop, resolution 41ns
[ 0.001824] Console: colour dummy device 80x30
[ 0.001858] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=24000)
[ 0.001879] pid_max: default: 32768 minimum: 301
[ 0.001969] Security Framework initialized
[ 0.001984] Yama: becoming mindful.
[ 0.002052] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.002073] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.002787] CPU: Testing write buffer coherency: ok
[ 0.003112] CPU0: thread -1, cpu 0, socket 5, mpidr 80000500
[ 0.006939] Setting up static identity map for 0x100000 - 0x100060
[ 0.008943] Hierarchical SRCU implementation.
[ 0.013049] smp: Bringing up secondary CPUs ...
[ 0.021494] CPU1: thread -1, cpu 1, socket 5, mpidr 80000501
[ 0.029695] CPU2: thread -1, cpu 2, socket 5, mpidr 80000502
[ 0.037901] CPU3: thread -1, cpu 3, socket 5, mpidr 80000503
[ 0.038035] smp: Brought up 1 node, 4 CPUs
[ 0.038065] SMP: Total of 4 processors activated (192.00 BogoMIPS).
[ 0.038076] CPU: All CPU(s) started in SVC mode.
[ 0.039658] devtmpfs: initialized
[ 0.053547] VFP support v0.3: implementor 41 architecture 3 part 30 variant d rev 0
[ 0.053869] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275000 ns
[ 0.053897] futex hash table entries: 1024 (order: 4, 65536 bytes)
[ 0.054239] xor: measuring software checksum speed
[ 0.064128] arm4regs : 1044.000 MB/sec
[ 0.074237] 8regs : 808.000 MB/sec
[ 0.084350] 32regs : 804.000 MB/sec
[ 0.084364] xor: using function: arm4regs (1044.000 MB/sec)
[ 0.084382] pinctrl core: initialized pinctrl subsystem
[ 0.085297] random: get_random_u32 called from bucket_table_alloc+0x1d8/0x248 with crng_init=0
[ 0.085483] NET: Registered protocol family 16
[ 0.086271] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.088197] cpuidle: using governor ladder
[ 0.088250] cpuidle: using governor menu
[ 0.089341] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[ 0.089357] hw-breakpoint: maximum watchpoint size is 4 bytes.
[ 0.174978] raid6: int32x1 gen() 89 MB/s
[ 0.191904] raid6: int32x1 xor() 105 MB/s
[ 0.209443] raid6: int32x2 gen() 140 MB/s
[ 0.226351] raid6: int32x2 xor() 115 MB/s
[ 0.243899] raid6: int32x4 gen() 113 MB/s
[ 0.260793] raid6: int32x4 xor() 101 MB/s
[ 0.278256] raid6: int32x8 gen() 121 MB/s
[ 0.295415] raid6: int32x8 xor() 97 MB/s
[ 0.295429] raid6: using algorithm int32x2 gen() 140 MB/s
[ 0.295440] raid6: .... xor() 115 MB/s, rmw enabled
[ 0.295450] raid6: using intx1 recovery algorithm
[ 0.297163] iommu: Adding device ff930000.vop to group 0
[ 0.297279] iommu: Adding device ff940000.vop to group 1
[ 0.297441] iommu: Adding device ff9c0000.hevc-service to group 2
[ 0.297583] iommu: Adding device ff9a0000.vpu-service to group 3
[ 0.299541] vgaarb: loaded
[ 0.300047] SCSI subsystem initialized
[ 0.300336] usbcore: registered new interface driver usbfs
[ 0.300456] usbcore: registered new interface driver hub
[ 0.300579] usbcore: registered new device driver usb
[ 0.300715] media: Linux media interface: v0.10
[ 0.300778] Linux video capture interface: v2.00
[ 0.300853] pps_core: LinuxPPS API ver. 1 registered
[ 0.300866] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti giometti@linux.it
[ 0.300894] PTP clock support registered
[ 0.301424] Advanced Linux Sound Architecture Driver Initialized.
[ 0.302140] Bluetooth: Core ver 2.22
[ 0.302198] NET: Registered protocol family 31
[ 0.302211] Bluetooth: HCI device and connection manager initialized
[ 0.302230] Bluetooth: HCI socket layer initialized
[ 0.302264] Bluetooth: L2CAP socket layer initialized
[ 0.302313] Bluetooth: SCO socket layer initialized
[ 0.303689] clocksource: Switched to clocksource arch_sys_counter
[ 0.416803] FS-Cache: Loaded
[ 0.417067] CacheFiles: Loaded
[ 0.433647] NET: Registered protocol family 2
[ 0.434453] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
[ 0.434572] TCP bind hash table entries: 8192 (order: 5, 163840 bytes)
[ 0.435205] TCP: Hash tables configured (established 8192 bind 8192)
[ 0.435338] UDP hash table entries: 512 (order: 2, 24576 bytes)
[ 0.435397] UDP-Lite hash table entries: 512 (order: 2, 24576 bytes)
[ 0.435658] NET: Registered protocol family 1
[ 0.436283] RPC: Registered named UNIX socket transport module.
[ 0.436300] RPC: Registered udp transport module.
[ 0.436312] RPC: Registered tcp transport module.
[ 0.436323] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.437885] hw perfevents: enabled with armv7_cortex_a12 PMU driver, 7 counters available
[ 0.440218] Initialise system trusted keyrings
[ 0.440399] workingset: timestamp_bits=30 max_order=19 bucket_order=0
[ 0.451536] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.453160] FS-Cache: Netfs 'nfs' registered for caching
[ 0.453844] NFS: Registering the id_resolver key type
[ 0.453884] Key type id_resolver registered
[ 0.453897] Key type id_legacy registered
[ 0.453921] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[ 0.453940] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[ 0.455489] Key type cifs.spnego registered
[ 0.455519] Key type cifs.idmap registered
[ 0.455537] ntfs: driver 2.1.32 [Flags: R/W].
[ 0.456222] fuse init (API version 7.26)
[ 0.457627] JFS: nTxBlock = 8192, nTxLock = 65536
[ 0.464138] SGI XFS with security attributes, no debug enabled
[ 0.466980] random: fast init done
[ 0.472710] NET: Registered protocol family 38
[ 0.472897] Key type asymmetric registered
[ 0.472913] Asymmetric key parser 'x509' registered
[ 0.472994] bounce: pool size: 64 pages
[ 0.473070] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246)
[ 0.473086] io scheduler noop registered
[ 0.473099] io scheduler deadline registered
[ 0.473145] io scheduler cfq registered (default)
[ 0.473157] io scheduler mq-deadline registered
[ 0.473169] io scheduler kyber registered
[ 0.481588] dma-pl330 ff250000.dma-controller: Loaded driver for PL330 DMAC-241330
[ 0.481610] dma-pl330 ff250000.dma-controller: DBUFF-128x8bytes Num_Chans-8 Num_Peri-20 Num_Events-16
[ 0.482670] dma-pl330 ffb20000.dma-controller: Loaded driver for PL330 DMAC-241330
[ 0.482724] dma-pl330 ffb20000.dma-controller: DBUFF-64x8bytes Num_Chans-5 Num_Peri-6 Num_Events-10
[ 0.483461] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[ 0.486113] ff180000.serial: ttyS0 at MMIO 0xff180000 (irq = 38, base_baud = 1500000) is a 16550A
[ 0.487239] ff190000.serial: ttyS1 at MMIO 0xff190000 (irq = 39, base_baud = 1500000) is a 16550A
[ 1.432272] console [ttyS1] enabled
[ 1.437300] ff1b0000.serial: ttyS3 at MMIO 0xff1b0000 (irq = 40, base_baud = 1500000) is a 16550A
[ 1.448357] ff1c0000.serial: ttyS2 at MMIO 0xff1c0000 (irq = 41, base_baud = 1500000) is a 16550A
[ 1.464421] rockchip-drm display-subsystem: bound ff930000.vop (ops 0xc0d7eda8)
[ 1.473174] rockchip-drm display-subsystem: bound ff940000.vop (ops 0xc0d7eda8)
[ 1.481477] rockchip-drm display-subsystem: failed to bind ff980000.hdmi (ops 0xc0d801e8): -517
[ 1.491585] rockchip-drm display-subsystem: master bind failed: -517
[ 1.499071] usbcore: registered new interface driver udl
[ 1.508851] brd: module loaded
[ 1.523245] loop: module loaded
[ 1.527490] zram: Added device: zram0
[ 1.531704] lkdtm: No crash points registered, enable through debugfs
[ 1.542582] libphy: Fixed MDIO Bus: probed
[ 1.547209] tun: Universal TUN/TAP device driver, 1.6
[ 1.554594] rk_gmac-dwmac ff290000.ethernet: PTP uses main clock
[ 1.561443] rk_gmac-dwmac ff290000.ethernet: phy regulator is not available yet, deferred probing
[ 1.572337] PPP generic driver version 2.4.2
[ 1.577773] usbcore: registered new interface driver rt2500usb
[ 1.584407] usbcore: registered new interface driver rt73usb
[ 1.590855] usbcore: registered new interface driver rt2800usb
[ 1.597500] usbcore: registered new interface driver rndis_wlan
[ 1.604157] pegasus: v0.9.3 (2013/04/25), Pegasus/Pegasus II USB Ethernet driver
[ 1.612529] usbcore: registered new interface driver pegasus
[ 1.618957] usbcore: registered new interface driver rtl8150
[ 1.625393] usbcore: registered new interface driver r8152
[ 1.631633] usbcore: registered new interface driver asix
[ 1.637775] usbcore: registered new interface driver ax88179_178a
[ 1.644720] usbcore: registered new interface driver cdc_ether
[ 1.651340] usbcore: registered new interface driver dm9601
[ 1.657718] usbcore: registered new interface driver smsc75xx
[ 1.664255] usbcore: registered new interface driver smsc95xx
[ 1.670781] usbcore: registered new interface driver net1080
[ 1.677211] usbcore: registered new interface driver rndis_host
[ 1.683933] usbcore: registered new interface driver MOSCHIP usb-ethernet driver
[ 1.692337] usbcore: registered new interface driver cdc_ncm
[ 1.698770] usbcore: registered new interface driver cdc_mbim
[ 1.705608] dwc2 ff540000.usb: ff540000.usb supply vusb_d not found, using dummy regulator
[ 1.714997] dwc2 ff540000.usb: ff540000.usb supply vusb_a not found, using dummy regulator
[ 1.827835] dwc2 ff540000.usb: DWC OTG Controller
[ 1.833174] dwc2 ff540000.usb: new USB bus registered, assigned bus number 1
[ 1.841151] dwc2 ff540000.usb: irq 46, io mem 0xff540000
[ 1.847446] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[ 1.855083] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 1.863193] usb usb1: Product: DWC OTG Controller
[ 1.868484] usb usb1: Manufacturer: Linux 4.13.0-RockMyy-XIII dwc2_hsotg
[ 1.876006] usb usb1: SerialNumber: ff540000.usb
[ 1.882070] hub 1-0:1.0: USB hub found
[ 1.886358] hub 1-0:1.0: 1 port detected
[ 1.891591] dwc2 ff580000.usb: ff580000.usb supply vusb_d not found, using dummy regulator
[ 1.901022] dwc2 ff580000.usb: ff580000.usb supply vusb_a not found, using dummy regulator
[ 2.229754] dwc2 ff580000.usb: dwc2_check_param_tx_fifo_sizes: Invalid parameter g-tx-fifo-size, setting to default average
[ 2.242268] dwc2 ff580000.usb: EPs: 10, dedicated fifos, 972 entries in SPRAM
[ 2.250915] dwc2 ff580000.usb: DWC OTG Controller
[ 2.256249] dwc2 ff580000.usb: new USB bus registered, assigned bus number 2
[ 2.264191] usb 1-1: new high-speed USB device number 2 using dwc2
[ 2.271325] dwc2 ff580000.usb: irq 47, io mem 0xff580000
[ 2.277528] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
[ 2.285162] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 2.293270] usb usb2: Product: DWC OTG Controller
[ 2.298560] usb usb2: Manufacturer: Linux 4.13.0-RockMyy-XIII dwc2_hsotg
[ 2.306081] usb usb2: SerialNumber: ff580000.usb
[ 2.312173] hub 2-0:1.0: USB hub found
[ 2.316458] hub 2-0:1.0: 1 port detected
[ 2.322978] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 2.330377] ehci-pci: EHCI PCI platform driver
[ 2.335471] ehci-platform: EHCI generic platform driver
[ 2.341655] ehci-platform ff500000.usb: EHCI Host Controller
[ 2.348319] ehci-platform ff500000.usb: new USB bus registered, assigned bus number 3
[ 2.357259] ehci-platform ff500000.usb: irq 45, io mem 0xff500000
[ 2.433735] ehci-platform ff500000.usb: USB 2.0 started, EHCI 1.00
[ 2.441140] usb usb3: New USB device found, idVendor=1d6b, idProduct=0002
[ 2.448887] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 2.457113] usb usb3: Product: EHCI Host Controller
[ 2.462781] usb usb3: Manufacturer: Linux 4.13.0-RockMyy-XIII ehci_hcd
[ 2.470180] usb 1-1: New USB device found, idVendor=05e3, idProduct=0610
[ 2.470191] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[ 2.470199] usb 1-1: Product: USB2.0 Hub
[ 2.486409] hub 1-1:1.0: USB hub found
[ 2.490953] hub 1-1:1.0: 4 ports detected
[ 2.500040] usb usb3: SerialNumber: ff500000.usb
[ 2.506877] hub 3-0:1.0: USB hub found
[ 2.511450] hub 3-0:1.0: 1 port detected
[ 2.516789] usbcore: registered new interface driver cdc_acm
[ 2.523194] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[ 2.532282] usbcore: registered new interface driver usblp
[ 2.538531] usbcore: registered new interface driver cdc_wdm
[ 2.545046] usbcore: registered new interface driver usb-storage
[ 2.551927] usbcore: registered new interface driver usbserial
[ 2.558562] usbcore: registered new interface driver usbserial_generic
[ 2.565934] usbserial: USB Serial support registered for generic
[ 2.572772] usbcore: registered new interface driver ftdi_sio
[ 2.579284] usbserial: USB Serial support registered for FTDI USB Serial Device
[ 2.587709] usbcore: registered new interface driver keyspan
[ 2.594115] usbserial: USB Serial support registered for Keyspan - (without firmware)
[ 2.602947] usbserial: USB Serial support registered for Keyspan 1 port adapter
[ 2.611195] usbserial: USB Serial support registered for Keyspan 2 port adapter
[ 2.619543] usbserial: USB Serial support registered for Keyspan 4 port adapter
[ 2.628068] usbcore: registered new interface driver option
[ 2.634498] usbserial: USB Serial support registered for GSM modem (1-port)
[ 2.642799] usbcore: registered new interface driver oti6858
[ 2.649290] usbserial: USB Serial support registered for oti6858
[ 2.656125] usbcore: registered new interface driver pl2303
[ 2.662449] usbserial: USB Serial support registered for pl2303
[ 2.669188] usbcore: registered new interface driver qcserial
[ 2.675720] usbserial: USB Serial support registered for Qualcomm USB modem
[ 2.683633] usbcore: registered new interface driver sierra
[ 2.689958] usbserial: USB Serial support registered for Sierra USB modem
[ 2.698745] usbcore: registered new interface driver iforce
[ 2.705118] usbcore: registered new interface driver xpad
[ 2.711374] usbcore: registered new interface driver usbtouchscreen
[ 2.719151] i2c /dev entries driver
[ 2.724105] rk3x-i2c ff140000.i2c: Initialized RK3xxx I2C bus at f0ef5000
[ 2.732720] rk3x-i2c ff150000.i2c: Initialized RK3xxx I2C bus at f0ef7000
[ 2.741394] rk3x-i2c ff160000.i2c: Initialized RK3xxx I2C bus at f0ef9000
[ 2.750059] rk3x-i2c ff170000.i2c: Initialized RK3xxx I2C bus at f0efb000
[ 2.764916] DCDC_REG1: supplied by vcc_sys
[ 2.770991] DCDC_REG2: supplied by vcc_sys
[ 2.776814] DCDC_REG3: supplied by vcc_sys
[ 2.781920] DCDC_REG4: supplied by vcc_sys
[ 2.787483] LDO_REG1: supplied by vcc_sys
[ 2.794039] LDO_REG2: supplied by vcc_sys
[ 2.799964] LDO_REG3: supplied by vcc_sys
[ 2.805984] LDO_REG4: supplied by vcc_io
[ 2.811951] LDO_REG5: supplied by vcc_io
[ 2.817896] LDO_REG6: supplied by vcc_io
[ 2.822370] usb 1-1.3: new full-speed USB device number 3 using dwc2
[ 2.830064] vdd10_lcd: Bringing 800000uV into 1000000-1000000uV
[ 2.838252] LDO_REG7: supplied by vcc_sys
[ 2.843731] usb 3-1: new high-speed USB device number 2 using ehci-platform
[ 2.852120] LDO_REG8: supplied by vcc_sys
[ 2.858077] SWITCH_REG1: supplied by vcc_io
[ 2.863189] SWITCH_REG2: supplied by vcc_io
[ 2.871987] rk808-rtc rk808-rtc: rtc core: registered rk808-rtc as rtc0
[ 2.879931] rk3x-i2c ff650000.i2c: Initialized RK3xxx I2C bus at f0efd000
[ 2.888777] rk3x-i2c ff660000.i2c: Initialized RK3xxx I2C bus at f0f41000
[ 2.897425] usbcore: registered new interface driver uvcvideo
[ 2.903893] USB Video Class driver (1.1.1)
[ 2.908499] gspca_main: v2.14.0 registered
[ 2.908954] usb 1-1.3: New USB device found, idVendor=0eef, idProduct=0005
[ 2.908966] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 2.908974] usb 1-1.3: Product: WaveShare Touchscreen
[ 2.908982] usb 1-1.3: Manufacturer: WaveShare
[ 2.908989] usb 1-1.3: SerialNumber: 2016-11-06
[ 2.948121] device-mapper: ioctl: 4.36.0-ioctl (2017-06-09) initialised: dm-devel@redhat.com
[ 2.960382] cpufreq: cpufreq_online: CPU0: Running at unlisted freq: 500000 KHz
[ 2.968823] cpufreq: cpufreq_online: CPU0: Unlisted initial frequency changed to: 600000 KHz
[ 2.979133] sdhci: Secure Digital Host Controller Interface driver
[ 2.986060] sdhci: Copyright(c) Pierre Ossman
[ 2.990930] Synopsys Designware Multimedia Card Interface Driver
[ 2.997963] dwmmc_rockchip ff0c0000.dwmmc: 'num-slots' was deprecated.
[ 3.005367] dwmmc_rockchip ff0c0000.dwmmc: IDMAC supports 32-bit address mode.
[ 3.013464] dwmmc_rockchip ff0c0000.dwmmc: Using internal DMA controller.
[ 3.021055] dwmmc_rockchip ff0c0000.dwmmc: Version ID is 270a
[ 3.027497] dwmmc_rockchip ff0c0000.dwmmc: DW MMC controller at irq 30,32 bit host data width,256 deep fifo
[ 3.049737] mmc_host mmc0: Bus speed (slot 0) = 400000Hz (slot req 400000Hz, actual 400000HZ div = 0)
[ 3.071905] dwmmc_rockchip ff0d0000.dwmmc: 'num-slots' was deprecated.
[ 3.079334] dwmmc_rockchip ff0d0000.dwmmc: IDMAC supports 32-bit address mode.
[ 3.087433] dwmmc_rockchip ff0d0000.dwmmc: Using internal DMA controller.
[ 3.095036] dwmmc_rockchip ff0d0000.dwmmc: Version ID is 270a
[ 3.101486] dwmmc_rockchip ff0d0000.dwmmc: DW MMC controller at irq 31,32 bit host data width,256 deep fifo
[ 3.112397] dwmmc_rockchip ff0d0000.dwmmc: 'clock-freq-min-max' property was deprecated.
[ 3.121521] dwmmc_rockchip ff0d0000.dwmmc: allocated mmc-pwrseq
[ 3.128150] mmc_host mmc1: card is non-removable.
[ 3.145731] mmc_host mmc1: Bus speed (slot 0) = 400000Hz (slot req 400000Hz, actual 400000HZ div = 0)
[ 3.167800] sdhci-pltfm: SDHCI platform and OF driver helper
[ 3.172260] usb 3-1: config 1 has an invalid interface number: 255 but max is 6
[ 3.172264] usb 3-1: config 1 has no interface number 6
[ 3.173379] usb 3-1: New USB device found, idVendor=0bda, idProduct=481a
[ 3.173383] usb 3-1: New USB device strings: Mfr=3, Product=1, SerialNumber=2
[ 3.173385] usb 3-1: Product: USB Audio
[ 3.173388] usb 3-1: Manufacturer: Generic
[ 3.173390] usb 3-1: SerialNumber: 201405280001
[ 3.206536] mmc_host mmc0: Bus speed (slot 0) = 100000000Hz (slot req 100000000Hz, actual 100000000HZ div = 0)
[ 3.229188] ledtrig-cpu: registered to indicate activity on CPUs
[ 3.235958] hidraw: raw HID events driver (C) Jiri Kosina
[ 3.243839] input: WaveShare WaveShare Touchscreen as /devices/platform/ff540000.usb/usb1/1-1/1-1.3/1-1.3:1.0/0003:0EEF:0005.0001/input/input0
[ 3.244425] mmc_host mmc1: Bus speed (slot 0) = 50000000Hz (slot req 50000000Hz, actual 50000000HZ div = 0)
[ 3.245055] mmc1: new high speed SDIO card at address 0001
[ 3.275316] hid-multitouch 0003:0EEF:0005.0001: input,hidraw0: USB HID v1.11 Device [WaveShare WaveShare Touchscreen] on usb-ff540000.usb-1.3/input0
[ 3.291684] input: Generic USB Audio as /devices/platform/ff500000.usb/usb3/3-1/3-1:1.255/0003:0BDA:481A.0002/input/input1
[ 3.355903] hid-generic 0003:0BDA:481A.0002: input,hiddev96,hidraw1: USB HID v1.11 Device [Generic USB Audio] on usb-ff500000.usb-1/input255
[ 3.370045] usbcore: registered new interface driver usbhid
[ 3.376276] usbhid: USB HID core driver
[ 3.380751] ashmem: initialized
[ 3.503352] dwmmc_rockchip ff0c0000.dwmmc: Successfully tuned phase to 39
[ 3.510953] mmc0: new ultra high speed SDR50 SDHC card at address aaaa
[ 3.518469] mmcblk0: mmc0:aaaa SU16G 14.8 GiB
[ 3.524344] mmcblk0: p1 p2
[ 4.313291] random: crng init done
[ 5.533295] usbcore: registered new interface driver snd-usb-audio
[ 5.541584] u32 classifier
[ 5.544615] Netfilter messages via NETLINK v0.30.
[ 5.549998] nf_conntrack version 0.5.0 (16384 buckets, 65536 max)
[ 5.556912] ctnetlink v0.93: registering with nfnetlink.
[ 5.562998] ip_tables: (C) 2000-2006 Netfilter Core Team
[ 5.568973] Initializing XFRM netlink socket
[ 5.573993] NET: Registered protocol family 10
[ 5.579406] Segment Routing with IPv6
[ 5.583546] ip6_tables: (C) 2000-2006 Netfilter Core Team
[ 5.589693] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[ 5.596589] NET: Registered protocol family 17
[ 5.601586] NET: Registered protocol family 15
[ 5.606625] Bluetooth: RFCOMM TTY layer initialized
[ 5.612098] Bluetooth: RFCOMM socket layer initialized
[ 5.617862] Bluetooth: RFCOMM ver 1.11
[ 5.622060] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[ 5.628682] Bluetooth: HIDP socket layer initialized
[ 5.634253] 8021q: 802.1Q VLAN Support v1.8
[ 5.638935] lib80211: common routines for IEEE802.11 drivers
[ 5.645292] Key type dns_resolver registered
[ 5.650232] ThumbEE CPU extension supported.
[ 5.655019] Registering SWP/SWPB emulation handler
[ 5.660652] Loading compiled-in X.509 certificates
[ 5.666447] Btrfs loaded, crc32c=crc32c-generic
[ 5.679104] rockchip-drm display-subsystem: bound ff930000.vop (ops 0xc0d7eda8)
[ 5.687490] rockchip-drm display-subsystem: bound ff940000.vop (ops 0xc0d7eda8)
[ 5.695750] dwhdmi-rockchip ff980000.hdmi: Detected HDMI TX controller v2.00a with HDCP (DWC MHL PHY)
[ 5.706297] rockchip-drm display-subsystem: bound ff980000.hdmi (ops 0xc0d801e8)
[ 5.714733] rockchip-drm display-subsystem: failed to bind ff960000.mipi (ops 0xc0d80474): -517
[ 5.724705] rockchip-drm display-subsystem: master bind failed: -517
[ 5.732295] rk_gmac-dwmac ff290000.ethernet: PTP uses main clock
[ 5.739083] rk_gmac-dwmac ff290000.ethernet: clock input or output? (input).
[ 5.746997] rk_gmac-dwmac ff290000.ethernet: TX delay(0x30).
[ 5.753337] rk_gmac-dwmac ff290000.ethernet: RX delay(0x10).
[ 5.759732] rk_gmac-dwmac ff290000.ethernet: clock input from PHY
[ 5.771560] rk_gmac-dwmac ff290000.ethernet: init for RGMII
[ 5.777808] stmmac - user ID: 0x10, Synopsys ID: 0x35
[ 5.783446] rk_gmac-dwmac ff290000.ethernet: Ring mode enabled
[ 5.789967] rk_gmac-dwmac ff290000.ethernet: DMA HW capability register supported
[ 5.798343] rk_gmac-dwmac ff290000.ethernet: Normal descriptors
[ 5.804952] rk_gmac-dwmac ff290000.ethernet: RX Checksum Offload Engine supported
[ 5.813316] rk_gmac-dwmac ff290000.ethernet: COE Type 2
[ 5.819155] rk_gmac-dwmac ff290000.ethernet: TX Checksum insertion supported
[ 5.827037] rk_gmac-dwmac ff290000.ethernet: Wake-Up On Lan supported
[ 5.834254] rk_gmac-dwmac ff290000.ethernet: Enable RX Mitigation via HW Watchdog Timer
[ 6.892850] libphy: stmmac: probed
[ 6.896673] mdio_bus stmmac-0:00: attached PHY driver [unbound] (mii_bus:phy_addr=stmmac-0:00, irq=-1)
[ 6.907089] mdio_bus stmmac-0:01: attached PHY driver [unbound] (mii_bus:phy_addr=stmmac-0:01, irq=-1)
[ 6.917964] OF: /sound/simple-audio-card,codec: could not get #sound-dai-cells for /hdmi@ff980000
[ 6.927891] asoc-simple-card sound: parse error -22
[ 6.933348] asoc-simple-card: probe of sound failed with error -22
[ 6.941049] rockchip-drm display-subsystem: bound ff930000.vop (ops 0xc0d7eda8)
[ 6.949394] rockchip-drm display-subsystem: bound ff940000.vop (ops 0xc0d7eda8)
[ 6.957647] dwhdmi-rockchip ff980000.hdmi: Detected HDMI TX controller v2.00a with HDCP (DWC MHL PHY)
[ 6.968183] rockchip-drm display-subsystem: bound ff980000.hdmi (ops 0xc0d801e8)
[ 6.976510] dw-mipi-dsi ff960000.mipi: Unbalanced pm_runtime_enable!
[ 6.983721] rockchip-drm display-subsystem: failed to bind ff960000.mipi (ops 0xc0d80474): -517
[ 6.993663] rockchip-drm display-subsystem: master bind failed: -517
[ 7.001553] rockchip-drm display-subsystem: bound ff930000.vop (ops 0xc0d7eda8)
[ 7.009908] rockchip-drm display-subsystem: bound ff940000.vop (ops 0xc0d7eda8)
[ 7.018150] dwhdmi-rockchip ff980000.hdmi: Detected HDMI TX controller v2.00a with HDCP (DWC MHL PHY)
[ 7.028677] rockchip-drm display-subsystem: bound ff980000.hdmi (ops 0xc0d801e8)
[ 7.037001] dw-mipi-dsi ff960000.mipi: Unbalanced pm_runtime_enable!
[ 7.044198] rockchip-drm display-subsystem: failed to bind ff960000.mipi (ops 0xc0d80474): -517
[ 7.054125] rockchip-drm display-subsystem: master bind failed: -517
[ 7.061977] rockchip-drm display-subsystem: bound ff930000.vop (ops 0xc0d7eda8)
[ 7.070319] rockchip-drm display-subsystem: bound ff940000.vop (ops 0xc0d7eda8)
[ 7.078593] dwhdmi-rockchip ff980000.hdmi: Detected HDMI TX controller v2.00a with HDCP (DWC MHL PHY)
[ 7.089123] rockchip-drm display-subsystem: bound ff980000.hdmi (ops 0xc0d801e8)
[ 7.097453] dw-mipi-dsi ff960000.mipi: Unbalanced pm_runtime_enable!
[ 7.104657] rockchip-drm display-subsystem: failed to bind ff960000.mipi (ops 0xc0d80474): -517
[ 7.114589] rockchip-drm display-subsystem: master bind failed: -517
[ 7.122434] rockchip-drm display-subsystem: bound ff930000.vop (ops 0xc0d7eda8)
[ 7.130783] rockchip-drm display-subsystem: bound ff940000.vop (ops 0xc0d7eda8)
[ 7.139027] dwhdmi-rockchip ff980000.hdmi: Detected HDMI TX controller v2.00a with HDCP (DWC MHL PHY)
[ 7.149546] rockchip-drm display-subsystem: bound ff980000.hdmi (ops 0xc0d801e8)
[ 7.157878] dw-mipi-dsi ff960000.mipi: Unbalanced pm_runtime_enable!
[ 7.165069] rockchip-drm display-subsystem: failed to bind ff960000.mipi (ops 0xc0d80474): -517
[ 7.174988] rockchip-drm display-subsystem: master bind failed: -517
[ 7.182832] rockchip-drm display-subsystem: bound ff930000.vop (ops 0xc0d7eda8)
[ 7.191173] rockchip-drm display-subsystem: bound ff940000.vop (ops 0xc0d7eda8)
[ 7.199423] dwhdmi-rockchip ff980000.hdmi: Detected HDMI TX controller v2.00a with HDCP (DWC MHL PHY)
[ 7.209945] rockchip-drm display-subsystem: bound ff980000.hdmi (ops 0xc0d801e8)
[ 7.218272] dw-mipi-dsi ff960000.mipi: Unbalanced pm_runtime_enable!
[ 7.225472] rockchip-drm display-subsystem: failed to bind ff960000.mipi (ops 0xc0d80474): -517
[ 7.235380] rockchip-drm display-subsystem: master bind failed: -517
[ 7.243221] rockchip-drm display-subsystem: bound ff930000.vop (ops 0xc0d7eda8)
[ 7.251566] rockchip-drm display-subsystem: bound ff940000.vop (ops 0xc0d7eda8)
[ 7.259818] dwhdmi-rockchip ff980000.hdmi: Detected HDMI TX controller v2.00a with HDCP (DWC MHL PHY)
[ 7.270331] rockchip-drm display-subsystem: bound ff980000.hdmi (ops 0xc0d801e8)
[ 7.278658] dw-mipi-dsi ff960000.mipi: Unbalanced pm_runtime_enable!
[ 7.285860] rockchip-drm display-subsystem: failed to bind ff960000.mipi (ops 0xc0d80474): -517
[ 7.295795] rockchip-drm display-subsystem: master bind failed: -517
[ 7.303621] rockchip-drm display-subsystem: bound ff930000.vop (ops 0xc0d7eda8)
[ 7.311971] rockchip-drm display-subsystem: bound ff940000.vop (ops 0xc0d7eda8)
[ 7.320223] dwhdmi-rockchip ff980000.hdmi: Detected HDMI TX controller v2.00a with HDCP (DWC MHL PHY)
[ 7.330746] rockchip-drm display-subsystem: bound ff980000.hdmi (ops 0xc0d801e8)
[ 7.339071] dw-mipi-dsi ff960000.mipi: Unbalanced pm_runtime_enable!
[ 7.346270] rockchip-drm display-subsystem: failed to bind ff960000.mipi (ops 0xc0d80474): -517
[ 7.356201] rockchip-drm display-subsystem: master bind failed: -517
[ 7.364046] rockchip-drm display-subsystem: bound ff930000.vop (ops 0xc0d7eda8)
[ 7.372385] rockchip-drm display-subsystem: bound ff940000.vop (ops 0xc0d7eda8)
[ 7.380637] dwhdmi-rockchip ff980000.hdmi: Detected HDMI TX controller v2.00a with HDCP (DWC MHL PHY)
[ 7.391155] rockchip-drm display-subsystem: bound ff980000.hdmi (ops 0xc0d801e8)
[ 7.399478] dw-mipi-dsi ff960000.mipi: Unbalanced pm_runtime_enable!
[ 7.406681] rockchip-drm display-subsystem: failed to bind ff960000.mipi (ops 0xc0d80474): -517
[ 7.416597] rockchip-drm display-subsystem: master bind failed: -517
[ 7.424423] rockchip-drm display-subsystem: bound ff930000.vop (ops 0xc0d7eda8)
[ 7.432762] rockchip-drm display-subsystem: bound ff940000.vop (ops 0xc0d7eda8)
[ 7.441005] dwhdmi-rockchip ff980000.hdmi: Detected HDMI TX controller v2.00a with HDCP (DWC MHL PHY)
[ 7.451516] rockchip-drm display-subsystem: bound ff980000.hdmi (ops 0xc0d801e8)
[ 7.459843] dw-mipi-dsi ff960000.mipi: Unbalanced pm_runtime_enable!

The bind error goes on for ever..

@Miouyouyou Miouyouyou self-assigned this Nov 15, 2017
@Miouyouyou Miouyouyou added the bug label Nov 15, 2017
@Miouyouyou
Copy link
Owner

I'll try to research what is error -517 and what could cause this issue. I'll see what I can find.

Note that, given my current schedule, this will take roughly a week to pinpoint the issue.

There are other issues with the Rockchip DRM and my current set of patches so I'll see if porting previous ones or removing some patches could fix such issues too.

@rvdgracht
Copy link
Author

Ok, thanks :)
I'll keep an eye out for your work!

@Miouyouyou
Copy link
Owner

Miouyouyou commented Nov 15, 2017

Hmm, the issue seems to come from the dw-mipi-dsi.c driver. The issue seems to occur during the binding phase and it seems to call pm_runtime_enable, since the driver forget to call pm_runtime_disable when failing generating additional error logs when calling pm_runtime_enable after the first time.

The binding function of the dw-mipi-dsi driver is called dw_mipi_dsi_bind. The function is very noisy and the only way it could bail out, after calling pm_runtime_enable, without sending any error log is during the following check :

        if (!dsi->panel) {
                ret = -EPROBE_DEFER;
                goto err_mipi_dsi_host;
        }

Which coincide with the error number 517 :

#define EPROBE_DEFER      517     /* Driver requests probe retry */

Errors are always negated in order to do simple checks (if return_value < 0 then it's an error).

So, the main point will be to understand why the MIPI driver consider that there's no panel.

Did you try to plug the screen after starting the Tinkerboard ? Does it make a difference ?

Also, did you try to connect to the Tinkerboard with a serial link, start the tinkerboard THEN plug the screen ? Does it make a difference too ?

Miouyouyou added a commit that referenced this issue Dec 24, 2017
I took the time to test it on a real Tinkerboard, this time and
deal with bug #1 . So the endless stream of mipi-dsi and rockchip-drm
errors is no more !

...

And so is the mipi-dsi node, which is clearly not the way to solve
the issue.
I guess I'll have to inspect this a bit more when I'll acquire a MIPI
touch screen.

Anyway, it works on HDMI, GPU drivers were tested correctly.

Signed-off-by: Myy Miouyouyou <myy@miouyouyou.fr>
Miouyouyou added a commit to Miouyouyou/RockMyy that referenced this issue Dec 24, 2017
Well, I tested it on a Tinkerboard and it works.

Now a few bugs were ironed out :

- The ACCESS_ONCE macro is gone, so a few modifications of the
  ARM Midgard GPU driver were required and a new patch was added.
- The MIPI DSI node added in the Tinkerboard DTS is related to
  a bug generating an endless stream of error messages during
  the boot process.
  In order to resolve the issue, the patch adding this node is
  not applied anymore. But this disable the detection of MIPI
  connected screens. This interface being mainly use to connect
  touch screens, I'll try to see how to re-enable it without
  provoking such issue.
  See Miouyouyou/RockMyy-Build#1

Anyway, the kernel was tested and it boots, my HDMI is detected and
I can use the Midgard GPU binary drivers provided by Rockchip here :
https://github.com/rockchip-linux/rk-rootfs-build/blob/master/packages/armhf/libmali/libmali-rk-midgard-t76x-r14p0-r0p0-wayland_1.6-1_armhf.deb

So the last issues will be :
- The VPU
- The Bluetooth driver.

Signed-off-by: Myy Miouyouyou <myy@miouyouyou.fr>
@Miouyouyou
Copy link
Owner

Well, since I've been able to test my kernel on a real Tinkerboard myself AND hit this bug on the way, I found a way to resolve the issue and pushed a new build script + a new build that should work this time.

Now the thing is, in order to sidestep this issue, I had to disable the MIPI-DSI node in the rk3288-tinker.dts, so if you have a touchscreen connected in MIPI, they won't work anymore. I'll try to investigate this issue a bit more once I get a touchscreen to play with the Tinkerboard.

That said, I know that this bugreport is quite old so I don't know if you still own a Tinkerboard and still wish to give these kernel builds a test.
Anyway, if you can comment on this issue, this will be nice.
Else, I'll close this bug in a few days. In such event, you can re-open it if the issue is not solved on your side, of course.

@samsonluk
Copy link

I hit this error -517:

dmesg | grep rockchip

[ 0.488560] rockchip-drm display-subsystem: bound ff930000.vop (ops 0xc0d8748c)
[ 0.489022] rockchip-drm display-subsystem: bound ff940000.vop (ops 0xc0d8748c)
[ 0.489167] rockchip-drm display-subsystem: failed to bind ff980000.hdmi (ops 0xc0d88d98): -517
[ 0.489557] rockchip-drm display-subsystem: master bind failed: -517
[ 0.507395] rockchip-spi ff130000.spi: chipselect 0 already in use
[ 1.039613] dwmmc_rockchip ff0c0000.dwmmc: IDMAC supports 32-bit address mode.
[ 1.039632] dwmmc_rockchip ff0c0000.dwmmc: Using internal DMA controller.
[ 1.039639] dwmmc_rockchip ff0c0000.dwmmc: Version ID is 270a
[ 1.039665] dwmmc_rockchip ff0c0000.dwmmc: DW MMC controller at irq 30,32 bit host data width,256 deep fifo
[ 1.039743] dwmmc_rockchip ff0c0000.dwmmc: GPIO lookup for consumer cd
[ 1.039747] dwmmc_rockchip ff0c0000.dwmmc: using device tree for GPIO lookup
[ 1.039759] dwmmc_rockchip ff0c0000.dwmmc: using lookup tables for GPIO lookup
[ 1.039763] dwmmc_rockchip ff0c0000.dwmmc: lookup for GPIO cd failed
[ 1.039767] dwmmc_rockchip ff0c0000.dwmmc: GPIO lookup for consumer wp
[ 1.039770] dwmmc_rockchip ff0c0000.dwmmc: using device tree for GPIO lookup
[ 1.039780] dwmmc_rockchip ff0c0000.dwmmc: using lookup tables for GPIO lookup
[ 1.039783] dwmmc_rockchip ff0c0000.dwmmc: lookup for GPIO wp failed
[ 1.063291] dwmmc_rockchip ff0d0000.dwmmc: 'num-slots' was deprecated.
[ 1.063412] dwmmc_rockchip ff0d0000.dwmmc: IDMAC supports 32-bit address mode.
[ 1.063429] dwmmc_rockchip ff0d0000.dwmmc: Using internal DMA controller.
[ 1.063435] dwmmc_rockchip ff0d0000.dwmmc: Version ID is 270a
[ 1.063464] dwmmc_rockchip ff0d0000.dwmmc: DW MMC controller at irq 31,32 bit host data width,256 deep fifo
[ 1.063472] dwmmc_rockchip ff0d0000.dwmmc: 'clock-freq-min-max' property was deprecated.
[ 1.063492] dwmmc_rockchip ff0d0000.dwmmc: GPIO lookup for consumer wp
[ 1.063495] dwmmc_rockchip ff0d0000.dwmmc: using device tree for GPIO lookup
[ 1.063507] dwmmc_rockchip ff0d0000.dwmmc: using lookup tables for GPIO lookup
[ 1.063511] dwmmc_rockchip ff0d0000.dwmmc: lookup for GPIO wp failed
[ 1.063543] dwmmc_rockchip ff0d0000.dwmmc: allocated mmc-pwrseq
[ 1.101011] rockchip-drm display-subsystem: bound ff930000.vop (ops 0xc0d8748c)
[ 1.101213] rockchip-drm display-subsystem: bound ff940000.vop (ops 0xc0d8748c)
[ 1.101330] dwhdmi-rockchip ff980000.hdmi: Detected HDMI TX controller v2.00a with HDCP (DWC MHL PHY)
[ 1.101657] rockchip-drm display-subsystem: bound ff980000.hdmi (ops 0xc0d88d98)
[ 1.319467] dwmmc_rockchip ff0c0000.dwmmc: Successfully tuned phase to 130
[ 1.431569] rockchip-drm display-subsystem: fb0: frame buffer device
[ 1.431824] [drm] Initialized rockchip 1.0.0 20140818 for display-subsystem on minor 0
[ 5.279795] rockchip-rga ff920000.rga: HW Version: 0x00.00
[ 5.279968] rockchip-rga ff920000.rga: Registered rockchip-rga as /dev/video0

@Miouyouyou
Copy link
Owner

Ah, indeed, when I was building RockMyy-Build, I don't think I had a Tinkerboard at that time, so I didn't pay attention to this issue.

For the moment, if you got a x86 machine (or if you want to recompile a kernel on a Tinkerboard), I might recommend using the latest RockMyy script and give it a go.
I'll push a recent build that work with Tinkerboard systems this week.

@samsonluk
Copy link

Oh sure, I've the x86 machine ready with Ubuntu/qemu-arm-static in a docker container or shouldn't be any problem for even recompile the kernel under Tinkerboard itself. In case of this how to disable cross compile for GetPatchAndCompileKernel.sh?

My goal is try setup a proper environment to compile/run Kodi 18 gbm with rkmpp hw accelerated support for h.264/hevc video playback in the Tinkerboard. At this moment I am running Android version of Kodi 18 with it which is very stable, however, Android doesn't like my remote control (generating repeat keys, no such problem under Linux) so I would like to get a working version of Kodi with Linux.

I really appreciate the setup Mali user-space driver tutorial that you put in RockMyy wiki, it really given me a lot of hints on how to get things together, I wish I could discover it earlier!

@Miouyouyou
Copy link
Owner

To disable the cross-compilation, edit the GetPatchAndCompileKernel.sh
and just comment the CROSS_COMPILE variable, or set it to nothing (CROSS_COMPILE=).

Concerning the Video playback with RKMPP, you'll need the VPU driver that goes with it and, on my side, it's still WIP. I'm currently trying to get it working. To do that, I need to :

  • Get the list of registers values sent to the VPU, by RKMPP
  • Get the corresponding frames related decoded, when sending these values (Current frame + Reference frames)
  • Analyse them. Some registers values are modified by the driver, some are not.
  • Reproduce the behaviour on my driver.

The first two steps are being dealt with, so I'm focusing on the third and last one.

Also, there's a V4L2 implementation, coded by Tomasz Figa ( @tom3q ) from the Chromium team, that is known to work on 4.4 kernels. @baruchsiach is trying to port this implementation on recent kernels.
The base kernel driver of that implementation is here : https://github.com/rockchip-linux/kernel/tree/release-4.4/drivers/media/platform/rockchip-vpu
The libraries can be retrieved, following this ebuild : https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/master/media-libs/libv4lplugins/libv4lplugins-9999.ebuild
The idea, with this implementation, is that you don't need any special plugin. As long as the media player knows how to use V4L2 for Video decoding, it should work.
I haven't tested it though and the port needs some special part of the V4L2 API that are not "mainlined".

Anyway, it might still take a few months before getting a working VPU driver on mainline kernels.

Meanwhile, GBM + GLES work fine.

I also started to test Vulkan but... the API isn't easy and there's only ONE driver for Mali T760 FBDEV driver that is known to possibly work... At least querying for devices and queues work, but since the it does not have GBM, the whole "get a framebuffer with DRM and use it with the API" thing needs to be reimplemented...

@Miouyouyou
Copy link
Owner

I've released a 4.18-rc5 build. Have a try : https://github.com/Miouyouyou/RockMyy-Build/archive/v4.18-rc5.tar.gz

@samsonluk
Copy link

samsonluk commented Jul 20, 2018

I see, rockchip vpu driver is still missing in the mainline. I noticed that kodi 18 support V4L2, I will give it a try before rkmpp ready.

I've started RockMyy script 4.18-rc5 build for a few hours already, would it be possible to pass over "-j N" to speed up the compilation?

# MAKE_CONFIG=menuconfig bash GetPatchAndCompileKernel.sh
scripts/kconfig/mconf-cfg.sh: line 7: pkg-config: command not found
scripts/kconfig/mconf-cfg.sh: line 13: pkg-config: command not found

I would expect the above are just warning messages? because the compilation process just keep going..

It failed:
CC [M] drivers/net/wireless/realtek/rtlwifi/rtl8192ee/rf.o CC fs/xfs/xfs_trans_inode.o CC [M] drivers/net/wireless/realtek/rtlwifi/rtl8192de/hw.o CC [M] drivers/net/wireless/realtek/rtlwifi/rtl8192de/led.o CC [M] drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.o CC [M] drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.o CC [M] drivers/net/wireless/realtek/rtlwifi/btcoexist/rtl_btc.o CC [M] drivers/net/wireless/realtek/rtlwifi/rtl8192cu/phy.o LD [M] drivers/net/wireless/realtek/rtlwifi/rtl8188ee/rtl8188ee.o CC [M] drivers/net/wireless/realtek/rtlwifi/rtl8192ce/rf.o CC [M] drivers/net/wireless/realtek/rtlwifi/rtl8192se/dm.o CC fs/eventfd.o CC [M] drivers/net/wireless/realtek/rtlwifi/rtl8192ee/sw.o CC fs/aio.o CC [M] drivers/net/wireless/realtek/rtlwifi/rtl8192ee/table.o CC fs/locks.o CC [M] drivers/net/wireless/realtek/rtlwifi/rtl8192ee/trx.o CC [M] drivers/net/wireless/realtek/rtlwifi/rtl8192se/fw.o CC [M] drivers/net/wireless/realtek/rtlwifi/rtl8192se/hw.o CC fs/xfs/xfs_trans_refcount.o CC [M] drivers/net/wireless/realtek/rtlwifi/rtl8192se/led.o CC fs/xfs/xfs_trans_rmap.o CC fs/xfs/xfs_sysctl.o CC [M] drivers/net/wireless/realtek/rtlwifi/rtl8192se/phy.o CC [M] drivers/net/wireless/realtek/rtlwifi/rtl8192cu/rf.o CC [M] drivers/net/wireless/realtek/rtlwifi/rtl8192ce/sw.o CC [M] drivers/net/wireless/realtek/rtlwifi/rtl8192cu/sw.o LD [M] drivers/net/wireless/realtek/rtlwifi/btcoexist/btcoexist.o CC [M] drivers/net/wireless/realtek/rtlwifi/rtl8723ae/dm.o CC [M] drivers/net/wireless/realtek/rtlwifi/rtl8723ae/fw.o CC [M] drivers/net/wireless/realtek/rtlwifi/rtl8192de/rf.o CC [M] drivers/net/wireless/realtek/rtlwifi/rtl8192de/sw.o LD [M] drivers/net/wireless/realtek/rtlwifi/rtl8192ee/rtl8192ee.o CC [M] drivers/net/wireless/realtek/rtlwifi/rtl8723be/dm.o CC fs/binfmt_script.o CC [M] drivers/net/wireless/realtek/rtlwifi/rtl8723be/fw.o AR fs/xfs/built-in.a CC [M] drivers/net/wireless/realtek/rtlwifi/rtl8192ce/table.o CC [M] drivers/net/wireless/realtek/rtlwifi/rtl8192de/table.o CC [M] drivers/net/wireless/realtek/rtlwifi/rtl8192ce/trx.o CC [M] drivers/net/wireless/realtek/rtlwifi/rtl8192se/rf.o CC [M] drivers/net/wireless/realtek/rtlwifi/rtl8192de/trx.o CC [M] drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hal_btc.o CC [M] drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hal_bt_coexist.o CC fs/binfmt_elf.o CC [M] drivers/net/wireless/realtek/rtlwifi/rtl8192cu/table.o CC [M] drivers/net/wireless/realtek/rtlwifi/rtl8192cu/trx.o CC [M] drivers/net/wireless/realtek/rtlwifi/rtl8192se/sw.o CC [M] drivers/net/wireless/realtek/rtlwifi/rtl8192se/table.o CC [M] drivers/net/wireless/realtek/rtlwifi/rtl8192se/trx.o CC fs/binfmt_elf_fdpic.o CC fs/mbcache.o CC fs/posix_acl.o CC [M] drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hw.o CC [M] drivers/net/wireless/realtek/rtlwifi/rtl8723ae/led.o CC fs/coredump.o CC fs/drop_caches.o CC [M] drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.o LD [M] drivers/net/wireless/realtek/rtlwifi/rtl8192de/rtl8192de.o LD [M] drivers/net/wireless/realtek/rtlwifi/rtl8192ce/rtl8192ce.o CC [M] drivers/net/wireless/realtek/rtlwifi/rtl8723com/main.o CC [M] drivers/net/wireless/realtek/rtlwifi/rtl8821ae/dm.o CC fs/fhandle.o CC [M] drivers/net/wireless/realtek/rtlwifi/rtl8723ae/phy.o CC fs/iomap.o CC [M] drivers/net/wireless/realtek/rtlwifi/rtl8723com/dm_common.o CC fs/dcookies.o CC [M] drivers/net/wireless/realtek/rtlwifi/rtl8723ae/pwrseq.o LD [M] drivers/net/wireless/realtek/rtlwifi/rtl8192cu/rtl8192cu.o CC [M] drivers/net/wireless/realtek/rtlwifi/base.o CC [M] drivers/net/wireless/realtek/rtlwifi/cam.o LD [M] drivers/net/wireless/realtek/rtlwifi/rtl8192se/rtl8192se.o CC [M] drivers/net/wireless/realtek/rtlwifi/rtl8723ae/rf.o CC [M] drivers/net/wireless/realtek/rtlwifi/rtl8723ae/sw.o CC [M] drivers/net/wireless/realtek/rtlwifi/rtl8723ae/table.o CC [M] drivers/net/wireless/realtek/rtlwifi/rtl8723ae/trx.o CC [M] drivers/net/wireless/realtek/rtlwifi/rtl8723be/led.o CC [M] drivers/net/wireless/realtek/rtlwifi/rtl8723be/phy.o CC [M] drivers/net/wireless/realtek/rtlwifi/rtl8723com/fw_common.o CC [M] drivers/net/wireless/realtek/rtlwifi/rtl8723com/phy_common.o CC [M] drivers/net/wireless/realtek/rtlwifi/rtl8723be/pwrseq.o CC [M] drivers/net/wireless/realtek/rtlwifi/core.o CC [M] drivers/net/wireless/realtek/rtlwifi/debug.o AR fs/built-in.a CC [M] drivers/net/wireless/realtek/rtlwifi/efuse.o CC [M] drivers/net/wireless/realtek/rtlwifi/ps.o CC [M] drivers/net/wireless/realtek/rtlwifi/rtl8821ae/fw.o CC [M] drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.o CC [M] drivers/net/wireless/realtek/rtlwifi/rtl8821ae/led.o CC [M] drivers/net/wireless/realtek/rtlwifi/rtl8723be/rf.o CC [M] drivers/net/wireless/realtek/rtlwifi/rtl8723be/sw.o CC [M] drivers/net/wireless/realtek/rtlwifi/rtl8723be/table.o CC [M] drivers/net/wireless/realtek/rtlwifi/rtl8723be/trx.o CC [M] drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.o LD [M] drivers/net/wireless/realtek/rtlwifi/rtl8723ae/rtl8723ae.o CC [M] drivers/net/wireless/realtek/rtlwifi/rc.o CC [M] drivers/net/wireless/realtek/rtlwifi/regd.o CC [M] drivers/net/wireless/realtek/rtlwifi/rtl8821ae/pwrseq.o LD [M] drivers/net/wireless/realtek/rtlwifi/rtl8723com/rtl8723-common.o CC [M] drivers/net/wireless/realtek/rtlwifi/rtl8821ae/rf.o CC [M] drivers/net/wireless/realtek/rtlwifi/stats.o CC [M] drivers/net/wireless/realtek/rtlwifi/pci.o CC [M] drivers/net/wireless/realtek/rtlwifi/rtl8821ae/sw.o CC [M] drivers/net/wireless/realtek/rtlwifi/usb.o CC [M] drivers/net/wireless/realtek/rtlwifi/rtl8821ae/table.o CC [M] drivers/net/wireless/realtek/rtlwifi/rtl8821ae/trx.o LD [M] drivers/net/wireless/realtek/rtlwifi/rtl8723be/rtl8723be.o LD [M] drivers/net/wireless/realtek/rtlwifi/rtlwifi.o LD [M] drivers/net/wireless/realtek/rtlwifi/rtl_usb.o LD [M] drivers/net/wireless/realtek/rtlwifi/rtl_pci.o LD [M] drivers/net/wireless/realtek/rtlwifi/rtl8821ae/rtl8821ae.o AR drivers/net/wireless/built-in.a AR drivers/net/built-in.a AR drivers/built-in.a compilation failed

ReRun

./GetPatchAndCompileKernel.sh
scripts/kconfig/conf  --oldconfig Kconfig
    configuration written to .config
scripts/kconfig/conf  --syncconfig Kconfig
  CALL    scripts/checksyscalls.sh
<stdin>:1332:2: warning: #warning syscall io_pgetevents not implemented [-Wcpp]
  CHK     include/generated/compile.h
  GZIP    kernel/config_data.gz
  CC      net/rfkill/core.o
make[2]: *** No rule to make target 'net/netfilter/xt_DSCP.o', needed by 'net/netfilter/built-in.a'.  Stop.
scripts/Makefile.build:558: recipe for target 'net/netfilter' failed
make[1]: *** [net/netfilter] Error 2
make[1]: *** Waiting for unfinished jobs....
  AR      net/rfkill/built-in.a
Makefile:1029: recipe for target 'net' failed
make: *** [net] Error 2
make: *** Waiting for unfinished jobs....
Compilation failed

@Miouyouyou
Copy link
Owner

pkg-config issues come from the fact that pkg-config is not installed. In most distributions, the package containing this software is named pkg-config. On Debian, you could try apt-get install pkg-config.
Also, install ncurses-dev, if you want to use menuconfig.

Try to install pkg-config and see if resolves the issue.

I don't know why the current configuration requires xt_DSCP...

Worst case try to move or delete the linux folder, and rerun the script like this :
bash GetPatchAndCompileKernel.sh

And then, if it compiles fine, try to do :

cp linux/.config CurrentConfig
MAKECONFIG=menuconfig bash GetPatchAndCompileKernel.sh
# Configure the kernel as you want

And if it fails, paste the output of :

diff -u CurrentConfig linux/.config

@samsonluk
Copy link

samsonluk commented Jul 20, 2018

Installed both pkg-config and ncurses-dev, deleted linux... restart the whole process:
bash GetPatchAndCompileKernel.sh

let's wait...
For the record. a fresh installed debian need the following packages:
apt install gcc make automake bison flex wget git libssl-dev bc pkg-config ncurses-dev

@samsonluk
Copy link

samsonluk commented Jul 20, 2018

Very weird...

In file included from arch/arm/boot/dts/rk3288-rock2-square.dts:42:0:
./scripts/dtc/include-prefixes/dt-bindings/input/input.h:13:31: fatal error: linux-event-codes.h: No such file or directory
 #include "linux-event-codes.h"
                               ^
compilation terminated.

$ ls -l linux/scripts/dtc/include-prefixes/dt-bindings/input
total 10
-rwxr-xr-x 1 root root  358 Jul 20 10:03 gpio-keys.h
-rwxr-xr-x 1 root root  538 Jul 20 10:03 input.h
lrwxrwxrwx 1 root root   36 Jul 20 10:03 linux-event-codes.h -> ../../uapi/linux/input-event-codes.h
-rwxr-xr-x 1 root root 1061 Jul 20 10:03 ti-drv260x.h

$ more linux/scripts/dtc/include-prefixes/dt-bindings/input/input-event-codes.h
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
/*
 * Input event codes
 *
 *    *** IMPORTANT ***
 * This file is not only included from C-code but also from devicetree source
 * files. As such this file MUST only contain comments and defines.
 *
 * Copyright (c) 1999-2002 Vojtech Pavlik
 * Copyright (c) 2015 Hans de Goede <hdegoede@redhat.com>
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License version 2 as published by
 * the Free Software Foundation.
 */

I believe something wrong with docker while the source folder is mount from host, everything alright after moved the source back inside the container...

@Miouyouyou
Copy link
Owner

Is the filesystem used able to handle symlinks ? When you move the data back, are the symlinks still symlinks ?

@samsonluk
Copy link

samsonluk commented Jul 20, 2018

Host is Windows NTFS, should able to handle symlinks. In fact I was not able to move the data back because ./scripts/dtc/include-prefixes/dt-bindings/input unable to move with some strange characters left behind, I was not able to delete this folder within docker but only able to remove it from host side.

Anyway, compilation success this time, I will install it to tinkerboard tomorrow and report back.

@Miouyouyou
Copy link
Owner

Alright then 😺

@samsonluk
Copy link

samsonluk commented Jul 21, 2018

I don't know what to say, in summary:

# dmesg | grep rockchip
[    0.000000] rockchip_mmc_get_phase: invalid clk rate
[    0.000000] rockchip_mmc_get_phase: invalid clk rate
[    0.000000] rockchip_mmc_get_phase: invalid clk rate
[    0.000000] rockchip_mmc_get_phase: invalid clk rate
[    0.000000] rockchip_mmc_get_phase: invalid clk rate
[    0.000000] rockchip_mmc_get_phase: invalid clk rate
[    0.000000] rockchip_mmc_get_phase: invalid clk rate
[    0.000000] rockchip_mmc_get_phase: invalid clk rate
[    0.518511] rockchip-vop ff930000.vop: Linked as a consumer to ff930300.iommu
[    0.518922] rockchip-vop ff940000.vop: Linked as a consumer to ff940300.iommu
[    0.521409] rockchip-drm display-subsystem: Linked as a consumer to ff930000.vop
[    0.521449] rockchip-drm display-subsystem: Linked as a consumer to ff940000.vop
[    0.522237] rockchip-drm display-subsystem: Linked as a consumer to ff980000.hdmi
[    0.523436] rockchip-drm display-subsystem: bound ff930000.vop (ops 0xc0d8984c)
[    0.523901] rockchip-drm display-subsystem: bound ff940000.vop (ops 0xc0d8984c)
[    0.524014] rockchip-drm display-subsystem: failed to bind ff980000.hdmi (ops 0xc0d8b280): -517
[    0.524270] rockchip-drm display-subsystem: master bind failed: -517
[    0.543183] rockchip-spi ff130000.spi: chipselect 0 already in use
[    0.780514] dwmmc_rockchip ff0c0000.dwmmc: IDMAC supports 32-bit address mode.
[    0.780534] dwmmc_rockchip ff0c0000.dwmmc: Using internal DMA controller.
[    0.780541] dwmmc_rockchip ff0c0000.dwmmc: Version ID is 270a
[    0.780569] dwmmc_rockchip ff0c0000.dwmmc: DW MMC controller at irq 30,32 bit host data width,256 deep fifo
[    0.780660] dwmmc_rockchip ff0c0000.dwmmc: GPIO lookup for consumer cd
[    0.780664] dwmmc_rockchip ff0c0000.dwmmc: using device tree for GPIO lookup
[    0.780684] dwmmc_rockchip ff0c0000.dwmmc: using lookup tables for GPIO lookup
[    0.780687] dwmmc_rockchip ff0c0000.dwmmc: No GPIO consumer cd found
[    0.780692] dwmmc_rockchip ff0c0000.dwmmc: GPIO lookup for consumer wp
[    0.780695] dwmmc_rockchip ff0c0000.dwmmc: using device tree for GPIO lookup
[    0.780712] dwmmc_rockchip ff0c0000.dwmmc: using lookup tables for GPIO lookup
[    0.780715] dwmmc_rockchip ff0c0000.dwmmc: No GPIO consumer wp found
[    0.806322] dwmmc_rockchip ff0d0000.dwmmc: IDMAC supports 32-bit address mode.
[    0.806337] dwmmc_rockchip ff0d0000.dwmmc: Using internal DMA controller.
[    0.806345] dwmmc_rockchip ff0d0000.dwmmc: Version ID is 270a
[    0.806371] dwmmc_rockchip ff0d0000.dwmmc: DW MMC controller at irq 31,32 bit host data width,256 deep fifo
[    0.806397] dwmmc_rockchip ff0d0000.dwmmc: GPIO lookup for consumer wp
[    0.806400] dwmmc_rockchip ff0d0000.dwmmc: using device tree for GPIO lookup
[    0.806419] dwmmc_rockchip ff0d0000.dwmmc: using lookup tables for GPIO lookup
[    0.806422] dwmmc_rockchip ff0d0000.dwmmc: No GPIO consumer wp found
[    0.806441] dwmmc_rockchip ff0d0000.dwmmc: allocated mmc-pwrseq
[    0.846881] rockchip-drm display-subsystem: bound ff930000.vop (ops 0xc0d8984c)
[    0.847109] rockchip-drm display-subsystem: bound ff940000.vop (ops 0xc0d8984c)
[    0.847214] dwhdmi-rockchip ff980000.hdmi: Detected HDMI TX controller v2.00a with HDCP (DWC MHL PHY)
[    0.847729] rockchip-drm display-subsystem: bound ff980000.hdmi (ops 0xc0d8b280)
[    1.025048] [<c07385ac>] (drm_atomic_helper_wait_for_vblanks) from [<c0763a8c>] (rockchip_atomic_helper_commit_tail_rpm+0xb4/0x164)
[    1.025053] [<c0763a8c>] (rockchip_atomic_helper_commit_tail_rpm) from [<c0739c50>] (commit_tail+0x40/0x6c)
[    1.025138] [<c073e378>] (__drm_fb_helper_initial_config_and_unlock) from [<c0767cb4>] (rockchip_drm_fbdev_init+0x88/0xd0)
[    1.025143] [<c0767cb4>] (rockchip_drm_fbdev_init) from [<c0763550>] (rockchip_drm_bind+0x158/0x1c8)
[    1.025150] [<c0763550>] (rockchip_drm_bind) from [<c0777854>] (try_to_bring_up_master+0x68/0x158)
[    1.025161] [<c0777b60>] (component_master_add_with_match) from [<c07637b4>] (rockchip_drm_platform_probe+0x19c/0x1f0)
[    1.025167] [<c07637b4>] (rockchip_drm_platform_probe) from [<c077e56c>] (platform_drv_probe+0x48/0x94)
[    1.094464] dwmmc_rockchip ff0c0000.dwmmc: Successfully tuned phase to 129
[    1.144085] rockchip-drm display-subsystem: fb0:  frame buffer device
[    1.144335] [drm] Initialized rockchip 1.0.0 20140818 for display-subsystem on minor 0
[    2.225552]   #1: rockchip,tinker-codec

Please diff the complete before/after kernel upgrade dmesg log for details (I've cut off the time stamps column): dmesg_logs.zip

Before/after chrome GPU outputs: chrome_gpu_outputs.zip

System still boot up in GUI desktop but seems everything is in software rendering mode.

I did not touch the stock user space mali yet:
~# dpkg -l libmali-rk-midgard-r9p0-r0p0
ii libmali-rk-midgard-r9p0-r0p0:ar 1.5-4 armhf The mali library for Rockchip RK3288(not included RK3288W).

Should I replace it with libmali-rk-midgard-t76x-r14p0-r0p0_1.6-1_armhf.deb and see what happen?

@Miouyouyou
Copy link
Owner

Okay, so in order :

The Vblank timeout issue seems to be a common random issue that can occur on multiple systems : anholt/linux#66

What is the resolution of your screen ? Does it happen with other screens at 1080p resolution ? Does it also happen if you reboot ?

When you boot into the GUI, can you switch back to a console and see the login prompt ? (CTRL+ALT+F1)
If you can, try to install the https://github.com/rockchip-linux/rk-rootfs-build/blob/master/packages/armhf/libmali/libmali-rk-midgard-t76x-r14p0-r0p0-wayland_1.6-1_armhf.deb , then acquire the latest glmark2 from their Git, compile it and run the DRM version and see if you get something on the screen.

git clone --depth 1 https://github.com/glmark2/glmark2
cd glmark2
./waf configure --with-flavors=drm-glesv2
./waf
sudo ./waf install

The wayland drivers should have the necessary calls to deal with X11 too. Also note that if that's a fresh install, you might need the special snowflake xserver from Rockchip to get any acceleration done. ( https://github.com/rockchip-linux/rk-rootfs-build/tree/master/packages/armhf/xserver )
You can check if you have OpenGL ES 2 acceleration using es2_info, which is provided by mesa-utils-extra.
Use es2_info | grep -i vendor to check if you OpenGL ES 2 is done through Mesa or through Mali drivers.

Does the issue also occurs with the tarball of the latest RockMyy-Build (→ release). I just want to rule out potential compiler versions issues.

Also, if you can, have a try with other microUSB cables, just in case. Some random issues can happen when underpowering the board, due to an insufficient charger/cable combination. The worst being shutdown.

@samsonluk
Copy link

samsonluk commented Jul 21, 2018

What is the resolution of your screen ? Does it happen with other screens at 1080p resolution ? Does it also happen if you reboot ?

My TB connected via HDMI to a Toshiba 1080p TV, I am not aware of this Vblank timeout issue until now. I mainly using it with Android due to I cannot find any Kodi with HW accelerated support in the Linux world. I also found the SoC run much cooler while operate under Android.

If not look into the dmesg logs by no mean it can tell anything goes wrong after boot up because lightdm show up as usual without any complaint. I can see the screen resolution being set to 1920x22XX in the text mode for a few seconds before the GUI desktop, it switched back to 1080p automatically after that. If GUI being disabled upon boot, it will stay at 1920x22XX which is very difficult to view in the TV screen. I am about to ask how can text console default to 1080p upon boot up for using RockMyy kernel. No such problem with TinkerOS kernel.

When you boot into the GUI, can you switch back to a console and see the login prompt ?

Sure, I mainly manage it via ssh instead of sitting in front of the TV :) My remote is for Kodi operation.

Also note that if that's a fresh install, you might need the special snowflake xserver from Rockchip to get any acceleration done. ( https://github.com/rockchip-linux/rk-rootfs-build/tree/master/packages/armhf/xserver )

As mentioned, this is not a fresh install, I am just using RockMyy kernel with TinkerOS so I believe this Rockchip xserver already there. I will install libmali-rk-midgard-t76x-r14p0-r0p0-wayland_1.6-1_armhf.deb and compile glmark2 and get back.

Does the issue also occurs with the tarball of the latest RockMyy-Build (→ release). I just want to rule out potential compiler versions issues.

Will download and test before switching libmali.

Also, if you can, have a try with other microUSB cables, just in case. Some random issues can happen when underpowering the board, due to an insufficient charger/cable combination. The worst being shutdown.

Thanks for the reminder, I power it via GPIO with a 2.5A adapter.

@Miouyouyou
Copy link
Owner

Miouyouyou commented Jul 21, 2018

I guess that the HDMI detection is broken again in "fbdev" emulation mode. I remember that the default Rockchip 4.4 kernels, and the Tinkerboard ones, added a lot of modifications to HDMI related code to avoid this issue with the framebuffer.

Now the reason I'd like to check if DRM OpenGL ES work fine, is that it avoids the framebuffer code and only uses DRM/KMS directly. If everything goes fine in this mode, that would mean that the issue is mainly located into the Framebuffer emulation code.

You can, of course, switch to a console through SSH 😺

Just type, in your SSH console :

chvt 1 # 1 being the VT number. 1 -> CTRL+ALT+F1. 2 -> CTRL+ALT+F2

Then try to launch glmark2-es2-drm once it's installed.

If you feel adventurous enough, you could then try things like : https://github.com/dvdhrm/kmscon
This is a Virtual Terminal that uses the DRM/KMS backend for display, instead of the framebuffer code.

@samsonluk
Copy link

samsonluk commented Jul 22, 2018

Screen resolution is 1920x2205/24 before switch to GUI, 1080p/60 being correctly setup in GUI, below logs should explain why:

[    0.000000] rockchip_mmc_get_phase: invalid clk rate
[    0.000000] rockchip_mmc_get_phase: invalid clk rate
[    0.000000] rockchip_mmc_get_phase: invalid clk rate
[    0.000000] rockchip_mmc_get_phase: invalid clk rate
[    0.000000] rockchip_mmc_get_phase: invalid clk rate
[    0.000000] rockchip_mmc_get_phase: invalid clk rate
[    0.000000] rockchip_mmc_get_phase: invalid clk rate
[    0.000000] rockchip_mmc_get_phase: invalid clk rate
[    0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[    0.000008] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns

Confirmed, by install over tarball of the latest RockMyy-Build reproduce the same vblank timeout issue and this is not a random event, I have reboot and power on/off 4 to 5 times and it happened 100%.

BTW, I forgot from where did I download 4.15.0-rc9-Kernel-Maker-XV tarball? It should be from the branch before you updated 2 days ago in RockMyy-Build but I can only found v4.13-VPU-Test now. If you take a look on dmesg_4.15.0-rc9-Kernel-Maker-XV.log, this is the one without vblank timeout issue and I want to test it again. I lost that tarball...

@samsonluk
Copy link

samsonluk commented Jul 22, 2018

Google found 4.15.0-rc9-Kernel-Maker-XV - GitHub but is now 404-Page not found

Cache here

@Miouyouyou
Copy link
Owner

Miouyouyou commented Jul 22, 2018

Every time I push to RockMyy-Build, I delete the previous modules folders, else the size of the repository would go up dramatically. It's already very heavy, so I won't add more.

Anyway I've tagged the 4.15-rc9 released. You can now download it through the "releases" link. Note that you can also browse the history of a repository by clicking on "Commits" and then clicking on the "<>" link at the right of a commit. This link allows you to browse the repository at that commit point. In the browsing interface, Github provides a "Clone or Download" button, which allows you to download the whole repository. You can use that technique, to download the previous version of a repository.

Could you also give RockMyy 4.15, 4.16 and 4.17 a try ? I'm trying to pinpoint when this issue appeared. I think this is related to the IRQ issue that slowed down the Video Output to a crawl, and the associated patch.

Just change the kernel versions in the main script by 4.15, 4.16 or 4.17.

@samsonluk
Copy link

Noted and thanks for the hints on Git. I will give everyone a try and report back...

@samsonluk
Copy link

samsonluk commented Jul 22, 2018

Could you also give RockMyy 4.15, 4.16 and 4.17 a try ? I'm trying to pinpoint when this issue appeared. I think this is related to the IRQ issue that slowed down the Video Output to a crawl, and the associated patch.

Just change the kernel versions in the main script by 4.15, 4.16 or 4.17.

I suppose no need to delete linux/ folder, right? Here we go:

root@91d81f86bc53:/usr/src# diff GetPatchAndCompileKernel.sh GetPatchAndCompileKernel_4.18-rc5.sh
10,11c10,11
< export KERNEL_SERIES=v4.16
< export KERNEL_BRANCH=v4.16
---
> export KERNEL_SERIES=v4.18
> export KERNEL_BRANCH=v4.18-rc5
root@91d81f86bc53:/usr/src# bash GetPatchAndCompileKernel.sh
scripts/kconfig/conf  --oldconfig Kconfig
#
# configuration written to .config
#
scripts/kconfig/conf  --syncconfig Kconfig
  CALL    scripts/checksyscalls.sh
<stdin>:1332:2: warning: #warning syscall io_pgetevents not implemented [-Wcpp]
  CHK     include/generated/compile.h

Seems not, have to remove linux/ :(

@samsonluk
Copy link

samsonluk commented Jul 22, 2018

Patch missed:

--2018-07-22 01:39:06--  https://raw.githubusercontent.com/Miouyouyou/RockMyy/master/patches/kernel/v4.16/0007-drivers-drm-rockchip-Enable-IRQ-on-unbi
nd.patch
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.76.133
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.76.133|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2018-07-22 01:39:07 ERROR 404: Not Found.

Could not download 0007-drivers-drm-rockchip-Enable-IRQ-on-unbind.patch

@samsonluk
Copy link

samsonluk commented Jul 22, 2018

Seems not just missing... hopefully can be fixed by getting GetPatchAndCompileKernel.sh at The 4.16.0 !

Keep going now... Thanks for the Git tutorial...

@samsonluk
Copy link

samsonluk commented Jul 22, 2018

Test Summary:
dmesg_4.15.0-rc9-Kernel-Maker-XV.log - No vblank timeout
dmesg_4.16-RockMyy-16Bits-Edition.log - with vblank timeout
dmesg_4.18.0-rc5-RockMyy-181818.log - with vblank timeout

On which kernel I should work on other mentioned stuff?

@Miouyouyou
Copy link
Owner

Ok, Could you try one last time with this script : https://raw.githubusercontent.com/Miouyouyou/RockMyy/96213ddf19c13d054e863e999be8e89630504900/GetPatchAndCompileKernel.sh

So I can be sure that the issue occurred at the 4.16-rc1 release.

@samsonluk
Copy link

Ok, started...

@samsonluk
Copy link

Script failed:

--2018-07-22 10:49:08--  https://raw.githubusercontent.com/Miouyouyou/RockMyy/master/patches/kernel/v4.16/0005-ASUS-Tinkerboard-Stupid-reboot.patch
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.76.133
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.76.133|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2018-07-22 10:49:08 ERROR 404: Not Found.

Could not download 0005-ASUS-Tinkerboard-Stupid-reboot.patch

@Miouyouyou
Copy link
Owner

Replace that patch reference by 0005-drivers-mmc-dw-mci-rockchip-Handle-ASUS-Tinkerboard.patch. The old got moved to 0005-dw_mmc-The-stupid-ASUS-Reboot.patch

@Miouyouyou
Copy link
Owner

Miouyouyou commented Jul 22, 2018

Or you can add that patch to the patches/kernel/v4.16 folder :
https://raw.githubusercontent.com/Miouyouyou/RockMyy/96213ddf19c13d054e863e999be8e89630504900/patches/kernel/v4.16/0005-ASUS-Tinkerboard-Stupid-reboot.patch

cd patches/kernel/v4.16
wget https://raw.githubusercontent.com/Miouyouyou/RockMyy/96213ddf19c13d054e863e999be8e89630504900/patches/kernel/v4.16/0005-ASUS-Tinkerboard-Stupid-reboot.patch
cd -

@samsonluk
Copy link

Ok, passed

@Miouyouyou
Copy link
Owner

The compilation passed or the vblank issue did not occur ? 😺

@samsonluk
Copy link

Sorry, I mean script passed. Compilation just completed, wait...

@samsonluk
Copy link

PASSED! No vblank timeout for dmesg_4.16-rc1-RockMyy-16Bits-Edition.log

@Miouyouyou
Copy link
Owner

So that's between the 4.16-rc1 and the release that something went wrong with the framebuffer...

I'll check the logs of the mainline kernel, to see if that's something that was added over there.

@Miouyouyou
Copy link
Owner

Ok, just for the DRM subsystem alone, we're around 130 patches between the 4.16-rc1 and the 4.16

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/log/drivers/gpu/drm?h=v4.16
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/log/drivers/gpu/drm?h=v4.16-rc1

The fbdev driver in the other hand received too few modifications it seems :

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/log/drivers/video?h=v4.16-rc1
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/log/drivers/video?h=v4.16

On my side, there were no major changes between each 4.16-rcX versions. Only the ASUS Tinkerboard reboot patch got modified.

So, have a try with the rc4, at least, this should cut the chase in half.
Here's the RockMyy repo at that moment, with the scripts and patches : https://github.com/Miouyouyou/RockMyy/archive/0dfd08eeb9ca1ece37b083e22c494afd5f4a379c.zip

If I can test it on a TV this week, I'll give it a try. On my ASUS Screen, the problem doesn't occur, so I need to pinpoint two rcX versions where the problem occured and did not occur.
logs.txt

Then, it will be time for educated guesses and test patches, based on the modifications added between those two versions, to understand what's going on exactly and how to solve it.

@Miouyouyou
Copy link
Owner

Meanwhile, I'll open a new bug report.

@Miouyouyou
Copy link
Owner

Here, let's continue the conversation there : Miouyouyou/RockMyy#9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants