Hi,
I'm trying to run a Vulkan application and render directly to the display without using any Window Manager/Display Server. My SoC is i.Mx8M (nitrogen8M board from Boundary Devices). Does NXP support to render directly to the display as I'm trying to do? Any example anyone can provide?
To test if this works I have cross-compiled Vulkan-Samples with help of a SDK built with Yocto (dunfell branch).
$ source <sdk-path>/environment-setup-aarch64-fslc-linux
$ git clone https://github.com/KhronosGroup/Vulkan-Samples.git
$ cd Vulkan-Samples && mkdir armbuild && cd armbuild
$ cmake -DVKB_DIRECT_2_DISPLAY=true ..
$ make -j4
$ scp app/bin/Release/aarch64/vulkan_samples <to-target>:
On target:
$ ./vulkan_samples --test hello_triangle
[info] Logger initialized
[info] Window created
[info] Initializing vulkan instance.
[info] Enabled Validation Layers:
[info] Found GPU: VeriSilicon
[warning] Couldn't find a discrete physical device, picking default GPU
[info] Initializing vulkan device.
[info] format_count 1 formats[0].format 44
[er[13733.152366] 002: audit: type=1701 audit(1599040557.574:11): auid=4294967295 uid=0 gid=0 ses=4294967295 pid=310 comm
="vulkan_samples" exe="/home/root/vulkan_samples" sig=6 res=1
ror] [samples/api/hello_triangle/hello_triangle.cpp:535] Detected Vulkan error: ERROR_OUT_OF_DATE_KHR
Aborted
The example bails out here: https://github.com/KhronosGroup/Vulkan-Samples/blob/fb6bab484199c9406ba1b2ffbadb91971c519b14/samples... with the error code ERROR_OUT_OF_DATE_KHR.
Package versions:
libvulkan1-1.2.135.0-r0.aarch64.rpm
libvulkan-imx-6.4.0.p2.0+aarch64-r0.aarch64_mx8m.rpm
kernel-module-imx-gpu-viv-6.4.0.p2.4+fslc+git0+f2e8483fbd-r0.nitrogen8m.rpm
kernel-5.4.50-rt32+gde0fe9b79719-5.4.50+git0+503a3dce96-r0.nitrogen8m.rpm (linux-boundary)
I hope I can get some hints to get forward and information if the use case I'm trying is something that shall be possible on i.Mx8M.
Thanks,
/Peter
I'm having the same issue with that "AXI BUS ERROR" when trying to do render to the display directly without using Wayland and the Wayland surface extension.
Have you eventually found a solution to this issue ?
I'm trying not to use /dev/fb0 here, but to do it in a "direct-to-display" way without having to map or use the kernel's own framebuffer, and configuring the connector / display / mode and such myself.
One step ahead...
To be able to create a swapchain the kernel config option CONFIG_DRM_FBDEV_OVERALLOC must be set to something greater than 100, which is default. This in order for libvulkan to be able to allocate bigger buffer than the screen from /dev/fb0. When I have set CONFIG_DRM_FBDEV_OVERALLOC I have passed the swapchain allocation in the example application.
But then I hit the next thing. A crash somewhere in the GPU code and a frozen system.
[ 269.477226] AXI BUS ERROR
[ 269.477245] GPU[0](ChipModel=0x7000 ChipRevision=0x6214):
** 439 printk messages dropped **
So, my question still remains, does libvulkan_VSI.so support rendering directly to /dev/fb0?
/Peter
Hello Peter,
The example works with latest BSP L5.4.24 on the EVK with wayland, You might try to get it.
Regards
@Bio_TICFSL - does the example work to render directly to /dev/fb0? Or are you saying that the example is working when you use wayland and render to a wayland display?