Mesa v3d in pi4

Hey everyone.

I’ve been trying to get my Qt app running on core 20 beta on rpi4 with mesa v3d drivers. The same snap works well on the raspbian image (with all the same env vars set so I do not pick up system libs…).

The issue here is I can’t get Qt app working. It fails to create gbm device. I looked at it and mesa falls back to softpipe.
Going inside the gdb shows this:

v3d_get_device_info(int fd, struct v3d_device_info* devinfo, v3d_ioctl_fun drm_ioctl) {
    struct drm_v3d_get_param ident0 = {
            .param = DRM_V3D_PARAM_V3D_CORE0_IDENT0,
    };
    struct drm_v3d_get_param ident1 = {
            .param = DRM_V3D_PARAM_V3D_CORE0_IDENT1,
    };
    int ret;

    ret = drm_ioctl(fd, DRM_IOCTL_V3D_GET_PARAM, &ident0);
    if (ret != 0) {
            fprintf(stderr, "Couldn't get V3D core IDENT0: %s\n",
                    strerror(errno));
            return false;
    }
    ret = drm_ioctl(fd, DRM_IOCTL_V3D_GET_PARAM, &ident1);
    if (ret != 0) {
            fprintf(stderr, "Couldn't get V3D core IDENT1: %s\n",
                    strerror(errno));
            return false;
    }

It can’t get IDENT0 from the v3d device. Am I doing something wrong?
I am running in devmode.
I have enabled the support for vc4-fkms-v3d.

root@srly-lwewusy9w6uyiog:/snap/screenly-client/x5# cat /var/lib/snapd/seed/config.txt
[pi4]
kernel=uboot_rpi_4_32b.bin
max_framebuffers=2
gpu_mem=256
disable_splash=1
[pi2]
kernel=uboot_rpi_2.bin

[pi3]
kernel=uboot_rpi_3_32b.bin

[all]
enable_uart=1
dtparam=i2c=on
dtparam=spi=on
dtparam=act_led_trigger=heartbeat
dtparam=pwr_led_trigger=mmc0
dtparam=audio=on
device_tree_address=0x02000000
dtoverlay=vc4-fkms-v3d