Bug 224203 - [PATCH] graphics/mesa-dri: Fix driver loader error on post ino64 systems when using Wayland/EGL
Summary: [PATCH] graphics/mesa-dri: Fix driver loader error on post ino64 systems when...
Status: Closed DUPLICATE of bug 223030
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-x11 (Nobody)
Keywords: patch
Depends on:
Reported: 2017-12-09 14:31 UTC by Johannes Lundberg
Modified: 2017-12-09 16:13 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (x11)

Patch for loader.c (661 bytes, patch)
2017-12-09 14:31 UTC, Johannes Lundberg
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Johannes Lundberg 2017-12-09 14:31:46 UTC
Created attachment 188649 [details]
Patch for loader.c

On 12-CURRENT systems with ino64 it fails to load the correct driver and falls back to software rendering. This is because the inode number spills over into major/minor data fields. Since we don't use this versioning I simply set them to zero.
Comment 1 Niclas Zeising freebsd_committer 2017-12-09 15:28:51 UTC
Can you show the error message you get, and tell me when you get it?
Comment 2 Johannes Lundberg 2017-12-09 15:37:36 UTC
There is no error message (what I can remember). It just silently fail to load i915/i965 driver and fall back to software rendering (llvm-pipe).

I think this happens whenever dri wants to load the i965 driver. That is whenever you start glxgears or similar.
Comment 3 Greg V 2017-12-09 15:38:01 UTC
Oh! That's another way to fix the software rendering fallback I guess :)

I have actually submitted a different fix upstream: https://cgit.freedesktop.org/mesa/mesa/commit/?id=db8519a369261cdedda50852facc45616d4eba28

And also posted it here as bug 223030
Comment 4 Johannes Lundberg 2017-12-09 15:42:17 UTC
Oh, that's a better fix :) 
I didn't know about update to drm and it was a while ago I experimented with this just to get hw acceleration working. 

When will the fixed version be in ports?
Comment 5 Greg V 2017-12-09 15:46:02 UTC
(In reply to Johannes Lundberg from comment #4)
When x11@ stops being no-reply@…

The upstream fix is only in git master, didn't get into 17.3.0.

(btw, replied to you on the x11 mailing list)
Comment 6 Niclas Zeising freebsd_committer 2017-12-09 16:07:18 UTC
Interestingly, for me glxgears et all works fine, so I'm not sure what we are trying to fix.  That's why I'm asking for error messages and such.
Comment 7 Niclas Zeising freebsd_committer 2017-12-09 16:08:25 UTC

*** This bug has been marked as a duplicate of bug 223030 ***
Comment 8 Johannes Lundberg 2017-12-09 16:09:57 UTC
Are you sure it's not using llvm-pipe? Check how many threads glxgears uses.
Comment 9 Greg V 2017-12-09 16:12:09 UTC
(In reply to Niclas Zeising from comment #6)
Yes, this never occurred to me under Xorg, only under Wayland.

The messages are "DRM version is 3.8.0 but this driver is only compatible with 2.12.0" and driver loading failed
Comment 10 Niclas Zeising freebsd_committer 2017-12-09 16:13:22 UTC
If it is wayland only, that explains why I don't see it.  I thought it related to xorg, which is what I'm using.