rockchip-linux / kernel

BSP kernel source
Other
917 stars 1.07k forks source link

Mali driver fails to initialize #39

Open teseo-sw opened 6 years ago

teseo-sw commented 6 years ago

Often the mali driver stack fails to initialize:

$ glmark2-es2
ERROR: The DDK is not compatible with any of the Mali GPUs on the system.
The DDK was built for 0x750 r0p0 status range [1..1], but none of the GPUs matched:
Error: eglInitialize() failed with error: 0x3001
ERROR: The DDK is not compatible with any of the Mali GPUs on the system.
The DDK was built for 0x750 r0p0 status range [1..1], but none of the GPUs matched:
Error: eglInitialize() failed with error: 0x3001
Error: main: Could not initialize canvas

The only thing I can do at that point is to repeatedly reboot until driver starts up correctly and I'm able to access the GPU again.

$ dmesg
[    0.000000] Booting Linux on physical CPU 0x500
[    0.000000] Linux version 4.4.16-pTAM8_v00.01 (teseo@teseo-desktop) (gcc version 6.2.0 (GCC) ) #3 SMP Tue Oct 10 16:50:43 CEST 2017
[    0.000000] CPU: ARMv7 Processor [410fc0d1] revision 1 (ARMv7), cr=10c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] Machine model: Boardcon-RK3288
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] On node 0 totalpages: 524288
[    0.000000] free_area_init_node: node 0, pgdat c109b180, node_mem_map eeffa000
[    0.000000]   Normal zone: 1536 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 196608 pages, LIFO batch:31
[    0.000000]   HighMem zone: 327680 pages, LIFO batch:31
[    0.000000] PERCPU: Embedded 13 pages/cpu @eef8e000 s24024 r8192 d21032 u53248
[    0.000000] pcpu-alloc: s24024 r8192 d21032 u53248 alloc=13*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 522752
[    0.000000] Kernel command line: earlyprintk=ttyS2,115200 console=tty0 console=ttyS2,115200 androidboot.selinux=permissive androidboot.hardware=rk30board androidboot.console=ttyS2 root=/dev/mmcblk2p3 rw rootfstype=ext4 init=/sbin/init  mtdparts=rk29xxnand:0x00010000@0x00002000(boot),0x00002000@0x00012000(backup),-@0x00014000(linuxroot) storagemedia=emmc uboot_logo=0x02000000@0x7dc00000 loader.timestamp=2015-06-20_15:49:25
[    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: 2060256K/2097152K available (11022K kernel code, 656K rwdata, 2848K rodata, 1024K init, 517K bss, 36896K 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 - 0xc0e8ba0c   (14863 kB)
[    0.000000]       .init : 0xc0f00000 - 0xc1000000   (1024 kB)
[    0.000000]       .data : 0xc1000000 - 0xc10a4300   ( 657 kB)
[    0.000000]        .bss : 0xc10a6000 - 0xc11275f8   ( 518 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000]  Build-time adjustment of leaf fanout to 32.
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] L2C: failed to init: -19
[    0.000000] rockchip_clk_register_ddrclk: unsupported ddrclk type 3
[    0.000000] rockchip_clk_register_branches: failed to register clock sclk_ddrc: -22
[    0.000000] Architected 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.000006] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[    0.000023] Switching to timer-based delay loop, resolution 41ns
[    0.001955] Console: colour dummy device 80x30
[    0.002863] console [tty0] enabled
[    0.002913] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[    0.002974] pid_max: default: 32768 minimum: 301
[    0.003094] Security Framework initialized
[    0.003127] Yama: becoming mindful.
[    0.003214] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.003254] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.004059] CPU: Testing write buffer coherency: ok
[    0.004128] ftrace: allocating 34301 entries in 101 pages
[    0.078846] CPU0: update cpu_capacity 430
[    0.078888] CPU0: thread -1, cpu 0, socket 5, mpidr 80000500
[    0.079233] Setting up static identity map for 0x100000 - 0x100058
[    0.082123] CPU1: update cpu_capacity 430
[    0.082130] CPU1: thread -1, cpu 1, socket 5, mpidr 80000501
[    0.083887] CPU2: update cpu_capacity 430
[    0.083894] CPU2: thread -1, cpu 2, socket 5, mpidr 80000502
[    0.085633] CPU3: update cpu_capacity 430
[    0.085640] CPU3: thread -1, cpu 3, socket 5, mpidr 80000503
[    0.085724] Brought up 4 CPUs
[    0.085851] SMP: Total of 4 processors activated (192.00 BogoMIPS).
[    0.085873] CPU: All CPU(s) started in SVC mode.
[    0.087373] devtmpfs: initialized
[    0.101891] VFP support v0.3: implementor 41 architecture 3 part 30 variant d rev 0
[    0.102303] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.102654] pinctrl core: initialized pinctrl subsystem
[    0.103740] NET: Registered protocol family 16
[    0.104579] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.128583] cpuidle: using governor ladder
[    0.158605] cpuidle: using governor menu
[    0.173659] gpiochip_add: registered GPIOs 0 to 23 on device: gpio0
[    0.173793] gpiochip_add: registered GPIOs 24 to 55 on device: gpio1
[    0.173912] gpiochip_add: registered GPIOs 56 to 87 on device: gpio2
[    0.174029] gpiochip_add: registered GPIOs 88 to 119 on device: gpio3
[    0.174152] gpiochip_add: registered GPIOs 120 to 151 on device: gpio4
[    0.174270] gpiochip_add: registered GPIOs 152 to 183 on device: gpio5
[    0.174393] gpiochip_add: registered GPIOs 184 to 215 on device: gpio6
[    0.174511] gpiochip_add: registered GPIOs 216 to 247 on device: gpio7
[    0.174628] gpiochip_add: registered GPIOs 248 to 263 on device: gpio8
[    0.185124] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[    0.185168] hw-breakpoint: maximum watchpoint size is 4 bytes.
[    0.219964] of_get_named_gpiod_flags: can't parse 'gpio' property of node '/dovdd-1v8-regulator[0]'
[    0.220287] of_get_named_gpiod_flags: can't parse 'gpio' property of node '/vsys-regulator[0]'
[    0.220692] of_get_named_gpiod_flags: parsed 'gpio' property of node '/sdmmc-regulator[0]' - status (0)
[    0.221026] of_get_named_gpiod_flags: can't parse 'gpio' property of node '/flash-regulator[0]'
[    0.221293] of_get_named_gpiod_flags: can't parse 'gpio' property of node '/usb-regulator[0]'
[    0.221670] of_get_named_gpiod_flags: parsed 'gpio' property of node '/usb-host-regulator[0]' - status (0)
[    0.222054] of_get_named_gpiod_flags: parsed 'gpio' property of node '/usb-otg-regulator[0]' - status (0)
[    0.222427] of_get_named_gpiod_flags: parsed 'gpio' property of node '/vcc28-dvp-regulator[0]' - status (0)
[    0.223137] iommu: Adding device ff930000.vop to group 0
[    0.223249] iommu: Adding device ff940000.vop to group 1
[    0.223354] iommu: Adding device ff9a0000.video-codec to group 2
[    0.224483] SCSI subsystem initialized
[    0.224787] usbcore: registered new interface driver usbfs
[    0.224875] usbcore: registered new interface driver hub
[    0.224954] usbcore: registered new device driver usb
[    0.225115] Linux video capture interface: v2.00
[    0.225177] pps_core: LinuxPPS API ver. 1 registered
[    0.225200] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.225255] PTP clock support registered
[    0.225780] Advanced Linux Sound Architecture Driver Initialized.
[    0.226566] Bluetooth: Core ver 2.21
[    0.226622] NET: Registered protocol family 31
[    0.226644] Bluetooth: HCI device and connection manager initialized
[    0.226675] Bluetooth: HCI socket layer initialized
[    0.226702] Bluetooth: L2CAP socket layer initialized
[    0.226752] Bluetooth: SCO socket layer initialized
[    0.228076] clocksource: Switched to clocksource arch_sys_counter
[    0.287945] NET: Registered protocol family 2
[    0.288746] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
[    0.288861] TCP bind hash table entries: 8192 (order: 5, 163840 bytes)
[    0.289119] TCP: Hash tables configured (established 8192 bind 8192)
[    0.289231] UDP hash table entries: 512 (order: 2, 24576 bytes)
[    0.289323] UDP-Lite hash table entries: 512 (order: 2, 24576 bytes)
[    0.289656] NET: Registered protocol family 1
[    0.290095] RPC: Registered named UNIX socket transport module.
[    0.290124] RPC: Registered udp transport module.
[    0.290145] RPC: Registered tcp transport module.
[    0.290166] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.291090] hw perfevents: enabled with armv7_cortex_a12 PMU driver, 7 counters available
[    0.292921] futex hash table entries: 1024 (order: 4, 65536 bytes)
[    0.293640] Initialise system trusted keyring
[    0.304860] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.307013] NFS: Registering the id_resolver key type
[    0.307070] Key type id_resolver registered
[    0.307092] Key type id_legacy registered
[    0.307133] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    0.307230] fuse init (API version 7.23)
[    0.312653] NET: Registered protocol family 38
[    0.312703] Key type asymmetric registered
[    0.312733] Asymmetric key parser 'x509' registered
[    0.312832] bounce: pool size: 64 pages
[    0.313075] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[    0.313122] io scheduler noop registered
[    0.313151] io scheduler deadline registered
[    0.313354] io scheduler cfq registered (default)
[    0.313788] rockchip-usb-phy phy: GPIO lookup for consumer vbus_drv
[    0.313800] rockchip-usb-phy phy: using device tree for GPIO lookup
[    0.313814] of_get_named_gpiod_flags: can't parse 'vbus_drv-gpios' property of node '/phy[0]'
[    0.313826] of_get_named_gpiod_flags: can't parse 'vbus_drv-gpio' property of node '/phy[0]'
[    0.313837] rockchip-usb-phy phy: using lookup tables for GPIO lookup
[    0.313849] rockchip-usb-phy phy: lookup for GPIO vbus_drv failed
[    0.313861] rockchip-usb-phy phy: vbus_drv is not assigned!
[    0.316136] pwm-backlight backlight: GPIO lookup for consumer enable
[    0.316150] pwm-backlight backlight: using device tree for GPIO lookup
[    0.316186] of_get_named_gpiod_flags: parsed 'enable-gpios' property of node '/backlight[0]' - status (0)
[    0.316240] backlight supply power not found, using dummy regulator
[    0.319047] dma-pl330 ff250000.dma-controller: Loaded driver for PL330 DMAC-241330
[    0.319093] dma-pl330 ff250000.dma-controller:   DBUFF-128x8bytes Num_Chans-8 Num_Peri-20 Num_Events-16
[    0.320068] dma-pl330 ffb20000.dma-controller: Loaded driver for PL330 DMAC-241330
[    0.320111] dma-pl330 ffb20000.dma-controller:   DBUFF-64x8bytes Num_Chans-5 Num_Peri-6 Num_Events-10
[    0.320818] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    0.322786] ff180000.serial: ttyS0 at MMIO 0xff180000 (irq = 39, base_baud = 1500000) is a 16550A
[    0.323631] ff190000.serial: ttyS1 at MMIO 0xff190000 (irq = 40, base_baud = 1500000) is a 16550A
[    0.324454] console [ttyS2] disabled
[    0.324515] ff690000.serial: ttyS2 at MMIO 0xff690000 (irq = 41, base_baud = 1500000) is a 16550A
[    1.083906] console [ttyS2] enabled
[    1.088384] ff1b0000.serial: ttyS3 at MMIO 0xff1b0000 (irq = 42, base_baud = 1500000) is a 16550A
[    1.098764] func: gpio_controller_probe
[    1.102642] of_get_named_gpiod_flags: parsed 'sata_enable' property of node '/gpio-controller[0]' - status (0)
[    1.118115] of_get_named_gpiod_flags: parsed 'sata_reset' property of node '/gpio-controller[0]' - status (0)
[    1.138255] [drm] Initialized drm 1.1.0 20060810
[    1.144299] [drm:rockchip_lvds_probe] *ERROR* failed to find panel
[    1.150587] platform ff96c000.lvds: Driver rockchip-lvds requests probe deferral
[    1.159255] usbcore: registered new interface driver udl
[    1.165962] lvds_panel supply power not found, using dummy regulator
[    1.172408] panel-simple lvds_panel: GPIO lookup for consumer enable
[    1.172420] panel-simple lvds_panel: using device tree for GPIO lookup
[    1.172452] of_get_named_gpiod_flags: parsed 'enable-gpios' property of node '/lvds_panel[0]' - status (0)
[    1.172467] no flags found for enable
[    1.173918] platform ffa30000.gpu: Driver mali requests probe deferral
[    1.181844] brd: module loaded
[    1.192086] loop: module loaded
[    1.195284] lkdtm: No crash points registered, enable through debugfs
[    1.206128] tun: Universal TUN/TAP device driver, 1.6
[    1.211235] tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
[    1.217629] CAN device driver interface
[    1.221781] vcc_5v: supplied by vcc_sys
[    1.258979] rk_gmac-dwmac ff290000.ethernet: phy regulator is not available yet, deferred probing
[    1.267916] platform ff290000.ethernet: Driver rk_gmac-dwmac requests probe deferral
[    1.276248] PPP generic driver version 2.4.2
[    1.280876] usbcore: registered new interface driver rndis_wlan
[    1.287031] usbcore: registered new interface driver rt2800usb
[    1.293163] pegasus: v0.9.3 (2013/04/25), Pegasus/Pegasus II USB Ethernet driver
[    1.300671] usbcore: registered new interface driver pegasus
[    1.306400] usbcore: registered new interface driver rtl8150
[    1.312147] usbcore: registered new interface driver r8152
[    1.317714] usbcore: registered new interface driver asix
[    1.323198] usbcore: registered new interface driver ax88179_178a
[    1.329383] usbcore: registered new interface driver cdc_ether
[    1.335283] usbcore: registered new interface driver dm9601
[    1.340958] usbcore: registered new interface driver smsc75xx
[    1.346789] usbcore: registered new interface driver smsc95xx
[    1.352620] usbcore: registered new interface driver net1080
[    1.358360] usbcore: registered new interface driver rndis_host
[    1.364344] usbcore: registered new interface driver MOSCHIP usb-ethernet driver
[    1.371877] usbcore: registered new interface driver cdc_ncm
[    1.377602] usbcore: registered new interface driver cdc_mbim
[    1.383769] ff540000.usb supply vusb_d not found, using dummy regulator
[    1.390475] ff540000.usb supply vusb_a not found, using dummy regulator
[    1.557440] dwc2 ff540000.usb: DWC OTG Controller
[    1.562216] dwc2 ff540000.usb: new USB bus registered, assigned bus number 1
[    1.569320] dwc2 ff540000.usb: irq 46, io mem 0x00000000
[    1.574912] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    1.581734] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.588988] usb usb1: Product: DWC OTG Controller
[    1.593704] usb usb1: Manufacturer: Linux 4.4.16-pTAM8_v00.01 dwc2_hsotg
[    1.600428] usb usb1: SerialNumber: ff540000.usb
[    1.605762] hub 1-0:1.0: USB hub found
[    1.609591] hub 1-0:1.0: 1 port detected
[    1.614170] ff580000.usb supply vusb_d not found, using dummy regulator
[    1.620877] ff580000.usb supply vusb_a not found, using dummy regulator
[    1.918118] dwc2 ff580000.usb: EPs: 10, dedicated fifos, 972 entries in SPRAM
[    1.925674] dwc2 ff580000.usb: DWC OTG Controller
[    1.930439] dwc2 ff580000.usb: new USB bus registered, assigned bus number 2
[    1.937523] dwc2 ff580000.usb: irq 47, io mem 0x00000000
[    1.943024] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
[    1.949845] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.957086] usb usb2: Product: DWC OTG Controller
[    1.961815] usb usb2: Manufacturer: Linux 4.4.16-pTAM8_v00.01 dwc2_hsotg
[    1.968539] usb usb2: SerialNumber: ff580000.usb
[    1.973820] hub 2-0:1.0: USB hub found
[    1.977613] hub 2-0:1.0: 1 port detected
[    1.982907] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.989481] ehci-platform: EHCI generic platform driver
[    1.995002] ehci-platform ff500000.usb: EHCI Host Controller
[    2.000915] ehci-platform ff500000.usb: new USB bus registered, assigned bus number 3
[    2.008906] ehci-platform ff500000.usb: irq 45, io mem 0xff500000
[    2.028102] ehci-platform ff500000.usb: USB 2.0 started, EHCI 1.00
[    2.034454] usb usb3: New USB device found, idVendor=1d6b, idProduct=0002
[    2.041285] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.048544] usb usb3: Product: EHCI Host Controller
[    2.053434] usb usb3: Manufacturer: Linux 4.4.16-pTAM8_v00.01 ehci_hcd
[    2.059990] usb usb3: SerialNumber: ff500000.usb
[    2.065286] hub 3-0:1.0: USB hub found
[    2.069109] hub 3-0:1.0: 1 port detected
[    2.073781] usbcore: registered new interface driver cdc_acm
[    2.079485] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[    2.087666] usbcore: registered new interface driver cdc_wdm
[    2.093489] usbcore: registered new interface driver usb-storage
[    2.099645] usbcore: registered new interface driver usbserial
[    2.105535] usbcore: registered new interface driver usbserial_generic
[    2.112130] usbserial: USB Serial support registered for generic
[    2.118222] usbcore: registered new interface driver cp210x
[    2.123839] usbserial: USB Serial support registered for cp210x
[    2.129872] usbcore: registered new interface driver ftdi_sio
[    2.135664] usbserial: USB Serial support registered for FTDI USB Serial Device
[    2.143174] usbcore: registered new interface driver keyspan
[    2.148898] usbserial: USB Serial support registered for Keyspan - (without firmware)
[    2.156779] usbserial: USB Serial support registered for Keyspan 1 port adapter
[    2.164162] usbserial: USB Serial support registered for Keyspan 2 port adapter
[    2.171615] usbserial: USB Serial support registered for Keyspan 4 port adapter
[    2.179025] usbcore: registered new interface driver option
[    2.184645] usbserial: USB Serial support registered for GSM modem (1-port)
[    2.191849] usbcore: registered new interface driver oti6858
[    2.197556] usbserial: USB Serial support registered for oti6858
[    2.203655] usbcore: registered new interface driver pl2303
[    2.209289] usbserial: USB Serial support registered for pl2303
[    2.215284] usbcore: registered new interface driver qcserial
[    2.221093] usbserial: USB Serial support registered for Qualcomm USB modem
[    2.228153] usbcore: registered new interface driver sierra
[    2.233772] usbserial: USB Serial support registered for Sierra USB modem
[    2.241414] usbcore: registered new interface driver usbtouchscreen
[    2.248024] i2c /dev entries driver
[    2.252389] rk3x-i2c ff140000.i2c: Initialized RK3xxx I2C bus at f08dc000
[    2.259991] at24 3-0050: 8192 byte 24c64 EEPROM, writable, 32 bytes/write
[    2.267106] rk3x-i2c ff150000.i2c: Initialized RK3xxx I2C bus at f08de000
[    2.274684] rk3x-i2c ff170000.i2c: Initialized RK3xxx I2C bus at f08f2000
[    2.282326] fan53555-regulator 0-0040: GPIO lookup for consumer vsel
[    2.282339] fan53555-regulator 0-0040: using device tree for GPIO lookup
[    2.282354] of_get_named_gpiod_flags: can't parse 'vsel-gpios' property of node '/i2c@ff650000/syr827@40[0]'
[    2.282367] of_get_named_gpiod_flags: can't parse 'vsel-gpio' property of node '/i2c@ff650000/syr827@40[0]'
[    2.282378] fan53555-regulator 0-0040: using lookup tables for GPIO lookup
[    2.282390] fan53555-regulator 0-0040: lookup for GPIO vsel failed
[    2.282788] fan53555-regulator 0-0040: FAN53555 Option[8] Rev[1] Detected!
[    2.290062] vdd_cpu: No configuration
[    2.294946] fan53555-regulator 0-0041: GPIO lookup for consumer vsel
[    2.294959] fan53555-regulator 0-0041: using device tree for GPIO lookup
[    2.294972] of_get_named_gpiod_flags: can't parse 'vsel-gpios' property of node '/i2c@ff650000/syr828@41[0]'
[    2.294984] of_get_named_gpiod_flags: can't parse 'vsel-gpio' property of node '/i2c@ff650000/syr828@41[0]'
[    2.294995] fan53555-regulator 0-0041: using lookup tables for GPIO lookup
[    2.295006] fan53555-regulator 0-0041: lookup for GPIO vsel failed
[    2.295349] fan53555-regulator 0-0041: FAN53555 Option[8] Rev[1] Detected!
[    2.302594] vdd_gpu: No configuration
[    2.309931] rtc-hym8563 0-0051: rtc core: registered hym8563 as rtc0
[    2.316998] rockchip-pinctrl pinctrl: pin gpio7-14 already requested by ff120000.spi; cannot claim for 0-005a
[    2.326967] rockchip-pinctrl pinctrl: pin-230 (0-005a) status -22
[    2.333087] rockchip-pinctrl pinctrl: could not request pin 230 (gpio7-14) from group pmic-vsel  on device rockchip-pinctrl
[    2.344245] act8865 0-005a: Error applying setting, reverse things back
[    2.359490] rk3x-i2c ff650000.i2c: Initialized RK3xxx I2C bus at f08f4000
[    2.367127] func: lt8618_i2c_probe
[    2.380955] rk3x-i2c ff660000.i2c: Initialized RK3xxx I2C bus at f08f6000
[    2.388111] usb 3-1: new high-speed USB device number 2 using ehci-platform
[    2.388690] probe device ff9a0000.video-codec
[    2.399578] rockchip-vpu ff9a0000.video-codec: Rockchip VPU encoder registered as /vpu/video0
[    2.408377] rockchip-vpu ff9a0000.video-codec: Rockchip VPU decoder registered as /vpu/video1
[    2.417199] usbcore: registered new interface driver uvcvideo
[    2.422979] USB Video Class driver (1.1.1)
[    2.427943] vcc_io: supplied by vcc_sys
[    2.432437] vcc28_dvp: supplied by vcc_io
[    2.436657] dovdd_1v8: supplied by vcc28_dvp
[    2.441117] vcc_flash: supplied by vcc_io
[    2.445424] vcc_lan: supplied by vcc_sys
[    2.449843] vcc_20: supplied by vcc_sys
[    2.453877] vcc_18: supplied by vcc_20
[    2.458680] vcca_33: supplied by vcc_sys
[    2.463198] vccio_sd: supplied by vcc_sys
[    2.469543] rk_tsadcv2_initialize: Missing rockchip,grf property
[    2.477017] device-mapper: ioctl: 4.34.0-ioctl (2015-10-28) initialised: dm-devel@redhat.com
[    2.485877] Bluetooth: Virtual HCI driver ver 1.5
[    2.490800] Bluetooth: HCI UART driver ver 2.3
[    2.495260] Bluetooth: HCI UART protocol H4 registered
[    2.500427] Bluetooth: HCI UART protocol LL registered
[    2.505575] Bluetooth: HCI UART protocol ATH3K registered
[    2.511094] usbcore: registered new interface driver bfusb
[    2.516677] usbcore: registered new interface driver btusb
[    2.522571] vdd_cpu: supplied by vcc_sys
[    2.529827] cpufreq-dt cpufreq-dt: failed register driver: -17
[    2.535668] cpufreq-dt: probe of cpufreq-dt failed with error -17
[    2.541813] sdhci: Secure Digital Host Controller Interface driver
[    2.547990] sdhci: Copyright(c) Pierre Ossman
[    2.552348] Synopsys Designware Multimedia Card Interface Driver
[    2.558661] usb 3-1: New USB device found, idVendor=0424, idProduct=2514
[    2.558811] dwmmc_rockchip ff0c0000.dwmmc: IDMAC supports 32-bit address mode.
[    2.558834] dwmmc_rockchip ff0c0000.dwmmc: Using internal DMA controller.
[    2.558840] dwmmc_rockchip ff0c0000.dwmmc: Version ID is 270a
[    2.558868] dwmmc_rockchip ff0c0000.dwmmc: DW MMC controller at irq 29,32 bit host data width,256 deep fifo
[    2.558924] vcc_sd: supplied by vcc_io
[    2.559280] dwmmc_rockchip ff0c0000.dwmmc: GPIO lookup for consumer cd
[    2.559283] dwmmc_rockchip ff0c0000.dwmmc: using device tree for GPIO lookup
[    2.559287] of_get_named_gpiod_flags: can't parse 'cd-gpios' property of node '/dwmmc@ff0c0000[0]'
[    2.559290] of_get_named_gpiod_flags: can't parse 'cd-gpio' property of node '/dwmmc@ff0c0000[0]'
[    2.559292] dwmmc_rockchip ff0c0000.dwmmc: using lookup tables for GPIO lookup
[    2.559296] dwmmc_rockchip ff0c0000.dwmmc: lookup for GPIO cd failed
[    2.559299] dwmmc_rockchip ff0c0000.dwmmc: GPIO lookup for consumer wp
[    2.559301] dwmmc_rockchip ff0c0000.dwmmc: using device tree for GPIO lookup
[    2.559304] of_get_named_gpiod_flags: can't parse 'wp-gpios' property of node '/dwmmc@ff0c0000[0]'
[    2.559306] of_get_named_gpiod_flags: can't parse 'wp-gpio' property of node '/dwmmc@ff0c0000[0]'
[    2.559308] dwmmc_rockchip ff0c0000.dwmmc: using lookup tables for GPIO lookup
[    2.559310] dwmmc_rockchip ff0c0000.dwmmc: lookup for GPIO wp failed
[    2.598607] usb 3-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    2.606123] hub 3-1:1.0: USB hub found
[    2.610026] hub 3-1:1.0: 4 ports detected
[    2.688100] mmc_host mmc0: Bus speed (slot 0) = 400000Hz (slot req 400000Hz, actual 400000HZ div = 0)
[    2.709128] dwmmc_rockchip ff0c0000.dwmmc: 1 slots initialized
[    2.715212] dwmmc_rockchip ff0d0000.dwmmc: IDMAC supports 32-bit address mode.
[    2.722460] dwmmc_rockchip ff0d0000.dwmmc: Using internal DMA controller.
[    2.729255] dwmmc_rockchip ff0d0000.dwmmc: Version ID is 270a
[    2.735023] dwmmc_rockchip ff0d0000.dwmmc: DW MMC controller at irq 30,32 bit host data width,256 deep fifo
[    2.744944] dwmmc_rockchip ff0d0000.dwmmc: No vmmc regulator found
[    2.751133] dwmmc_rockchip ff0d0000.dwmmc: GPIO lookup for consumer wp
[    2.751138] dwmmc_rockchip ff0d0000.dwmmc: using device tree for GPIO lookup
[    2.751144] of_get_named_gpiod_flags: can't parse 'wp-gpios' property of node '/dwmmc@ff0d0000[0]'
[    2.751149] of_get_named_gpiod_flags: can't parse 'wp-gpio' property of node '/dwmmc@ff0d0000[0]'
[    2.751153] dwmmc_rockchip ff0d0000.dwmmc: using lookup tables for GPIO lookup
[    2.751158] dwmmc_rockchip ff0d0000.dwmmc: lookup for GPIO wp failed
[    2.751226] platform sdio-pwrseq: GPIO lookup for consumer reset
[    2.751231] platform sdio-pwrseq: using device tree for GPIO lookup
[    2.751241] of_get_named_gpiod_flags: parsed 'reset-gpios' property of node '/sdio-pwrseq[0]' - status (0)
[    2.751265] dwmmc_rockchip ff0d0000.dwmmc: allocated mmc-pwrseq
[    2.768096] mmc_host mmc1: Bus speed (slot 0) = 400000Hz (slot req 400000Hz, actual 400000HZ div = 0)
[    2.788105] dwmmc_rockchip ff0d0000.dwmmc: 1 slots initialized
[    2.794179] dwmmc_rockchip ff0f0000.dwmmc: IDMAC supports 32-bit address mode.
[    2.802437] dwmmc_rockchip ff0f0000.dwmmc: Using internal DMA controller.
[    2.809251] dwmmc_rockchip ff0f0000.dwmmc: Version ID is 270a
[    2.817030] dwmmc_rockchip ff0f0000.dwmmc: DW MMC controller at irq 31,32 bit host data width,256 deep fifo
[    2.827001] dwmmc_rockchip ff0f0000.dwmmc: GPIO lookup for consumer wp
[    2.827006] dwmmc_rockchip ff0f0000.dwmmc: using device tree for GPIO lookup
[    2.827015] of_get_named_gpiod_flags: can't parse 'wp-gpios' property of node '/dwmmc@ff0f0000[0]'
[    2.827020] of_get_named_gpiod_flags: can't parse 'wp-gpio' property of node '/dwmmc@ff0f0000[0]'
[    2.827024] dwmmc_rockchip ff0f0000.dwmmc: using lookup tables for GPIO lookup
[    2.827029] dwmmc_rockchip ff0f0000.dwmmc: lookup for GPIO wp failed
[    2.838088] mmc_host mmc2: Bus speed (slot 0) = 400000Hz (slot req 400000Hz, actual 400000HZ div = 0)
[    2.848088] mmc_host mmc1: Bus speed (slot 0) = 300000Hz (slot req 300000Hz, actual 300000HZ div = 0)
[    2.859161] dwmmc_rockchip ff0f0000.dwmmc: 1 slots initialized
[    2.867127] sdhci-pltfm: SDHCI platform and OF driver helper
[    2.873924] of_get_named_gpiod_flags: parsed 'gpios' property of node '/leds/work[0]' - status (0)
[    2.876036] of_get_named_gpiod_flags: parsed 'gpios' property of node '/leds/power[0]' - status (0)
[    2.876150] hidraw: raw HID events driver (C) Jiri Kosina
[    2.885058] usbcore: registered new interface driver usbhid
[    2.888078] usb 3-1.1: new low-speed USB device number 3 using ehci-platform
[    2.897702] usbhid: USB HID core driver
[    2.902885] usbcore: registered new interface driver snd-usb-audio
[    2.909691] platform sound_i2s: Driver asoc-simple-card requests probe deferral
[    2.917900] u32 classifier
[    2.921703] mmc2: MAN_BKOPS_EN bit is not set
[    2.926251] Initializing XFRM netlink socket
[    2.930995] NET: Registered protocol family 10
[    2.935468] mmc_host mmc2: Bus speed (slot 0) = 50000000Hz (slot req 52000000Hz, actual 50000000HZ div = 0)
[    2.945374] mmc2: new high speed MMC card at address 0001
[    2.950838] mmc_host mmc1: Bus speed (slot 0) = 200000Hz (slot req 200000Hz, actual 200000HZ div = 0)
[    2.951109] sit: IPv6 over IPv4 tunneling driver
[    2.951461] NET: Registered protocol family 17
[    2.951475] NET: Registered protocol family 15
[    2.951501] bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this.
[    2.951505] can: controller area network core (rev 20120528 abi 9)
[    2.951538] NET: Registered protocol family 29
[    2.951557] can: raw protocol (rev 20120528)
[    2.951561] can: broadcast manager protocol (rev 20120528 t)
[    2.951567] can: netlink gateway (rev 20130117) max_hops=1
[    2.951722] Bluetooth: RFCOMM socket layer initialized
[    2.951765] Bluetooth: RFCOMM ver 1.11
[    2.951775] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[    2.951780] Bluetooth: HIDP socket layer initialized
[    2.951813] 8021q: 802.1Q VLAN Support v1.8
[    2.951828] lib80211: common routines for IEEE802.11 drivers
[    2.951830] lib80211_crypt: registered algorithm 'NULL'
[    2.951835] lib80211_crypt: registered algorithm 'WEP'
[    2.951840] lib80211_crypt: registered algorithm 'CCMP'
[    2.951845] lib80211_crypt: registered algorithm 'TKIP'
[    2.951850] [WLAN_RFKILL]: Enter rfkill_wlan_init
[    2.952021] [WLAN_RFKILL]: Enter rfkill_wlan_probe
[    2.952039] [WLAN_RFKILL]: wlan_platdata_parse_dt: wifi_chip_type = ap6210
[    2.952042] [WLAN_RFKILL]: wlan_platdata_parse_dt: enable wifi power control.
[    2.952044] [WLAN_RFKILL]: wlan_platdata_parse_dt: wifi power controled by gpio.
[    2.952047] of_get_named_gpiod_flags: can't parse 'WIFI,poweren_gpio' property of node '/wireless-wlan[0]'
[    2.952049] of_get_named_gpiod_flags: can't parse 'WIFI,reset_gpio' property of node '/wireless-wlan[0]'
[    2.952066] of_get_named_gpiod_flags: parsed 'WIFI,host_wake_irq' property of node '/wireless-wlan[0]' - status (0)
[    2.952068] [WLAN_RFKILL]: wlan_platdata_parse_dt: get property: WIFI,host_wake_irq = 150, flags = 0.
[    2.952069] [WLAN_RFKILL]: rfkill_wlan_probe: init gpio
[    2.952074] [WLAN_RFKILL]: Exit rfkill_wlan_probe
[    2.952102] [BT_RFKILL]: Enter rfkill_rk_init
[    2.952299] [BT_RFKILL]: Enter rfkill_rk_probe
[    2.952302] [BT_RFKILL]: Enter bluetooth_platdata_parse_dt
[    2.952313] of_get_named_gpiod_flags: parsed 'uart_rts_gpios' property of node '/wireless-bluetooth[0]' - status (0)
[    2.952315] [BT_RFKILL]: bluetooth_platdata_parse_dt: get property: uart_rts_gpios = 139.
[    2.952319] of_get_named_gpiod_flags: can't parse 'BT,power_gpio' property of node '/wireless-bluetooth[0]'
[    2.952326] of_get_named_gpiod_flags: parsed 'BT,reset_gpio' property of node '/wireless-bluetooth[0]' - status (0)
[    2.952328] [BT_RFKILL]: bluetooth_platdata_parse_dt: get property: BT,reset_gpio = 149.
[    2.952334] of_get_named_gpiod_flags: parsed 'BT,wake_gpio' property of node '/wireless-bluetooth[0]' - status (0)
[    2.952336] [BT_RFKILL]: bluetooth_platdata_parse_dt: get property: BT,wake_gpio = 146.
[    2.952342] of_get_named_gpiod_flags: parsed 'BT,wake_host_irq' property of node '/wireless-bluetooth[0]' - status (0)
[    2.952343] [BT_RFKILL]: bluetooth_platdata_parse_dt: get property: BT,wake_host_irq = 151.
[    2.952355] [BT_RFKILL]: init gpio
[    2.952356] [BT_RFKILL]: Enter rfkill_rk_setup_gpio
[    2.952357] [BT_RFKILL]: Enter rfkill_rk_setup_gpio
[    2.952365] [BT_RFKILL]: Enter rfkill_rk_setup_gpio
[    2.952368] [BT_RFKILL]: Enter rfkill_rk_setup_gpio
[    2.952373] [BT_RFKILL]: Enter rfkill_rk_setup_wake_irq
[    2.952374] [BT_RFKILL]: Enter rfkill_rk_setup_gpio
[    2.952378] [BT_RFKILL]: Request irq for bt wakeup host
[    2.952416] [BT_RFKILL]: ** disable irq
[    2.952419] [BT_RFKILL]: setup rfkill
[    2.952506] [BT_RFKILL]: bt_default device registered.
[    2.952552] Key type dns_resolver registered
[    2.952869] ThumbEE CPU extension supported.
[    2.952881] Registering SWP/SWPB emulation handler
[    2.953270] Loading compiled-in X.509 certificates
[    2.968826] iommu: Adding device display-subsystem to group 3
[    2.968834] rockchip-drm display-subsystem: Possibly a virtual device
[    2.968983] rockchip-drm display-subsystem: bound ff940000.vop (ops vop_component_ops)
[    2.969076] rockchip-drm display-subsystem: bound ff930000.vop (ops vop_component_ops)
[    2.969120] rockchip-drm display-subsystem: bound ff96c000.lvds (ops rockchip_lvds_component_ops)
[    2.969196] dwhdmi-rockchip ff980000.hdmi: Detected HDMI controller 0x20:0xa:0xa0:0xc1
[    2.969604] rockchip-drm display-subsystem: bound ff980000.hdmi (ops dw_hdmi_rockchip_ops)
[    2.969745] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    2.969747] [drm] No driver support for vblank timestamp query.
[    2.969762] rockchip-drm display-subsystem: failed to parse display resources
[    3.036272] usb 3-1.1: New USB device found, idVendor=04d9, idProduct=1203
[    3.036276] usb 3-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    3.066060] input: HID 04d9:1203 as /devices/platform/ff500000.usb/usb3/3-1/3-1.1/3-1.1:1.0/0003:04D9:1203.0001/input/input0
[    3.128388] hid-generic 0003:04D9:1203.0001: input,hidraw0: USB HID v1.11 Keyboard [HID 04d9:1203] on usb-ff500000.usb-1.1/input0
[    3.177353] input: HID 04d9:1203 as /devices/platform/ff500000.usb/usb3/3-1/3-1.1/3-1.1:1.1/0003:04D9:1203.0002/input/input1
[    3.238248] hid-generic 0003:04D9:1203.0002: input,hidraw1: USB HID v1.11 Device [HID 04d9:1203] on usb-ff500000.usb-1.1/input1
[    3.341120] mmcblk2: mmc2:0001 8GND3R 7.28 GiB 
[    3.358107] mmcblk2boot0: mmc2:0001 8GND3R partition 1 4.00 MiB
[    3.358265] mmcblk2boot1: mmc2:0001 8GND3R partition 2 4.00 MiB
[    3.358395] mmcblk2rpmb: mmc2:0001 8GND3R partition 3 512 KiB
[    3.358813]       boot: 0x000400000 -- 0x002400000 (32 MB)
[    3.358816]     backup: 0x002400000 -- 0x002800000 (4 MB)
[    3.358819]  linuxroot: 0x002800000 -- 0x1d1c00000 (7412 MB)
[    3.368761]  mmcblk2: p1 p2 p3
[    3.368765] Console: switching to colour frame buffer device 240x67
[    3.445077] rockchip-drm display-subsystem: fb0:  frame buffer device
[    3.458933] vendor storage:20160801 ret = 0
[    3.478491] vdd_gpu: supplied by vcc_sys
[    3.483290] mali ffa30000.gpu: GPU identified as 0x0750 r0p0 status 1
[    3.490466] mali ffa30000.gpu: Probed as mali0
[    3.495641] rk_gmac-dwmac ff290000.ethernet: clock input or output? (input).
[    3.502844] rk_gmac-dwmac ff290000.ethernet: TX delay(0x30).
[    3.508622] rk_gmac-dwmac ff290000.ethernet: RX delay(0x10).
[    3.514450] rk_gmac-dwmac ff290000.ethernet: clock input from PHY
[    3.520668] rk_gmac-dwmac ff290000.ethernet: init for RGMII
[    3.531538] stmmac - user ID: 0x10, Synopsys ID: 0x35
[    3.536673]  Ring mode enabled
[    3.539794]  DMA HW capability register supported
[    3.544410]  Normal descriptors
[    3.547796]  RX Checksum Offload Engine supported (type 2)
[    3.553390]  TX Checksum insertion supported
[    3.557730]  Wake-Up On Lan supported
[    3.561497]  Enable RX Mitigation via HW Watchdog Timer
[    3.567370] of_get_named_gpiod_flags: parsed 'snps,reset-gpio' property of node '/ethernet@ff290000[0]' - status (0)
[    4.592036] libphy: stmmac: probed
[    4.595500] eth0: PHY ID 001cc915 at 0 IRQ POLL (stmmac-0:00) active
[    4.601990] eth0: PHY ID 001cc915 at 1 IRQ POLL (stmmac-0:01)
[    4.608141] of_get_named_gpiod_flags: can't parse 'simple-audio-card,hp-det-gpio' property of node '/sound_i2s[0]'
[    4.608147] of_get_named_gpiod_flags: can't parse 'simple-audio-card,mic-det-gpio' property of node '/sound_i2s[0]'
[    4.608985] asoc-simple-card sound_i2s: i2s-hifi <-> ff890000.i2s mapping ok
[    4.616960] of_get_named_gpiod_flags: parsed 'gpios' property of node '/gpio-keys/button@0[0]' - status (0)
[    4.617014] gpio-5 (GPIO Power): gpiod_set_debounce: missing set() or set_debounce() operations
[    4.617179] input: gpio-keys as /devices/platform/gpio-keys/input/input2
[    4.624607] rtc-hym8563 0-0051: setting system clock to 2017-10-16 09:37:33 UTC (1508146653)
[    4.641250] dovdd_1v8: disabling
[    4.644578] vcc_sd: disabling
[    4.648130] ALSA device list:
[    4.651165]   #0: rockchip,boardcon-codec
[    4.655521] ttyS2 - failed to request DMA
[    4.684276] EXT4-fs (mmcblk2p3): recovery complete
[    4.695213] EXT4-fs (mmcblk2p3): mounted filesystem with ordered data mode. Opts: (null)
[    4.709185] VFS: Mounted root (ext4 filesystem) on device 179:3.
[    4.721522] devtmpfs: mounted
[    4.730828] Freeing unused kernel memory: 1024K (c0f00000 - c1000000)
[    5.064128] udevd[152]: starting version 3.2
[    5.075381] random: udevd urandom read with 32 bits of entropy available
[    5.119208] udevd[153]: starting eudev-3.2
[    5.186071] EXT4-fs (mmcblk2p3): re-mounted. Opts: data=ordered
[    5.712957] eth0: device MAC address 5a:59:40:16:9b:a8
[    6.416623] ret = fffffff2
[    6.422372] ret = fffffff2
[   10.858495] rk_gmac-dwmac ff290000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off
[   23.741024] ret = fffffff2
[   23.743973] ret = fffffff2
[   23.747373] ret = fffffff2
[   23.750187] ret = fffffff2
[   56.772647] random: nonblocking pool is initialized
[  329.444002] ret = fffffff2
[  329.446993] ret = fffffff2
[  329.450087] ret = fffffff2
[  329.452903] ret = fffffff2
[  338.844784] ret = fffffff2
[  338.847706] ret = fffffff2
[  338.850798] ret = fffffff2
[  338.853579] ret = fffffff2

I'm using the morty branch of meta-rockchip.

wzyy2 commented 6 years ago

It might be kernel driver problem and morty branch is not maintained, you could checkout to pyro.

wzyy2 commented 6 years ago

" Boardcon-RK3288", oh, so is it your own board? You could try to increase gpu voltage, it might be hardware problem.

teseo-sw commented 6 years ago

Yes, it is a custom board based on EM3288 from Boardcon. I switched to pyro (libmali-midgard-r9p0-r0p0.so) but nothing changed.

Voltage settings:

vdd_gpu: syr828@41 {
    compatible = "silergy,syr828";
    fcs,suspend-voltage-selector = <1>;
    reg = <0x41>;
    regulator-name = "vdd_gpu";
    regulator-min-microvolt = <850000>;
    regulator-max-microvolt = <1350000>;
    regulator-always-on;
    regulator-ramp-delay = <6000>;
    vin-supply = <&vcc_sys>;
};

Are there any particular values you recommend?

wzyy2 commented 6 years ago

Search "gpu" "opp" in rk3288.dtsi.

teseo-sw commented 6 years ago

rk3288.dtsi:

gpu: gpu@ffa30000 {
    compatible = "arm,malit764",
             "arm,malit76x",
             "arm,malit7xx",
             "arm,mali-midgard";
    reg = <0xffa30000 0x10000>;
    interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>,
             <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>,
             <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
    interrupt-names = "JOB", "MMU", "GPU";
    clocks = <&cru ACLK_GPU>;
    clock-names = "clk_mali";
    operating-points = <
        /* KHz uV */
        600000 1250000
        /* 500000 1200000 - See crosbug.com/p/33857 */
        400000 1100000
        300000 1000000
        200000 950000
        100000 950000
    >;
    #cooling-cells = <2>; /* min followed by max */
    power-domains = <&power RK3288_PD_GPU>;
    status = "disabled";
};

Does this mean I should set regulator-[min,max]-microvolt to 950000 and 1250000 respectively?

teseo-sw commented 6 years ago

I upgraded to current release-4.4 and latest user-space mali drivers (r14-p0) but the problem persists. Here is the relevant dmesg output (note that the messages are the same regardless of whether mali fails to initialize or not:

root@ptam8:~# dmesg | grep mali   
[    1.403601] mali ffa30000.gpu: Failed to get regulator
[    1.409452] mali ffa30000.gpu: Power control initialization failed
[    4.868433] W : [File] : drivers/gpu/arm/midgard/platform/rk/mali_kbase_config_rk.c; [Line] : 135; [Func] : kbase_platform_rk_init(); power-off-delay-ms not available.
[    4.891492] mali ffa30000.gpu: GPU identified as 0x0750 r0p0 status 1
[    4.902349] I : [File] : drivers/gpu/arm/midgard/backend/gpu/mali_kbase_devfreq.c; [Line] : 284; [Func] : kbase_devfreq_init(); success initing power_model_simple.
[    4.925636] mali ffa30000.gpu: Probed as mali0
teseo-sw commented 6 years ago

I built mali driver as module and the messages about "regulator" and "power control" disappeared. It seems now that the driver never fails, probably because initialization happens at a later time:

root@ptam8:~# dmesg | grep mali
[    7.035345] W : [File] : drivers/gpu/arm/midgard/platform/rk/mali_kbase_config_rk.c; [Line] : 135; [Func] : kbase_platform_rk_init(); power-off-delay-ms not available.
[    7.064590] mali ffa30000.gpu: GPU identified as 0x0750 r0p0 status 1
[    7.086305] I : [File] : drivers/gpu/arm/midgard/backend/gpu/mali_kbase_devfreq.c; [Line] : 284; [Func] : kbase_devfreq_init(); success initing power_model_simple.
[    7.119409] mali ffa30000.gpu: Probed as mali0

I don't think that is intended behavior though, isn't it?

alandingbc commented 6 years ago

Hi, teseo-sw. I have the same problem. The error of regulator error in mali initialization actually is due to the order of modules loading. Generally, the regulator devices attached to the i2c bus. So the mali driver easily gets loading earlier than i2c slave devices. You can just modify the file 'mali_kbase_core_linux.c' and modify the function 'module_init()' to 'late_initcall()'. I have tested it and worked. But it seems the regulator doesn't actually cause the problem about the mali driver & libmali & egl. It's so weird that I have the correct userspace libmali which matching the kernel driver, however get eglinitialize error with 0x3001 too. If I use the xserver build by rockchip, it's okay. Maybe the glamor 2d acceleration influence the egl? All of these really confuse me. Hope Rockchip could provide instructions.

ydirson commented 4 years ago

FWIW, I start getting this error when migrating a yocto build from sumo to warrior, without changing kernel and with minimal meta-rockchip changes.

ydirson commented 4 years ago

In my case, if I use the exact same glmark2 version from sumo in my warrior build, use ltrace -S on glmark2-es2 and compare the results, what stands out is:

-eglInitialize(0x24b4680, 0x7ffc284788, 0x7ffc28478c, 0xffffffff <unfinished ...>
+eglInitialize(0x5598e03e50, 0x7fe7bc2c00, 0x7fe7bc2c04, 0xffffffff <unfinished ...>
...
-openat@SYS(AT_FDCWD, "/dev/dri/card0", 0x2, 00)                                                                       = 8
...
-<... eglInitialize resumed> )                                                                                         = 1
...
+openat@SYS(AT_FDCWD, "", 0x2, 00)                                                                                     = -2
+<... eglInitialize resumed> )                                                                                         = 0
+eglGetError(0, 0, 0x5598e03e68, 0)                                                                                    = 0x3001

For some reason libMali tries to open the driver with an empty string!