Page MenuHomeFreeBSD

x11-drivers/xf86-video-vmware: Enable hardware accelerated graphics in VMware

Authored by johalun on May 3 2019, 9:56 PM.



This patch contains two parts

  • New port: libxatracker is a part of Mesa and required by xf86-video-wmware for hardware accelerated graphics in VMware.
  • Patch: Modify xf86-video-vmware to use correct dri device name and depend on libdrm and libxatracker.
Test Plan

Steps to test:

  1. pkg install drm-kmod
  2. pkg install xf86-video-vmware (with this patch applied)
  3. kldload vmwgfx
  4. startx

Known issues:

  • vmwgfx still has race conditions, causing kernel panic sometimes on kldload. Limiting the VM to one virtual CPU prevents this.
  • After exiting X, the screen remains black and the console does not return.

Diff Detail

rP FreeBSD ports repository
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline added inline comments.
5 ↗(On Diff #57022)

That's a very interesting description… of what Mesa was in the early 90s :)

linimon retitled this revision from Enable hardware accelerated graphics in VMware to x11-drivers/xf86-video-vmware: Enable hardware accelerated graphics in VMware.May 8 2019, 2:52 AM

Could you use devel/arcanist, or at least generate a diff with full context like it does, with svn diff -x -U9999 or git diff -U9999.

Update diff, include full context.

Note: The patch to the source file in xf86-video-vmware has been upstream already and will be made obsolete in future update. It is fully compatible with host systems not running with a drm driver.

zeising requested changes to this revision.Jun 15 2019, 1:30 PM

I assume you've run it through poudriere to ensure it builds and packages OK.
should libxatracker be made amd64 and i386 only? I assume it's only relevant for those architectures.

This revision now requires changes to proceed.Jun 15 2019, 1:30 PM

Fix build by reversing dependencies. Limit build to amd64 and i386.
Build test OK for both archs with poudriere.

One minor nit, otherwise you're good to go.

25–26 ↗(On Diff #58681)

Should come before CONFIGURE_ARGS I think. Technically, it should be right after COMMENT, but we want it after the include of mesa-dri/Makefile.common in case that file overwrites things.

This revision is now accepted and ready to land.Jun 16 2019, 9:47 AM

Move up ONLY_ARCHS in Makefile and set myself as creator of the file.

This revision now requires review to proceed.Jun 16 2019, 6:16 PM
This revision is now accepted and ready to land.Jun 16 2019, 6:45 PM

Looks OK to me. One possible nit

33 ↗(On Diff #58710)

strlcpy is safer here in the case where dev_name is exactly VMWGFX_DRI_DEVICE_LEN characters long.

This revision was automatically updated to reflect the committed changes.
33 ↗(On Diff #58710)

This patch is taken from upstream and will be made obsolete at the next xf86-video-vmware release.