FreeBSDDesktop / kms-drm

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

Build radeon+amdgpu on aarch64 #154

Closed valpackett closed 5 years ago

valpackett commented 5 years ago

first-ever-freebsd-aarch64-amdgpu

It works!!

Requires: D20787 and D20789

Tested on: Marvell MACCHIATObin + AMD Radeon RX 480

zeising commented 5 years ago

How does this relate to the work manu@ is doing? I know he's also working on DRM for arm64 stuff.

valpackett commented 5 years ago

@zeising the recent allwinner work? Yeah, it's quite different — @evadot made a from-scratch BSD-licensed driver for the Allwinner display engine, and it's based on drmlib which is an import of linuxkpi-gplv2 stuff etc. into FreeBSD base, and currently still has some GPL code in base as I understand. The rationale is that the various single board computers should have display support out of the box, without installing a package.

Meanwhile this is a tested small patch that enables AMD Radeon support on desktop-class arm64 systems.

zeising commented 5 years ago

@zeising the recent allwinner work? Yeah, it's quite different — @evadot made a from-scratch BSD-licensed driver for the Allwinner display engine, and it's based on drmlib which is an import of linuxkpi-gplv2 stuff etc. into FreeBSD base, and currently still has some GPL code in base as I understand. The rationale is that the various single board computers should have display support out of the box, without installing a package.

Meanwhile this is a tested small patch that enables AMD Radeon support on desktop-class arm64 systems.

Thank you for the explanation!

valpackett commented 5 years ago

hi

wayfire says hello! with some buffer corruption on client applications (that goes away and reappears occasionally), but i've heard about that on linux, so that's not freebsd's fault

UPD: it's this: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=923723 let's backport this tiny patch

better now

wf-aa64-fs8

:)

valpackett commented 5 years ago

Update: we also need to use MSI (old in-tree DRM did, btw!!) instead of legacy interrupts, because legacy is a disaster on aarch64 (I've been getting an interrupt rate of 300000, which was wasting CPU time and reducing responsiveness/performance). (This is not a GPU-exclusive thing, on a KVM VPS I've had MSI blacklisted for some reason and legacy interrupts resulted in horrible virtio disk performance :D)

https://reviews.freebsd.org/D21008 — kernel patch for implementing the enable/disable functions. (updates are required in here too, but I haven't pushed that yet)

valpackett commented 5 years ago

and here's a screenshot with something you might recognize :)

G A M I N G

andreasdr commented 5 years ago

Hi,

Wow. Thats impressive.

Best regards Andreas

Am 20.07.2019 um 22:51 schrieb myfreeweb:

and here's a screenshot with something you might recognize :)

G A M I N G https://user-images.githubusercontent.com/208340/61584004-1ed8d580-ab49-11e9-8fee-22669a3ada60.jpg

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/FreeBSDDesktop/kms-drm/pull/154?email_source=notifications&email_token=ACJXOOBCXC5S6ULKDWRV7X3QAN3E7A5CNFSM4H4KG3RKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2NVZXI#issuecomment-513498333, or mute the thread https://github.com/notifications/unsubscribe-auth/ACJXOOEMZ5EVY22T3EAVBB3QAN3E7ANCNFSM4H4KG3RA.

zeising commented 5 years ago

Is #163 a prerequisite for this?

valpackett commented 5 years ago

Not really, #163 improves performance but is not required to build. The prerequisites are the kernel patches linked in the first post.

zeising commented 5 years ago

Ok, thank you! Is there an ordering thing here? Will this build without the kernel update? Will drm-kmod build with the kernel update but not this?

I'm just asking because I need to know in which order things need to happen, and preferably, it would be good to keep backwards compat, meaning that with your kernel update, older versions of drm-kmod works (on at least the arches that worked before).

valpackett commented 5 years ago

On aarch64, both the kernel update and this are required obviously. But it's not like aarch64 was enabled already :)

On amd64, i386, powerpc64 everything should build as normal, the kernel update doesn't touch them.

Would be nice if someone retested on power with this though.

zeising commented 5 years ago

Noted, thanks!

valpackett commented 5 years ago

New test results: with a Cape Verde XT card, which is recognized by the EFI GOP driver (Polaris for some reason is just ignored, I'll contact AMD about that), even switching from efifb to amdgpu fb works :)

Also this card allows me to test radeonkms too. It works.

UPD: lol, my Polaris card was ignored because the VBIOS was modified (for performance)