Page MenuHomeFreeBSD

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

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

Details

Summary

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

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

Event Timeline

johalun created this revision.May 3 2019, 9:56 PM
greg_unrelenting.technology added inline comments.
graphics/libxatracker/pkg-descr
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
mat added a comment.May 8 2019, 9:39 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.

johalun updated this revision to Diff 57650.May 21 2019, 9:41 PM

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.

johalun added a reviewer: imp.May 21 2019, 9:46 PM
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
johalun updated this revision to Diff 58681.Jun 16 2019, 2:26 AM

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

zeising accepted this revision.Jun 16 2019, 9:47 AM

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

graphics/libxatracker/Makefile
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
johalun updated this revision to Diff 58710.Jun 16 2019, 6:16 PM

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
johalun marked 2 inline comments as done.Jun 16 2019, 6:17 PM
zeising accepted this revision.Jun 16 2019, 6:45 PM

LGTM

This revision is now accepted and ready to land.Jun 16 2019, 6:45 PM
imp accepted this revision.Jun 17 2019, 5:46 AM

Looks OK to me. One possible nit

x11-drivers/xf86-video-vmware/files/patch-vmwgfx_vmwgfx__dri2.c
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.
johalun added inline comments.Jun 17 2019, 3:14 PM
x11-drivers/xf86-video-vmware/files/patch-vmwgfx_vmwgfx__dri2.c
33 ↗(On Diff #58710)

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