Re: RPi4 issue with DRM_RENDER_ALLOW

Jens Owen <[email protected]>
Newsgroups gmane.comp.video.mesa3d.user
Message-ID <CAJ5TNtb_0wZYeB1SBNf1igHx0Sw0QeqOHnvZHRZC6nk0jN0QDw@mail.gmail.com>
It’s been a while for me, but you might check if you have an issue with
permissions. A quick check would be to see if glxgears works when run as
root.

Hi all!
>
> The last days I've been struggling with mesa3d to get GPU acceleration
> on X, on my Raspberry Pi 4 Model B. Maybe someone knows how to deal with
> it.
>
> Using Buildroot I've compiled a system with mesa3d, using KMSRO, V3D and
> VC4 Gallium drivers. X11 is starting up, stating that DRI is initialised
> and everything seems to work. But when I run glxinfo or glxgears, it is
> stating 'Failed to open bo 1: Permission denied'. glxgears opens a
> window which simply stays black. So I started to track it down and ended
> up in drivers/drm/drm_ioctl.c.
>
> The specific function that returns EACCES (-13) is drm_ioctl_permit().
> To identify the failing condition I've added some DRM_DEBUG() for each
> one of the four condition there. After enabling drm.debug with
>
> # echo 0xf > /sys/module/drm/parameters/debug
>
> I see that it fails on the DRM_RENDER_ALLOW condition. I don't know how
> this all works together and what it means, in detail. So I'm lost now. I
> assume that X11 is occupying the exclusive access to the render node
> /dev/dri/renderD128. But how does glxgears should work now? What I'm
> trying to archive is to run chromium with GPU acceleration, but the GPU
> process is crashing and reverts to software rendering.
>
> When running glxinfo it is showing all the renderer information, which
> looks good, though it shows that permission denied too. All programs are
> running as root at the moment and the filesystem permissions look good.
>
> As I said, I'm lost and don't know that much about all this to go any
> further, so I'm stuck at it now. I hope someone here got the missing
> piece for me to get it working, though I'm not sure wether it is the
> right place for this question. May be it's related to kernel
> configuration, to the Raspberry firmware, or what so ever. But I even
> don't know that.
>
> Software used:
>
> Mesa3D 20.3.4
> Linux 5.10.y (branch at github.com/raspberrypi/linux)
> Firmware stable (branch at github.com/raspberrypi/firmware)
>
> Thank you in advance. Further down you will find some output from strace
> and drm.debug.
>
> Best regards,
>
> Michael
>
> ==== strace of glxgears
> openat(AT_FDCWD, "/dev/dri/renderD128", O_RDWR|O_LARGEFILE|O_CLOEXEC) = 6
> ioctl(6, DRM_IOCTL_VERSION, 0x15084e0)  = 0
> ioctl(6, DRM_IOCTL_VERSION, 0x15084e0)  = 0
> ioctl(6, DRM_IOCTL_GET_UNIQUE, 0xbedebcd0) = -1 EACCES (Permission denied)
> ioctl(6, DRM_IOCTL_EXYNOS_GEM_GET or DRM_IOCTL_PANFROST_GET_PARAM or
> DRM_IOCTL_QXL_GETPARAM or DRM_IOCTL_SIS_FB_ALLOC or
> DRM_IOCTL_TEGRA_SYNCPT_WAIT or DRM_IOCTL_V3D_GET_PARAM or
> DRM_IOCTL_VC4_MMAP_BO, 0xbedebf00) = 0
> ioctl(6, DRM_IOCTL_EXYNOS_GEM_GET or DRM_IOCTL_PANFROST_GET_PARAM or
> DRM_IOCTL_QXL_GETPARAM or DRM_IOCTL_SIS_FB_ALLOC or
> DRM_IOCTL_TEGRA_SYNCPT_WAIT or DRM_IOCTL_V3D_GET_PARAM or
> DRM_IOCTL_VC4_MMAP_BO, 0xbedebf10) = 0
> ioctl(6, DRM_IOCTL_EXYNOS_GEM_GET or DRM_IOCTL_PANFROST_GET_PARAM or
> DRM_IOCTL_QXL_GETPARAM or DRM_IOCTL_SIS_FB_ALLOC or
> DRM_IOCTL_TEGRA_SYNCPT_WAIT or DRM_IOCTL_V3D_GET_PARAM or
> DRM_IOCTL_VC4_MMAP_BO, 0xbedebf28) = 0
> ioctl(6, DRM_IOCTL_EXYNOS_GEM_GET or DRM_IOCTL_PANFROST_GET_PARAM or
> DRM_IOCTL_QXL_GETPARAM or DRM_IOCTL_SIS_FB_ALLOC or
> DRM_IOCTL_TEGRA_SYNCPT_WAIT or DRM_IOCTL_V3D_GET_PARAM or
> DRM_IOCTL_VC4_MMAP_BO, 0xbedebf28) = 0
> ioctl(4, DRM_IOCTL_GET_CAP, 0xbedebf90) = 0
> ioctl(6, DRM_IOCTL_SYNCOBJ_CREATE, 0xbedec770) = 0
> ioctl(6, DRM_IOCTL_AMDGPU_CTX or DRM_IOCTL_ETNAVIV_GEM_NEW or
> DRM_IOCTL_LIMA_GEM_INFO or DRM_IOCTL_MSM_GEM_NEW or DRM_IOCTL_V3D_CREATE_BO
> or DRM_IOCTL_VC4_WAIT_BO, 0xbedec460) = 0
> ioctl(6, DRM_IOCTL_ETNAVIV_GEM_INFO or DRM_IOCTL_OMAP_GEM_NEW or
> DRM_IOCTL_PANFROST_MMAP_BO or DRM_IOCTL_V3D_MMAP_BO or
> DRM_IOCTL_VC4_CREATE_BO or DRM_IOCTL_VIRTGPU_GETPARAM, 0xbedec410) = 0
> openat(AT_FDCWD, "/sys/devices/system/cpu/online", O_RDONLY|O_CLOEXEC) = 7
> ioctl(6, DRM_IOCTL_AMDGPU_CTX or DRM_IOCTL_ETNAVIV_GEM_NEW or
> DRM_IOCTL_LIMA_GEM_INFO or DRM_IOCTL_MSM_GEM_NEW or DRM_IOCTL_V3D_CREATE_BO
> or DRM_IOCTL_VC4_WAIT_BO, 0xbedec240) = 0
> ioctl(6, DRM_IOCTL_ETNAVIV_GEM_INFO or DRM_IOCTL_OMAP_GEM_NEW or
> DRM_IOCTL_PANFROST_MMAP_BO or DRM_IOCTL_V3D_MMAP_BO or
> DRM_IOCTL_VC4_CREATE_BO or DRM_IOCTL_VIRTGPU_GETPARAM, 0xbedec210) = 0
> ioctl(6, DRM_IOCTL_GEM_OPEN, 0xbedec818) = -1 EACCES (Permission denied)
> write(2, "V3D:-1:: Failed to open bo 2: Pe"..., 48V3D:-1:: Failed to open
> bo 2: Permission denied
> ioctl(6, DRM_IOCTL_SYNCOBJ_CREATE, 0xbedec6d8) = 0
> ioctl(6, DRM_IOCTL_AMDGPU_CTX or DRM_IOCTL_ETNAVIV_GEM_NEW or
> DRM_IOCTL_LIMA_GEM_INFO or DRM_IOCTL_MSM_GEM_NEW or DRM_IOCTL_V3D_CREATE_BO
> or DRM_IOCTL_VC4_WAIT_BO, 0xbedec3c8) = 0
> ioctl(6, DRM_IOCTL_ETNAVIV_GEM_INFO or DRM_IOCTL_OMAP_GEM_NEW or
> DRM_IOCTL_PANFROST_MMAP_BO or DRM_IOCTL_V3D_MMAP_BO or
> DRM_IOCTL_VC4_CREATE_BO or DRM_IOCTL_VIRTGPU_GETPARAM, 0xbedec378) = 0
> ioctl(6, DRM_IOCTL_AMDGPU_CTX or DRM_IOCTL_ETNAVIV_GEM_NEW or
> DRM_IOCTL_LIMA_GEM_INFO or DRM_IOCTL_MSM_GEM_NEW or DRM_IOCTL_V3D_CREATE_BO
> or DRM_IOCTL_VC4_WAIT_BO, 0xbedec1a8) = 0
> ioctl(6, DRM_IOCTL_ETNAVIV_GEM_INFO or DRM_IOCTL_OMAP_GEM_NEW or
> DRM_IOCTL_PANFROST_MMAP_BO or DRM_IOCTL_V3D_MMAP_BO or
> DRM_IOCTL_VC4_CREATE_BO or DRM_IOCTL_VIRTGPU_GETPARAM, 0xbedec178) = 0
> ioctl(6, DRM_IOCTL_GEM_OPEN, 0xbedec818) = -1 EACCES (Permission denied)
> write(2, "V3D:-1:: Failed to open bo 2: Pe"..., 48V3D:-1:: Failed to open
> bo 2: Permission denied
>
>
>
>
> ====== drm.debug
> Mar 14 18:55:47 buildroot user.debug kernel: [35999.920528]
> [drm:drm_stub_open [drm]]
> Mar 14 18:55:47 buildroot user.debug kernel: [35999.920751] [drm:drm_open
> [drm]] comm="glxgears", pid=448, minor=1
> Mar 14 18:55:47 buildroot user.debug kernel: [35999.920995] [drm:drm_ioctl
> [drm]] comm="glxgears" pid=448, dev=0xe201, auth=1, DRM_IOCTL_GET_MAGIC
> Mar 14 18:55:47 buildroot user.debug kernel: [35999.921207]
> [drm:drm_getmagic [drm]] 1
> Mar 14 18:55:47 buildroot user.debug kernel: [35999.921520] [drm:drm_ioctl
> [drm]] comm="Xorg" pid=237, dev=0xe201, auth=1, DRM_IOCTL_AUTH_MAGIC
> Mar 14 18:55:47 buildroot user.debug kernel: [35999.921733]
> [drm:drm_authmagic [drm]] 1
> Mar 14 18:55:47 buildroot user.debug kernel: [35999.922042] [drm:drm_ioctl
> [drm]] comm="glxgears" pid=448, dev=0xe201, auth=1, DRM_IOCTL_VERSION
> Mar 14 18:55:47 buildroot user.debug kernel: [35999.922257] [drm:drm_ioctl
> [drm]] comm="glxgears" pid=448, dev=0xe201, auth=1, DRM_IOCTL_VERSION
> Mar 14 18:55:47 buildroot user.debug kernel: [35999.929723] [drm:drm_ioctl
> [drm]] comm="glxgears" pid=448, dev=0xe201, auth=1, DRM_IOCTL_VERSION
> Mar 14 18:55:47 buildroot user.debug kernel: [35999.929942] [drm:drm_ioctl
> [drm]] comm="glxgears" pid=448, dev=0xe201, auth=1, DRM_IOCTL_VERSION
> Mar 14 18:55:47 buildroot user.debug kernel: [35999.944279] [drm:drm_ioctl
> [drm]] comm="glxgears" pid=448, dev=0xe201, auth=1, DRM_IOCTL_VERSION
> Mar 14 18:55:47 buildroot user.debug kernel: [35999.944500] [drm:drm_ioctl
> [drm]] comm="glxgears" pid=448, dev=0xe201, auth=1, DRM_IOCTL_VERSION
> Mar 14 18:55:47 buildroot user.debug kernel: [35999.950969] [drm:drm_ioctl
> [drm]] comm="glxgears" pid=448, dev=0xe201, auth=1, DRM_IOCTL_VERSION
> Mar 14 18:55:47 buildroot user.debug kernel: [35999.951187] [drm:drm_ioctl
> [drm]] comm="glxgears" pid=448, dev=0xe201, auth=1, DRM_IOCTL_VERSION
> Mar 14 18:55:47 buildroot user.debug kernel: [35999.956154] [drm:drm_ioctl
> [drm]] comm="glxgears" pid=448, dev=0xe201, auth=1, VC4_GET_PARAM
> Mar 14 18:55:47 buildroot user.debug kernel: [35999.956367] [drm:drm_ioctl
> [drm]] comm="glxgears", pid=448, ret=-19
> Mar 14 18:55:47 buildroot user.debug kernel: [35999.956652]
> [drm:drm_stub_open [drm]]
> Mar 14 18:55:47 buildroot user.debug kernel: [35999.956870] [drm:drm_open
> [drm]] comm="glxgears", pid=448, minor=128
> Mar 14 18:55:47 buildroot user.debug kernel: [35999.957103] [drm:drm_ioctl
> [drm]] comm="glxgears" pid=448, dev=0xe280, auth=1, DRM_IOCTL_VERSION
> Mar 14 18:55:47 buildroot user.debug kernel: [35999.957317] [drm:drm_ioctl
> [drm]] comm="glxgears" pid=448, dev=0xe280, auth=1, DRM_IOCTL_VERSION
> Mar 14 18:55:47 buildroot user.debug kernel: [35999.957548]
> [drm:drm_release [drm]] open_count = 3
> Mar 14 18:55:47 buildroot user.debug kernel: [35999.957754]
> [drm:drm_file_free.part.0 [drm]] comm="glxgears", pid=448, dev=0xe280,
> open_count=3
> Mar 14 18:55:47 buildroot user.debug kernel: [36000.050627]
> [drm:drm_stub_open [drm]]
> Mar 14 18:55:47 buildroot user.debug kernel: [36000.050844] [drm:drm_open
> [drm]] comm="glxgears", pid=448, minor=128
> Mar 14 18:55:47 buildroot user.debug kernel: [36000.051068] [drm:drm_ioctl
> [drm]] comm="glxgears" pid=448, dev=0xe280, auth=1, DRM_IOCTL_VERSION
> Mar 14 18:55:47 buildroot user.debug kernel: [36000.051279] [drm:drm_ioctl
> [drm]] comm="glxgears" pid=448, dev=0xe280, auth=1, DRM_IOCTL_VERSION
> Mar 14 18:55:47 buildroot user.debug kernel: [36000.051502] [drm:drm_ioctl
> [drm]] comm="glxgears" pid=448, dev=0xe280, auth=1, DRM_IOCTL_GET_UNIQUE
> Mar 14 18:55:47 buildroot user.debug kernel: [36000.051704]
> [drm:drm_ioctl_permit [drm]] DRM_RENDER_ALLOW
> Mar 14 18:55:47 buildroot user.debug kernel: [36000.051905] [drm:drm_ioctl
> [drm]] comm="glxgears", pid=448, ret=-13
> ...snip...
> Mar 14 18:55:47 buildroot user.debug kernel: [36000.121036] [drm:drm_ioctl
> [drm]] comm="glxgears" pid=448, dev=0xe280, auth=1, DRM_IOCTL_GEM_OPEN
> Mar 14 18:55:47 buildroot user.debug kernel: [36000.121241]
> [drm:drm_ioctl_permit [drm]] DRM_RENDER_ALLOW
> Mar 14 18:55:47 buildroot user.debug kernel: [36000.121433] [drm:drm_ioctl
> [drm]] comm="Xorg" pid=237, dev=0xe280, auth=1, V3D_MMAP_BO
> Mar 14 18:55:47 buildroot user.debug kernel: [36000.121635] [drm:drm_ioctl
> [drm]] comm="glxgears", pid=448, ret=-13
> Mar 14 18:55:47 buildroot user.debug kernel: [36000.121825] [drm:drm_ioctl
> [drm]] comm="Xorg" pid=237, dev=0xe280, auth=1, V3D_WAIT_BO
> Mar 14 18:55:47 buildroot user.debug kernel: [36000.122071] [drm:drm_ioctl
> [drm]] comm="Xorg" pid=237, dev=0xe280, auth=1, V3D_SUBMIT_CL
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> https://lists.freedesktop.org/archives/mesa-users/attachments/20210314/4dc3eead/attachment-0001.htm
> >
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> mesa-users mailing list
> [email protected]
> https://lists.freedesktop.org/mailman/listinfo/mesa-users
>
>
> ------------------------------
>
> End of mesa-users Digest, Vol 130, Issue 3
> ******************************************
>

_______________________________________________
mesa-users mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.