Page MenuHomeFreeBSD

linuxkpi: extend range of nsecs_to_jiffies64 to support Mesa's drm_syncobj usage
ClosedPublic

Authored by hselasky on Feb 26 2020, 9:10 PM.
Tags
None
Referenced Files
F151424511: D23846.id68883.diff
Wed, Apr 8, 8:10 AM
F151389364: D23846.id68883.diff
Wed, Apr 8, 2:27 AM
Unknown Object (File)
Thu, Apr 2, 4:23 AM
Unknown Object (File)
Mon, Mar 23, 1:47 PM
Unknown Object (File)
Sat, Mar 21, 8:26 AM
Unknown Object (File)
Wed, Mar 18, 8:14 PM
Unknown Object (File)
Sat, Mar 14, 4:33 AM
Unknown Object (File)
Fri, Mar 13, 11:19 AM

Details

Summary

For Some Reason™ we've been experiencing breakage in Vulkan fences (implemented using DRM syncobj).

@jbeich noticed that changing INT64_MAX to INT32_MAX in the part of Mesa that sets the timeout_nsec field on the drm_syncobj_wait struct fixes it. Well, turns out Mesa has been relying on the implementation details of Linux's nsecs_to_jiffies64 — it supports a wider range of numbers, and INT64_MAX works fine. Let's do a similar thing I guess..

Test Plan

Rebuild drm-kms after adding this patch, reboot, retry using Vulkan applications (e.g. vkquake) — now they work fine instead of quitting almost instantly.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

hselasky updated this revision to Diff 68861.
hselasky edited reviewers, added: val_packett.cool; removed: hselasky.

Hi Greg,

Can you test this patch instead?

--HPS

Wow, that's a lot more code :D But yeah, works fine.

This revision is now accepted and ready to land.Feb 26 2020, 10:54 PM

I just have to give it a spin at work tomorrow and I'll submit it.