FreeBSDDesktop / kms-drm

the DRM part of the linuxkpi-based KMS
63 stars 26 forks source link

Enable Message Signaled Interrupts (MSI) #163

Closed valpackett closed 5 years ago

valpackett commented 5 years ago

This fixes ridiculous interrupt rate on aarch64, was enabled in the legacy in-tree drm port, and is a good idea in general.

Corresponding kernel patch: https://reviews.freebsd.org/D21008 but this shouldn't break the build without it, thanks to if defined(pci_enable_msi).

Tested on amdgpu and i915kms.

hselasky commented 5 years ago

@johalun , @zeising --- This patch needs to go to FreeBSD-current and FreeBSD-12 DRM next before we can merge the kernel part! Will you handle.

zeising commented 5 years ago

Just out of curiousity, where are pci_[enable,disable]_msi defined, and for which architecutures?

hselasky commented 5 years ago

They are currently not defined. Looks like a leftover from a porting effort.

zeising commented 5 years ago

Then how is this supposed to work? It's just a change to code that was #ifdef __linux__ is now #if defined(__linux__) || defined (pci_[enable,disable]_msi Or is there an upcoming change to define pci_[enable,disable]_msi?

valpackett commented 5 years ago

The kernel patch is linked in the first post

zeising commented 5 years ago

@myfreeweb That's probably the piece I'm missing. Sorry for the confusion. @myfreeweb @hselasky Thanks for explaining to me. :)

zeising commented 5 years ago

I'd like to give @johalun the chance to comment, but I see no problems with this.

johalun commented 5 years ago

Has this been tested on other than aarch64+amd?

valpackett commented 5 years ago

Of course I've tested on a Ryzen+Vega desktop and an i915 laptop

johalun commented 5 years ago

@hselasky Also merged to v4.16 and v4.16-fbsd12