Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

components/x11/mesa: further fixes and enablement of dri (i915) and gallium (swrast, crocus, iris) drivers #20576

Draft
wants to merge 5 commits into
base: oi/hipster
Choose a base branch
from

Conversation

xmhd
Copy link
Contributor

@xmhd xmhd commented Jan 26, 2025

As per title.

These fixes in addition to the previous fixes I have contributed will result in an almost error free Xorg log. When starting xorg-server there is an error for no devices found. When poking further it is around device initialisation. I read this to be an error in libdrm, resulting from the update in 2024.

When trying to load a gallium driver there is an error. When poked further it leads to libGLESv2.

Outstanding TODO:

  • Glamor needs to be enabled in xorg-server
  • libdrm needs to be explicitly enabled in xorg-server
  • we might need to explicitly enable dri3 in Mesa
  • xa might need to be re-enabled in Mesa.
  • XvMc will need to be re-enabled in Mesa when we start to add r300, r600, etc.

With this PR, someone should be able to tweak libdrm and get a working Intel dri setup, just like we had before. Once the initial TODOs are complete i.e. Glamor enablement in xorg-server, we are not far away from a Mesa with working gallium drivers.

xmhd added 5 commits January 26, 2025 19:45
Temporarily disable until both dri and gallium drivers are confirmed
working. Afterwards we can begin further enablement of drivers.
note: swrast_dri.so (traditional swrast dri driver) no longer exists as
of Mesa v21. The compatibility symlink currently results in a broken
setup due to gallium not yet working. We remove it for now.

Mesa 24 introduces 'libdril' a compatibility stub for the legacy DRI
loader interface, see https://gitlab.freedesktop/mesa/mesa/-/merge_requests/28378

We can add libdril when we update to Mesa 24.

note2: xorg-server will complain about missing swrast_dri.so - there is nothing
we can do about that right now. xorg vesa driver will still work.
Revert to i915 dri driver. We can enable i915g gallium driver in future,
or use the crocus driver. For now we retain i915 as a legacy dri driver.

note: currently broken. Xorg log shows EE for no devices found. I read
this to be an error with libdrm as a result of our update in 2024.
note: llvm16 *should* work but is currently broken.
This worked until Mesa 21.3.9, thus I am using llvm13 temporarily.

see: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8613

note 2: gallium is currently broken but almost working.

Upon trying to load kms_swrast_dri there will be an error.
Running ::mdb stack on the core will point to a GLESv2 error.
neither of these will work until gallium is working. Enable for now
as an example of gallium drivers compatible with existing gfx-drm gate.
@xmhd xmhd marked this pull request as draft January 26, 2025 20:09
@xmhd
Copy link
Contributor Author

xmhd commented Jan 26, 2025

I have converted this to a draft for the time being. We still need to do a COMPONENT_REVISION bump too.

I will have limited time in the next couple of weeks. I will appreciate help here. I will also be at FOSDEM and would be happy to hack on this with anyone in attendance.

@xmhd
Copy link
Contributor Author

xmhd commented Feb 25, 2025

Will re-test this following merging of https://github.com/OpenIndiana/gfx-drm/pulls

Following that we should have working:

  • gallium swrast
  • gallium crocus and iris
  • dri i915

@Toasterson
Copy link
Contributor

I maerged the PR's in https://github.com/OpenIndiana/gfx-drm/pulls, You can re-test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants