Bug 224203

Summary: [PATCH] graphics/mesa-dri: Fix driver loader error on post ino64 systems when using Wayland/EGL
Product: Ports & Packages Reporter: Johannes Lundberg <johalun0>
Component: Individual Port(s)Assignee: freebsd-x11 (Nobody) <x11>
Status: Closed DUPLICATE    
Severity: Affects Some People CC: val, zeising
Priority: --- Keywords: patch
Version: LatestFlags: bugzilla: maintainer-feedback? (x11)
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Patch for loader.c none

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 freebsd_triage 2017-12-09 15:28:51 UTC
Can you show the error message you get, and tell me when you get it?
Thanks!
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 Val Packett 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 Val Packett 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 freebsd_triage 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 freebsd_triage 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 Val Packett 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 freebsd_triage 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.