grate-driver / xf86-video-opentegra

X.Org video driver for NVIDIA Tegra
Other
12 stars 9 forks source link

gcc: error: unrecognized command-line option '-mfp16-format=ieee' #66

Closed adam900710 closed 3 years ago

adam900710 commented 3 years ago

When compiling the code, gcc errors out for the option '-mfp16-format=ieee'.

Full output is attached. output.txt

The host system is ARM64 board (Nvidia Xavier AGX), running Manjaro ARM distro.

GCC version is 10.2.0.

digetx commented 3 years ago

Do you have any specific reason why you're building it for arm64? This driver isn't intended for Xavier, you need to use modesetting driver.

adam900710 commented 3 years ago

No wonder.

But the problem is, if using modesetting for AGX, it just falls back to LLVMpipe, even the mesa package has gallium driver compiled for tegra.

Or do I need anything else to enable proper hardware accleration for AGX?

adam900710 commented 3 years ago

Anyway, it's something unrelated to the package.

Closing.

digetx commented 3 years ago

You may need to use the most recent xorg server from git and even apply some extra patches. But I don't really know much about AGX, @cyndis and @thierryreding should know better.

kwizart commented 3 years ago

You need both tegra and nouveau gallium drivers enabled for mesa.

Also I wonder which kernel version are you using, I've experienced regressions with some recent kernel. upstream 5.10 is known good. (tested on jetson-tk1, but should be the same on arm64). It's possible that recent mainline has some fixes (or maybe linux-next).

adam900710 commented 3 years ago

The mesa-git package I built has both nouveau and tegra gallium drivers enabled.

And the kernel I'm using is upstream v5.13 kernel, with CONFIG_DRM_TEGRA=m (or there should be no /dev/dri/card0).

Thus it's really strange Xorg just falls backto llvmpipe.

kwizart commented 3 years ago

I think you may also need CONFIG_DRM_TEGRA_STAGING=y (along CONFIG_DRM_NOUVEAU=m)

edit: and indeed, using xorg-server from development is mandatory. (unless using backported patches for drm modifiers support at least).

cyndis commented 3 years ago

Nouveau does not yet support the GV11B; only up to GP10B (on Tegra186).

adam900710 commented 3 years ago

OK, the full xorg rebuild looks a little scary now.

xorg-server needs xorgproto >= 2.3.99.1, I'm not sure how the dependency chain will be.

Any idea which patches I need to backport? Or I should just wait for next xorg-server release?

adam900710 commented 3 years ago

BTW, why mesa don't have a page for tegra in its platform/drivers page? https://docs.mesa3d.org/systems.html

Even panfrost/vc4 has their pages, while the strongest mobile GPU doesn't have one looks strange to me...

digetx commented 3 years ago

IIUC, the current stable Xorg doesn't support display modifiers which may be needed by latest Tegras. But since GV11B isn't supported by the Nouveau driver yet, then patching Xorg won't help anyways. You'll need to wait until support will be added.

The Nouveau is the main opensource GPU driver for T124+ SoCs. Mesa's Tegra driver only provides a small glue that links Nouveau with Tegra. It may be a good idea to have a dedicated Tegra wiki page that documents the current support status and provide links to WIP patches since the current staus isn't ideal. It's actually a very normal thing in opensource development to have a slow-pace upstream, nearly every tenth package in Gentoo has a dozen of extra patches with bugfixes and extra features.

adam900710 commented 3 years ago

No problem waiting for the proper support in next xorg release.

Just no sure if I'm missing some config or had some wrong setting which makes me unable to try tegra drivers.

Thus a page for mesa wiki would really help guys like me.

(For the worst case, I can just plug a RX580 into the Xavier AGX board with extra PSU and call it a day)