Hello,
i need to profile the GPU on an IMX6 Board. For this i got the hint to use the Vivante VDK Tools.
I build the BSP from the wiki.Wandboard.org repo init -u https://github.com/Freescale/fsl-community-bsp-platform .
I downloaded the Vivante VDK v1.4.6 and i wanted to follow the readme.txt.
Now i have to replace the libs from the Vivante Bundle, but i exactly dont know how to.
And then the Kernel source code from the gpu driver should should be modified, but i dont kwno where i can find these files in the Yocto Project because the guide is explained how to use this for Ltib.
Have any of you got this working? I'd be most grateful for any comments / suggestions.
Hi,
I know that this post is old but I followed i.MX_Graphics_User's_Guide.pdf seccion 7.6.2 in order to get the vProfiler and
vAnalyzer to work. I am using a i.MX6D. You have to enable the profiler at the kernel level. As someone mentioned there are several ways to do that. I used the U-Boot method, passing a kernel parameter through bootcmd:
In my case I used the following commands to achieve that:
U-boot>
Noticed that I just added galcore.gpuProfiler=1 to my current bootcmd variable.
You can confirmed if it worked using the following command from the shell:
cat /sys/module/galcore/parameters/gpuProfiler
if you get a 1, it worked.
Then you have to export the following env vars in the current session. In this case it is a X11 session, since I am going to profile an opengl application:
Finally you just have to run the application and the driver will create a file called sample.vpd in the running directory.
Regards,
Ariel Brunetto
Hi,
In case anyone does set =1 in kernel 4.1.15 bootparams and gpuProfiler does not get enabled (you get an empty vpd file), you can try replacing the value with the hex version of it, then also add showArgs, which will printout a debug message in dmesg while booting:
galcore.gpuProfiler=0x1 galcore.showArgs=0x1
eg:
[ 2.009390] Galcore version 5.0.11.41671
[ 2.015418] Galcore options:
[ 2.021366] irqLine = 310
[ 2.028173] registerMemBase = 0x00130000
[ 2.035534] registerMemSize = 0x00004000
[ 2.039851] irqLine2D = 311
[ 2.043522] registerMemBase2D = 0x00134000
[ 2.047869] registerMemSize2D = 0x00004000
[ 2.052161] contiguousSize = 134217728
[ 2.056395] contiguousBase = 0x00000000
[ 2.060701] bankSize = 0x00000000
[ 2.065031] fastClear = -1
[ 2.068660] compression = -1
[ 2.072283] signal = 48
[ 2.075973] powerManagement = -1
[ 2.079628] baseAddress = 0x00000000
[ 2.083958] usb 1-1: New USB device found, idVendor=0424, idProduct=2534
[ 2.090714] physSize = 0x80000000
[ 2.095040] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 2.102219] logFileSize = 0 KB
[ 2.106090] recovery = 1
[ 2.109584] stuckDump = 0
[ 2.113076] gpuProfiler = 1
to confirm gpuProfiler variable was set to 1 and should be enabled.
Thank you all for writing all the information in this public thread, since I couldn't have done it without your help !
Best regards, Gabriel
Hi Kim,
Please try to use the latest Linux BSP version. When building Vivante Graphics Drivers in a Linux environment, the driver is built with vProfiler capability.
To activate vProfiler functionality, there are two ways to do it:
1. we only need to add a sentence "galcore.gpuProfiler=1" in the attribute of bootargs in your boot configuration. For example, if use the nfs to boot the linux, we can configuration boot like: setenv bootargs_nfs 'setenv bootargs ${bootargs} root=/dev/nfs ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp video=mxcepdcfb:E060SCM,bpp=16 max17135:pass=2,vcom=-2030000 galcore.gpuProfiler=1'.
2. Use the command line to add the gpuProfiler=1 option, or add the option into an existing .sh script similar to the following:
#!/bin/bash
#
insmod /lib/modules/galcore.ko gpuProfiler=1 [OPTIONS]
chmod 777 /dev/galcore
Note: The path before file galcore.ko need not to reference this path, it is the path where your .ko file puts.
Hope this helps
i found that /dev/galcore is already there after i booted into my mx6 Linux BSP with or without the galcore.gpuProfiler=1.
anyway, i still configure my bootargs as follow:
setenv bootargs_mmc 'setenv bootargs ${bootargs} root=/dev/mmcblk0p1 init=/init rootwait galcore.gpuProfiler=1'
after boot into the rootfs,i configure my environment variables as follow:
export VPROFILER_OUTPUT = sample.vpd
export VPROFILER_FRAME_NUM =100
export VPROFILER_SYNC_MODE=1
I CANT find any sample.vpd created in my directory after I run an GLES2.0 application as provided by Vivante' GPU SDK (e.g. 02_ColoredTriangle).
Any help?
Hi Kim,
I also had trouble getting the GPU profiler run.
I suggest you download this (functional) Image : backup_vProfiler.gz - Google Drive
In order to test this image, here are some commands :
1) sudo gzip -dc /path/to/backup_vProfiler.gz | dd of=/dev/sdX
2) run script in /opt
- . ./profiler.sh
3) export VIV_PROFILE=1
4) run your application
5) put the vpd file into vAnalyser
This is a custom distribution (LTIB)
Help :
Regards
Pierre-Jean TEXIER
Pierre, thanks for your useful help.
I downloaded your image and found that it can't be booted.
fdisk -l backup_vProfiler
Disk backup_vProfiler: 1948 MB, 1948254208 bytes
60 heads, 62 sectors/track, 1022 cylinders, total 3805184 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00c46ff6
Device Boot Start End Blocks Id System
backup_vProfiler1 * 1 3801839 1900919+ 83 Linux
I then used kpartx to create a mapper and mounted it
sudo kpartx -a backup_vProfiler
sudo mount -o rw /dev/mapper/loop0p1 /mnt
ls -la /mnt
total 312
drwxr-xr-x 19 root root 4096 Jan 1 1970 .
drwxr-xr-x 25 root root 4096 Sep 12 19:11 ..
-rw-r--r-- 1 root root 1472 May 21 20:16 6x_bootscript
-rw-r--r-- 1 root root 1483 May 20 21:24 6x_bootscript.bak
drwxr-xr-x 2 root root 4096 Jan 1 1970 bin
drwxr-xr-x 2 root root 4096 Jan 1 1970 boot
drwxr-xr-x 2 root root 4096 May 20 21:21 dev
drwxr-xr-x 6 root root 4096 Jan 1 1970 etc
-rwxr-xr-x 1 root root 214220 Jan 1 1970 galcore.ko
drwxr-xr-x 3 root root 4096 May 20 21:21 home
drwxr-xr-x 5 root root 4096 May 20 21:21 lib
drwx------ 2 root root 16384 May 20 20:06 lost+found
drwxr-xr-x 7 root root 4096 May 20 21:22 mnt
drwxr-xr-x 4 root root 4096 Jan 1 1970 opt
drwxr-xr-x 2 root root 4096 May 20 21:23 proc
drwxr-xr-x 2 root root 4096 Jan 1 1970 root
drwxr-xr-x 2 root root 4096 May 20 21:23 sbin
drwxr-xr-x 2 root root 4096 May 20 21:23 sys
drwxr-xr-t 3 root root 4096 May 20 21:23 tmp
drwxr-xr-x 2 root root 4096 May 20 21:23 unit_tests
drwxr-xr-x 11 root root 4096 May 20 21:24 usr
drwxr-xr-x 11 root root 4096 May 20 21:24 var
May I know where i can obtain the linux kernel you used to boot the rootfs you have uploaded?
i managed to load the kernel after configuring uboot with the correct boot arguments
setenv bootargs_mmc 'setenv bootargs ${bootargs} root=/dev/mmcblk1p1 rootwait rw'
setenv bootcmd_mmc 'run bootargs_base bootargs_mmc; mmc dev 0; ext2load mmc 0:1 0x10800000 /boot/uImage; bootm'
however, it stuck at 'Waiting for root device /dev/mmcblk1p1...'
the complete boot log is as follow:
MX6Q ROM-3420 U-Boot > setenv bootargs_mmc 'setenv bootargs ${bootargs} root=/dev/mmcblk1p1 rootwait rw'
MX6Q ROM-3420 U-Boot > setenv bootcmd_mmc 'run bootargs_base bootargs_mmc; mmc dev 0; ext2load mmc 0:1 0x10800000 /boot/uImage; bootm'
MX6Q ROM-3420 U-Boot > boot
mmc0 is current device
Loading file "/boot/uImage" from mmc device 0:1 (xxa1)
3799316 bytes read
## Booting kernel from Legacy Image at 10800000 ...
Image Name: Linux-3.0.35-2666-gbdde708
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 3799252 Bytes = 3.6 MB
Load Address: 10008000
Entry Point: 10008000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK
Starting kernel ...
Uncompressing Linux... done, booting the kernel.
Linux version 3.0.35-2666-gbdde708 (evu@evu-SD30V10) (gcc version 4.6.2 20110630 (prerelease) (Freescale MAD -- Linaro 2011.07 -- Built at 2011/08/10 09:20) ) #2 SMP PREEMPT Tue May 20 15:33:07 CEST 2014
CPU: ARMv7 Processor [412fc09a] revision 10 (ARMv7), cr=10c53c7d
CPU: VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine: Freescale i.MX 6Quad/DualLite/Solo Sabre-SD Board
Ignoring unrecognised tag 0x54410008
Memory policy: ECC disabled, Data cache writealloc
CPU identified as i.MX6Q, silicon rev 1.2
PERCPU: Embedded 7 pages/cpu @8c008000 s5440 r8192 d15040 u32768
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 194560
Kernel command line: console=ttymxc0,115200 enable_wait_mode=off video_mode=extension pcie_testmode=off root=/dev/mmcblk1p1 rootwait rw
PID hash table entries: 4096 (order: 2, 16384 bytes)
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Memory: 512MB 256MB = 768MB total
Memory: 765956k/765956k available, 282620k reserved, 0K highmem
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
DMA : 0xf4600000 - 0xffe00000 ( 184 MB)
vmalloc : 0xc0800000 - 0xf2000000 ( 792 MB)
lowmem : 0x80000000 - 0xc0000000 (1024 MB)
pkmap : 0x7fe00000 - 0x80000000 ( 2 MB)
modules : 0x7f000000 - 0x7fe00000 ( 14 MB)
.init : 0x80008000 - 0x8003c000 ( 208 kB)
.text : 0x8003c000 - 0x80a6fb28 (10447 kB)
.data : 0x80a70000 - 0x80ad3c00 ( 399 kB)
.bss : 0x80ad3c24 - 0x80b21acc ( 312 kB)
SLUB: Genslabs=13, HWalign=32, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
Preemptible hierarchical RCU implementation.
NR_IRQS:624
MXC GPIO hardware
sched_clock: 32 bits at 3000kHz, resolution 333ns, wraps every 1431655ms
arm_max_freq=1GHz
MXC_Early serial console at MMIO 0x2020000 (options '115200')
bootconsole [ttymxc0] enabled
Console: colour dummy device 80x30
Calibrating delay loop... 1581.05 BogoMIPS (lpj=7905280)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
hw perfevents: enabled with ARMv7 Cortex-A9 PMU driver, 7 counters available
CPU1: Booted secondary processor
Brought up 2 CPUs
SMP: Total of 2 processors activated (3162.11 BogoMIPS).
print_constraints: dummy:
NET: Registered protocol family 16
print_constraints: vddpu: 725 <--> 1300 mV at 700 mV fast normal
print_constraints: vddcore: 725 <--> 1300 mV at 1150 mV fast normal
print_constraints: vddsoc: 725 <--> 1300 mV at 1200 mV fast normal
print_constraints: vdd2p5: 2000 <--> 2775 mV at 2400 mV fast normal
print_constraints: vdd1p1: 800 <--> 1400 mV at 1100 mV fast normal
print_constraints: vdd3p0: 2625 <--> 3400 mV at 3000 mV fast normal
hw-breakpoint: found 6 breakpoint and 1 watchpoint registers.
hw-breakpoint: 1 breakpoint(s) reserved for watchpoint single-step.
hw-breakpoint: maximum watchpoint size is 4 bytes.
L310 cache controller enabled
l2x0: 16 ways, CACHE_ID 0x410000c7, AUX_CTRL 0x02070000, Cache size: 1048576 B
bio: create slab <bio-0> at 0
mxs-dma mxs-dma-apbh: initialized
print_constraints: SPKVDD: 4200 mV
print_constraints: vmmc: 3300 mV
SCSI subsystem initialized
spi_imx imx6q-ecspi.0: probed
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
Freescale USB OTG Driver loaded, $Revision: 1.55 $
mc_pfuze 1-0008: recv failed!:-5,80
mc_pfuze: probe of 1-0008 failed with error -1
imx-ipuv3 imx-ipuv3.0: IPU DMFC NORMAL mode: 1(0~1), 5B(4,5), 5F(6,7)
imx-ipuv3 imx-ipuv3.1: IPU DMFC NORMAL mode: 1(0~1), 5B(4,5), 5F(6,7)
mxc_mipi_csi2 mxc_mipi_csi2: i.MX MIPI CSI2 driver probed
mxc_mipi_csi2 mxc_mipi_csi2: i.MX MIPI CSI2 dphy version is 0x3130302a
MIPI CSI2 driver module loaded
Advanced Linux Sound Architecture Driver Version 1.0.24.
Bluetooth: Core ver 2.16
NET: Registered protocol family 31
Bluetooth: HCI device and connection manager initialized
Bluetooth: HCI socket layer initialized
Bluetooth: L2CAP socket layer initialized
Bluetooth: SCO socket layer initialized
cfg80211: Calling CRDA to update world regulatory domain
max17135 2-0048: PMIC MAX17135 for eInk display
i2c-core: driver [max17135] using legacy suspend method
i2c-core: driver [max17135] using legacy resume method
Switching to clocksource mxc_timer1
NET: Registered protocol family 2
IP route cache hash table entries: 32768 (order: 5, 131072 bytes)
TCP established hash table entries: 131072 (order: 8, 1048576 bytes)
TCP bind hash table entries: 65536 (order: 7, 786432 bytes)
TCP: Hash tables configured (established 131072 bind 65536)
TCP reno registered
UDP hash table entries: 512 (order: 2, 16384 bytes)
UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
PMU: registered new PMU device of type 0
Static Power Management for Freescale i.MX6
wait mode is disabled for i.MX6
cpaddr = c0880000 suspend_iram_base=c0918000
PM driver module loaded
IMX usb wakeup probe
add wake up source irq 75
IMX usb wakeup probe
cpu regulator mode:ldo_enable
i.MXC CPU frequency driver
JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
msgmni has been set to 1496
alg: No test for stdrng (krng)
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
mxc_mipi_dsi mxc_mipi_dsi: i.MX MIPI DSI driver probed
MIPI DSI driver module loaded
mxc_sdc_fb mxc_sdc_fb.0: register mxc display driver ldb
_regulator_get: get() with no identifier
imx-ipuv3 imx-ipuv3.1: IPU DMFC DP HIGH RESOLUTION: 1(0,1), 5B(2~5), 5F(6,7)
Console: switching to colour frame buffer device 128x48
mxc_sdc_fb mxc_sdc_fb.1: register mxc display driver ldb
mxc_sdc_fb mxc_sdc_fb.2: register mxc display driver lcd
mxc_sdc_fb mxc_sdc_fb.3: register mxc display driver ldb
mxc_sdc_fb mxc_sdc_fb.3: ipu1-di0 already in use
mxc_sdc_fb: probe of mxc_sdc_fb.3 failed with error -16
imx-sdma imx-sdma: loaded firmware 1.1
imx-sdma imx-sdma: initialized
Serial: IMX driver
imx-uart.2: ttymxc2 at MMIO 0x21ec000 (irq = 60) is a IMX
imx-uart.0: ttymxc0 at MMIO 0x2020000 (irq = 58) is a IMX
console [ttymxc0] enabled, bootconsole disabled
console [ttymxc0] enabled, bootconsole disabled
loop: module loaded
No sata disk.
m25p80 spi0.0: unrecognized JEDEC id ffffff
GPMI NAND driver registered. (IMX)
vcan: Virtual CAN interface driver
CAN device driver interface
flexcan netdevice driver
FEC Ethernet Driver
fec_enet_mii_bus: probed
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
fsl-ehci fsl-ehci.0: Freescale On-Chip EHCI Host Controller
fsl-ehci fsl-ehci.0: new USB bus registered, assigned bus number 1
fsl-ehci fsl-ehci.0: irq 75, io base 0x02184000
fsl-ehci fsl-ehci.0: USB 2.0 started, EHCI 1.00
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
add wake up source irq 72
fsl-ehci fsl-ehci.1: Freescale On-Chip EHCI Host Controller
fsl-ehci fsl-ehci.1: new USB bus registered, assigned bus number 2
fsl-ehci fsl-ehci.1: irq 72, io base 0x02184200
fsl-ehci fsl-ehci.1: USB 2.0 started, EHCI 1.00
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 1 port detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
ARC USBOTG Device Controller driver (1 August 2005)
mousedev: PS/2 mouse device common for all mice
input: gpio-keys as /devices/platform/gpio-keys/input/input0
input: max11801_ts as /devices/platform/imx-i2c.1/i2c-1/1-0048/input/input1
egalax_ts 1-0004: egalax_ts: failed to read firmware version
egalax_ts: probe of 1-0004 failed with error -5
egalax_ts 2-0004: egalax_ts: failed to read firmware version
egalax_ts: probe of 2-0004 failed with error -5
usb 2-1: new full speed USB device number 2 using fsl-ehci
elan - Read Hello Packet Failed
elan-touch: probe of 2-0010 failed with error -22
i2c-core: driver [isl29023] using legacy suspend method
i2c-core: driver [isl29023] using legacy resume method
snvs_rtc snvs_rtc.0: rtc core: registered snvs_rtc as rtc0
i2c /dev entries driver
Linux video capture interface: v2.00
mxc_v4l2_output mxc_v4l2_output.0: V4L2 device registered as video16
mxc_v4l2_output mxc_v4l2_output.0: V4L2 device registered as video17
mxc_v4l2_output mxc_v4l2_output.0: V4L2 device registered as video18
mxc_v4l2_output mxc_v4l2_output.0: V4L2 device registered as video19
mxc_v4l2_output mxc_v4l2_output.0: V4L2 device registered as video20
mag3110 2-000e: check mag3110 chip ID
mag3110 2-000e: read chip ID 0xfffffffb is not equal to 0xc4!
mag3110: probe of 2-000e failed with error -22
i2c-core: driver [mag3110] using legacy suspend method
i2c-core: driver [mag3110] using legacy resume method
mma8451 0-001c: read chip ID 0x1 is not equal to 0x1a or 0x2a!
mma8451: probe of 0-001c failed with error -22
imx2-wdt imx2-wdt.0: IMX2+ Watchdog Timer enabled. timeout=60s (nowayout=1)
Bluetooth: Virtual HCI driver ver 1.3
Bluetooth: HCI UART driver ver 2.2
Bluetooth: HCIATH3K protocol initialized
Bluetooth: Generic Bluetooth USB driver ver 0.6
usbcore: registered new interface driver btusb
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
mmc0: SDHCI controller on platform [sdhci-esdhc-imx.3] using DMA
mmc1: SDHCI controller on platform [sdhci-esdhc-imx.1] using DMA
mmc2: SDHCI controller on platform [sdhci-esdhc-imx.2] using DMA
mxc_vdoa mxc_vdoa: i.MX Video Data Order Adapter(VDOA) driver probed
VPU initialized
mxc_asrc registered
Thermal calibration data is 0x56d4d369
Thermal sensor with ratio = 179
Anatop Thermal registered as thermal_zone0
anatop_thermal_probe: default cooling device is cpufreq!
input: Logitech USB Receiver as /devices/platform/fsl-ehci.1/usb2/2-1/2-1:1.0/input/input2
generic-usb 0003:046D:C52E.0001: input,hidraw0: USB HID v1.11 Keyboard [Logitech USB Receiver] on usb-fsl-ehci.1-1/input0
input: Logitech USB Receiver as /devices/platform/fsl-ehci.1/usb2/2-1/2-1:1.1/input/input3
generic-usb 0003:046D:C52E.0002: input,hidraw1: USB HID v1.11 Mouse [Logitech USB Receiver] on usb-fsl-ehci.1-1/input1
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
usbcore: registered new interface driver snd-usb-audio
mxc_hdmi_soc mxc_hdmi_soc.0: MXC HDMI Audio
Cirrus Logic CS42888 ALSA SoC Codec Driver
i2c-core: driver [cs42888] using legacy suspend method
i2c-core: driver [cs42888] using legacy resume method
mmc0: new high speed DDR MMC card at address 0001
imx-hdmi-soc-dai imx-hdmi-soc-dai.0: Failed: Load HDMI-video first.
mmcblk0: mmc0:0001 M4G1FB 3.64 GiB
mmcblk0boot0: mmc0:0001 M4G1FB partition 1 1.00 MiB
mmcblk0boot1: mmc0:0001 M4G1FB partition 2 1.00 MiB
wm8962 0-001a: Failed to get supply 'DCVDD': -19
wm8962 0-001a: Failed to request supplies: -19
wm8962 0-001a: asoc: failed to probe CODEC wm8962.0-001a: -19
asoc: failed to instantiate card wm8962-audio: -19
imx_3stack asoc driver
Initialize HDMI-audio failed. Load HDMI-video first!
ALSA device list:
No soundcards found.
NET: Registered protocol family 26
TCP cubic registered
NET: Registered protocol family 17
can: controller area network core (rev 20090105 abi 8)
NET: Registered protocol family 29
can: raw protocol (rev 20090105)
can: broadcast manager protocol (rev 20090105 t)
Bluetooth: RFCOMM TTY layer initialized
Bluetooth: RFCOMM socket layer initialized
mmcblk0: p1
Bluetooth: RFCOMM ver 1.11
Bluetooth: BNEP (Ethernet Emulation) ver 1.3
mmcblk0boot1: unknown partition table
Bluetooth: BNEP filters: protocol multicast
Bluetooth: HIDP (Human Interface Emulation) ver 1.2
mmcblk0boot0: unknown partition table
lib80211: common routines for IEEE802.11 drivers
VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
Bus freq driver module loaded
Bus freq driver Enabled
mxc_dvfs_core_probe
DVFS driver module loaded
regulator_init_complete: SPKVDD: incomplete constraints, leaving on
snvs_rtc snvs_rtc.0: setting system clock to 1970-01-01 00:46:23 UTC (2783)
Waiting for root device /dev/mmcblk1p1...