Bug 225035 - graphics/mesa-dri: update to 17.3.8
Summary: graphics/mesa-dri: update to 17.3.8
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-x11 mailing list
URL: https://www.mesa3d.org/relnotes/17.3....
Keywords: patch, patch-ready
Depends on:
Blocks: 225415
  Show dependency treegraph
 
Reported: 2018-01-09 20:07 UTC by Jan Beich
Modified: 2018-05-17 10:16 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (x11)
jbeich: merge-quarterly?


Attachments
Mesa 17.3.2 (1.77 KB, patch)
2018-01-09 20:07 UTC, Jan Beich
no flags Details | Diff
Mesa 17.3.3 (1.84 KB, patch)
2018-01-19 18:35 UTC, Jan Beich
no flags Details | Diff
Mesa 17.3.4 (3.26 KB, patch)
2018-02-16 06:47 UTC, Jan Beich
no flags Details | Diff
Mesa 17.3.6 (3.47 KB, patch)
2018-02-27 01:36 UTC, Jan Beich
no flags Details | Diff
Mesa 17.3.7 (3.52 KB, patch)
2018-03-21 19:57 UTC, Jan Beich
no flags Details | Diff
Mesa 17.3.8 (3.58 KB, patch)
2018-04-03 20:15 UTC, Jan Beich
no flags Details | Diff
Always apply workaround on FreeBSD (488 bytes, patch)
2018-04-04 05:59 UTC, Jan Beich
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Beich freebsd_committer 2018-01-09 20:07:35 UTC
Created attachment 189568 [details]
Mesa 17.3.2

The 4 Mesa ports build fine on 10.3 i3p86/amd64, 11.1 i386/amd64/aarch64/armv6, 12.0 amd64 (clang 6.0), WAYLAND=on, VAAPI=on + VDPAU=on. Runtime tested on Skylake GT2 + drm-next-kmod (Linux 4.9) + i965 (DRI3) + intel DDX via mpv (EGL + VAAPI), firefox (WebRender).

See URL for upstream change log.
Comment 1 Niclas Zeising freebsd_committer 2018-01-14 21:27:32 UTC
Looking at this.

We are currently also trying to work out a way to handle glamor and wayland in a good way, so it might take some time before we get to this.
Comment 2 Jan Beich freebsd_committer 2018-01-19 18:35:48 UTC
Created attachment 189912 [details]
Mesa 17.3.3
Comment 3 Niclas Zeising freebsd_committer 2018-01-19 19:41:32 UTC
Thanks for the updated patch.
Comment 4 Jan Beich freebsd_committer 2018-02-09 07:41:22 UTC
Mesa 17.3.4 will be released in 2 days.
https://lists.freedesktop.org/archives/mesa-announce/2018-February/000399.html
Comment 5 Jan Beich freebsd_committer 2018-02-09 09:47:13 UTC
According to https://cgit.freedesktop.org/mesa/mesa/commit/?id=5f862311e79a we may need to revert
https://cgit.freedesktop.org/mesa/mesa/commit/?id=3f353342a6b6
as only graphics/drm-next-kmod implements I915_EXEC_NO_RELOC
Comment 6 Jan Beich freebsd_committer 2018-02-16 06:47:04 UTC
Created attachment 190680 [details]
Mesa 17.3.4
Comment 8 Oleh Hushchenkov 2018-03-20 17:49:11 UTC
Any news about committing this?
Comment 9 Jan Beich freebsd_committer 2018-03-21 19:57:07 UTC
Created attachment 191718 [details]
Mesa 17.3.7

https://lists.freedesktop.org/archives/mesa-announce/2018-March/000410.html

(In reply to Oleh Hushchenkov from comment #8)
> Any news about committing this?

No clue, my focus is on bug 225415 instead. The patch here lacks QA on non-drm-next driver, non-Intel hardware and maintainer approval.
Comment 10 Oleh Hushchenkov 2018-03-22 16:33:50 UTC
I tested this patch on recent 11-STABLE/amd64 with Intel(R) HD Graphics 4600.

With drm-next-kmod it works fine, but with legacy i915kms module, it failed to load hardware accelerated driver (needed kernel 3.9 or newest).
Comment 12 rkoberman 2018-04-03 23:54:54 UTC
Bottom line is dri is not usable on this system with mesa-17.3.8.

Sandybridge graphics. FreeBSD 11.1-Stable r331492 on ThinkPad T520.
No DRI. Firefox shows:
WebGL 1 Driver Renderer	VMware, Inc. -- llvmpipe (LLVM 5.0, 256 bits)

glxgears:
[intel_init_bufmgr: 1685] Kernel 3.9 required.
libGL error: failed to create dri screen
libGL error: failed to load driver: i965
5373 frames in 5.0 seconds = 1074.496 FPS
XIO:  fatal IO error 35 (Resource temporarily unavailable) on X server ":0"
      after 30689 requests (30687 known processed) with 0 events remaining.

Xorg.log.0 shows:
843136.894] (II) Loading sub module "dri3"
[843136.894] (II) LoadModule: "dri3"
[843136.894] (II) Module "dri3" already built-in
[843136.894] (II) Loading sub module "dri2"
[843136.894] (II) LoadModule: "dri2"
[843136.894] (II) Module "dri2" already built-in
[843136.894] (II) Loading sub module "present"
[843136.894] (II) LoadModule: "present"
[843136.894] (II) Module "present" already built-in
[843136.894] (II) UnloadModule: "modesetting"
[843136.894] (II) Unloading modesetting
[843136.894] (II) UnloadModule: "scfb"
[843136.894] (II) Unloading scfb
[843136.895] (II) UnloadModule: "vesa"
[843136.895] (II) Unloading vesa
[843136.895] (==) Depth 24 pixmap format is 32 bpp
[843136.903] (II) intel(0): SNA initialized with Sandybridge (gen6, gt2) backend
[843136.903] (==) intel(0): Backing store enabled
[843136.903] (==) intel(0): Silken mouse enabled
[843136.904] (II) intel(0): HW Cursor enabled
[843136.904] (II) intel(0): RandR 1.2 enabled, ignore the following RandR disabled message.
[843136.917] (==) intel(0): DPMS enabled
[843136.927] (II) intel(0): [DRI2] Setup complete
[843136.927] (II) intel(0): [DRI2]   DRI driver: i965
[843136.927] (II) intel(0): [DRI2]   VDPAU driver: va_gl
[843136.927] (II) intel(0): direct rendering: DRI2 enabled
[843136.944] (II) intel(0): hardware support for Present enabled
[843136.944] (WW) intel(0): Option "RegistryDwords" is not used
[843136.944] (--) RandR disabled
[843136.956] (EE) AIGLX error: Calling driver entry point failed
[843136.956] (EE) AIGLX: reverting to software rendering
[843137.075] (II) AIGLX: enabled GLX_MESA_copy_sub_buffer
[843137.075] (II) AIGLX: Loaded and initialized swrast
[843137.075] (II) GLX: Initialized DRISWRAST GL provider for screen 0
Comment 13 Jan Beich freebsd_committer 2018-04-04 05:36:04 UTC
(In reply to rkoberman from comment #12)
Can you track down which Mesa 17.3.* update introduced the regression?
Can you try radeonkms driver from either graphics/drm-stable-kmod or graphics/drm-next-kmod?
Comment 14 Jan Beich freebsd_committer 2018-04-04 05:45:58 UTC
(In reply to Jan Beich from comment #13)
> radeonkms

Sorry. I meant i915kms instead. ;)
Comment 15 Jan Beich freebsd_committer 2018-04-04 05:59:51 UTC
Created attachment 192198 [details]
Always apply workaround on FreeBSD

(In reply to rkoberman from comment #12)
> glxgears:
> [intel_init_bufmgr: 1685] Kernel 3.9 required.
> libGL error: failed to create dri screen
> libGL error: failed to load driver: i965

Can you try the attached patch? Probably, affects Sandybridge with in-base DRM drivers on all FreeBSD versions.
Comment 16 rkoberman 2018-04-04 06:41:29 UTC
(In reply to Jan Beich from comment #15)
Jackpot! That does the trick. I now have function DRI on my system.
WebGL 1 Driver Renderer	Intel Open Source Technology Center -- Mesa DRI Intel(R) Sandybridge Mobile 
WebGL 1 Driver Version	3.0 Mesa 17.3.8

$ vblank_mode=0 glxgears
ATTENTION: default value of option vblank_mode overridden by environment.
26177 frames in 5.0 seconds = 5235.321 FPS

Is i915kms.ko still the best choice on 11.1? I load it at boot time on my system right now.

I will try the same on 18.0 tomorrow and see how it does. Probably better!
Comment 17 Jan Beich freebsd_committer 2018-04-04 07:17:04 UTC
(In reply to rkoberman from comment #16)
> Is i915kms.ko still the best choice on 11.1?

i915kms shipped with FreeBSD 11.* is based on Linux 3.8.
i915kms from graphics/drm-stable-kmod is based on Linux 4.9.
i915kms from graphics/drm-next-kmod is based on Linux 4.11 (4.15 soon)

Obviously, only one of those fails kernel version check in Mesa.
Comment 18 commit-hook freebsd_committer 2018-04-10 00:14:36 UTC
A commit references this bug:

Author: jbeich
Date: Tue Apr 10 00:14:03 UTC 2018
New revision: 466923
URL: https://svnweb.freebsd.org/changeset/ports/466923

Log:
  graphics/mesa-dri: always lower kernel version check

  Sandybridge on FreeBSD 11.* is also affected:

  $ glxgears
  [intel_init_bufmgr: 1685] Kernel 3.9 required.
  libGL error: failed to create dri screen
  libGL error: failed to load driver: i965
  5373 frames in 5.0 seconds = 1074.496 FPS

  Reported by:	Kevin Oberman
  PR:		225035 225415

Changes:
  head/graphics/mesa-dri/Makefile
Comment 19 commit-hook freebsd_committer 2018-04-10 00:15:47 UTC
A commit references this bug:

Author: jbeich
Date: Tue Apr 10 00:14:42 UTC 2018
New revision: 466925
URL: https://svnweb.freebsd.org/changeset/ports/466925

Log:
  graphics/mesa-{libs,dri}: update to 17.3.8

  Changes:	https://www.mesa3d.org/relnotes/17.3.2.html
  Changes:	https://www.mesa3d.org/relnotes/17.3.3.html
  Changes:	https://www.mesa3d.org/relnotes/17.3.4.html
  Changes:	https://www.mesa3d.org/relnotes/17.3.5.html
  Changes:	https://www.mesa3d.org/relnotes/17.3.6.html
  Changes:	https://www.mesa3d.org/relnotes/17.3.7.html
  Changes:	https://www.mesa3d.org/relnotes/17.3.8.html
  PR:		225035
  Tested by:	Oleh Hushchenkov, Kevin Oberman
  Approved by:	maintainer timeout (3 months, cookie licking)
  MFH:		2018Q2 (mostly regression fixes)

Changes:
  head/graphics/mesa-dri/Makefile
  head/graphics/mesa-dri/Makefile.common
  head/graphics/mesa-dri/distinfo
  head/graphics/mesa-dri/files/extra-src_mesa_drivers_dri_i965_intel__screen.c
Comment 20 commit-hook freebsd_committer 2018-04-10 00:18:57 UTC
A commit references this bug:

Author: jbeich
Date: Tue Apr 10 00:18:05 UTC 2018
New revision: 466929
URL: https://svnweb.freebsd.org/changeset/ports/466929

Log:
  MFH: r466923

  graphics/mesa-dri: always lower kernel version check

  Sandybridge on FreeBSD 11.* is also affected:

  $ glxgears
  [intel_init_bufmgr: 1685] Kernel 3.9 required.
  libGL error: failed to create dri screen
  libGL error: failed to load driver: i965
  5373 frames in 5.0 seconds = 1074.496 FPS

  Reported by:	Kevin Oberman
  PR:		225035 225415
  Approved by:	ports-secteam blanket

Changes:
_U  branches/2018Q2/
  branches/2018Q2/graphics/mesa-dri/Makefile
Comment 21 commit-hook freebsd_committer 2018-04-11 04:41:58 UTC
A commit references this bug:

Author: jbeich
Date: Wed Apr 11 04:40:57 UTC 2018
New revision: 467024
URL: https://svnweb.freebsd.org/changeset/ports/467024

Log:
  MFH: r466925

  graphics/mesa-{libs,dri}: update to 17.3.8

  Changes:	https://www.mesa3d.org/relnotes/17.3.2.html
  Changes:	https://www.mesa3d.org/relnotes/17.3.3.html
  Changes:	https://www.mesa3d.org/relnotes/17.3.4.html
  Changes:	https://www.mesa3d.org/relnotes/17.3.5.html
  Changes:	https://www.mesa3d.org/relnotes/17.3.6.html
  Changes:	https://www.mesa3d.org/relnotes/17.3.7.html
  Changes:	https://www.mesa3d.org/relnotes/17.3.8.html
  PR:		225035
  Tested by:	Oleh Hushchenkov, Kevin Oberman
  Approved by:	maintainer timeout (3 months, cookie licking)
  Approved by:	ports-secteam (riggs)

Changes:
_U  branches/2018Q2/
  branches/2018Q2/graphics/mesa-dri/Makefile
  branches/2018Q2/graphics/mesa-dri/Makefile.common
  branches/2018Q2/graphics/mesa-dri/distinfo
  branches/2018Q2/graphics/mesa-dri/files/extra-src_mesa_drivers_dri_i965_intel__screen.c
Comment 22 commit-hook freebsd_committer 2018-05-17 10:16:27 UTC
A commit references this bug:

Author: jbeich
Date: Thu May 17 10:15:56 UTC 2018
New revision: 470215
URL: https://svnweb.freebsd.org/changeset/ports/470215

Log:
  graphics/mesa-{libs,dri}: update to 17.3.9 (direct commit)

  Changes:	https://www.mesa3d.org/relnotes/17.3.9.html
  PR:		225035
  Approved by:	ports-secteam (eadler)

Changes:
  branches/2018Q2/graphics/mesa-dri/Makefile.common
  branches/2018Q2/graphics/mesa-dri/distinfo