Bug 13831

Summary: mesa3d - kmsro driver requires dri3
Product: buildroot Reporter: Marek Kraus <gamelaster>
Component: OtherAssignee: unassigned
Status: RESOLVED FIXED    
Severity: blocker CC: buildroot, nunes.erico, ps.report
Priority: P5    
Version: 2021.05   
Target Milestone: ---   
Hardware: Other   
OS: Linux   
Host: Target:
Build:

Description Marek Kraus 2021-06-07 09:07:33 UTC
Package: mesa3d
At the moment, Gallium kmsro driver supports only dri3, but since dri3 flag is added only when BR2_PACKAGE_MESA3D_DRI_DRIVER or BR2_PACKAGE_MESA3D_VULKAN_DRIVER is enabled, dri3 is not enabled in mesa, thus kmsro and lima drivers are not working. (panfrost should be affected too).

More information about this issue are here:
https://gitlab.freedesktop.org/mesa/mesa/-/issues/4861

Thanks
Comment 1 Erico Nunes 2021-06-11 11:50:29 UTC
FYI we added a check in the mesa meson configuration to prevent this: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11305

And there might be more changes in https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11318 proposing to remove the option to manually disable dri3 at all.

I see that Peter Seiderer had some pending patches related to this in the list so adding him in Cc here.
Comment 2 Peter Seiderer 2021-06-11 18:51:30 UTC
(In reply to Erico Nunes from comment #1)

I can confirm  X11/glxgears runtime failure with dri3 disabled (on RPi4) and a running glxgears with package/mesa3d/mesa3d.mk hacked to '-Ddri3=enabled'...

The mentioned patches are '[RFC,v2,01/12] package/mesa3d: add config option for DRI3 support' ([1] and '[RFC,v2,04/12] package/mesa3d: DRI3 with GLX needs xshmfence' ([2]), already considered to update patch one to the new dri3 sensitivity..., but needs more time to do it accurate because of the BR2_TOOLCHAIN_HAS_SYNC_4 dependency stuff...

[1] https://patchwork.ozlabs.org/project/buildroot/patch/20210110222833.26301-2-ps.report@gmx.net/
[2] https://patchwork.ozlabs.org/project/buildroot/patch/20210110222833.26301-5-ps.report@gmx.net/
Comment 3 Peter Seiderer 2021-06-12 22:38:17 UTC
Patches suggested:

- [v1,1/2] package/mesa3d: add config option for DRI3 support:
  https://patchwork.ozlabs.org/project/buildroot/patch/20210612223011.26118-1-ps.report@gmx.net/

- [v1,2/2] package/mesa3d: gallium/kmsro drivers require dri3 for X11
  https://patchwork.ozlabs.org/project/buildroot/patch/20210612223011.26118-2-ps.report@gmx.net/