Page MenuHomeFreeBSD

Update libdrm to 2.4.78 and remove the dependency on libdevq
ClosedPublic

Authored by rezny on Mar 29 2017, 1:20 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Dec 15, 9:52 AM
Unknown Object (File)
Thu, Dec 12, 6:31 AM
Unknown Object (File)
Thu, Dec 5, 6:42 PM
Unknown Object (File)
Nov 14 2024, 11:20 PM
Unknown Object (File)
Oct 25 2024, 4:26 AM
Unknown Object (File)
Oct 23 2024, 6:11 PM
Unknown Object (File)
Oct 19 2024, 10:26 PM
Unknown Object (File)
Oct 5 2024, 11:41 PM
Subscribers

Details

Summary

I have implemented the necessary functionality directly in libdrm alongside Linux's and OpenBSD's implementations with the intent to upstream that so we do not need significant local patches or an extra library for a few syscalls.

Test Plan

Poudriere 10.3/11.0 amd64/i386 OK, build on 11-stable ppc64, run verified on multiple 11amd64 systems with both intel and radeon

Diff Detail

Repository
rP FreeBSD ports repository
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 8387
Build 8663: arc lint + arc unit

Event Timeline

Chase jrm's portrevision bump for libpthread-stubs with another bump

bapt added subscribers: dumbbell, bapt.

Adding @dumbbell as he wrote that part in libdevq :)

graphics/libdrm/files/patch-xf86drm.h
13

Why modifying openbsd stuff?

graphics/libdrm/files/patch-xf86drm.h
13

Consolidation while refactoring the mess. I moved a bunch of utility functions up the .c file so they can be used where needed and moved #defines to the .h file.
DRM_{PRIMARY,RENDER,CONTROL}_DEV_NAME were move from the .c to the .h, DRM_{,CONTROL,RENDER}_DEV_NAME were redefined in terms of the former set to remove duplication and chance of mismatch.
DRM_NODE_NAME_MAX was created to replace a function so the result can be used for array sizes instead of inconsistent values in various places.

graphics/libdrm/files/patch-xf86drm.h
13

Correction: DRM_{PRIMARY,CONTROL,RENDER}_MINOR_NAME were moved from the .c to the .h and DRM_{,CONTROL,RENDER}_DEV_NAME were redefined in terms of those.
Is there really no way to edit previous comments in phabricator?

libdrm 2.4.76 was released yesterday, so update the patch set after testing.

rezny retitled this revision from Remove the libdevq dependency in libdrm to Update libdrm to 2.4.76 and remove the dependency on libdevq.Mar 30 2017, 8:03 AM
rezny edited the summary of this revision. (Show Details)

Remove the check of major number once again. I thought I had confirmation it is always 1 on drm-next, but it has now been reported it can be 2 or 3 as well, so assume it's random and never check; it has no purpose anyway.

Note that I'm more than happy with this move, the libdevq idea was cool but we never made it real in the end :(

This revision is now accepted and ready to land.Apr 3 2017, 1:27 PM
rezny edited edge metadata.

After discussing with ftigeot to confirm major ID is dynanically assigned in DragonFly, remove the last difference from FreeBSD by setting MAJOR_ID 0 (n/a) there as well. Hopefully it will work for DragonFly (the version using libdevq did not), but if not, they will take care of patching for their needs.

This revision now requires review to proceed.Apr 3 2017, 4:45 PM
This revision is now accepted and ready to land.Apr 7 2017, 9:06 PM
rezny edited edge metadata.
rezny marked 3 inline comments as done.

Wider testing revealed more variance than expected; busid does not always follow name and the busid oid is not always present, so try both to maximize chance of success. Assume all drm devices support KMS on DragonFly because they do but do not properly indicate so. Also, update to 2.4.78 because there were a couple more releases in the time that I was testing a system with multiple drm devices present.

This revision now requires review to proceed.Apr 8 2017, 4:27 AM
rezny retitled this revision from Update libdrm to 2.4.76 and remove the dependency on libdevq to Update libdrm to 2.4.78 and remove the dependency on libdevq.Apr 8 2017, 4:27 AM

Good update, approved

This revision is now accepted and ready to land.Apr 8 2017, 2:34 PM
This revision was automatically updated to reflect the committed changes.