nv50/disp: Fix modeset on G94

Commit 1dce6264045cd23e9c07574ed0bb31c7dce9354f introduced a regression
spotted on several G94 (FDObz #85160). This device seems to expect the
vblank period to be set after setting scale instead of before.

V2: shove this in a separate function

This is a candidate bug-fix for 3.18

Signed-off-by: Roy Spliet <rspliet@eclipso.eu>
Tested-by: Zlatko Calusic <zcalusic@bitsync.net>
Tested-by: Michael Riesch <michael@riesch.at>
Tested-by: "poma" <pomidorabelisima@gmail.com>
Tested-by: Adam Williamson <adamw@happyassassin.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
graph/nvc0: add support for netlist firmwares

NVIDIA is releasing some GPU firmwares for the Tegra SoCs under
linux-firmware. The release format is a single file (called a netlist)
containing all the firmwares relevant to a GPU, which must thus be
extracted. This patch adds support for parsing the netlist and loading
the firmwares for the NVC0 family of GPUs, falling back to the previous
firmware lookup method is no netlist was already loaded.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
platform: support for netlist firmwares

Netlists released by NVIDIA are made of a single file containing
firmwares that can potentially be used across different engines. It
therefore makes most sense to load a netlist once before engines are
probed and have them duplicate their firmwares so the netlist can
be freed at the end of probe.

This patch implements this mechanism and adds the lookup data for GK20A.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
drm/nouveau/vm: fix mapping of SG pages list

SG pages lists (not to be confused with scatterlists) are a list of 4KB
memory pages used to define a nouveau_mem. Mapping them to a VM that
does not use 4KB apertures resulted in each subsequent 4KB physical page
being mapped into a larger VM aperture, thus creating an incorrect,
overlapping mapping.

This patch fixes this issue by detecting when such mappings occur and by
skipping the required number of pages in the list to ensure a correct
linear mapping.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
[HACK] add gk20a instmem

This is a gazillion times faster, but requires to invalidate the
GPU L2 (probably at a better place than this!)
Revert "[HACK] add gk20a instmem"

This reverts commit 9364a71174ab2f07a7234f9a85173c956066a34a.
HACK: drm/nouveau: prime: Pin buffer objects to VRAM

This is currently required to work around the lack of proper SMMU
support on Tegra. Ideally buffer objects could always be pinned to GART
and the SMMU will take care of mapping them to a linear I/O virtual
address range for importers.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Revert "ltc/gf100-: fix cbc issues on certain boards"

This reverts commit b15a810e97b8279cdbbfc90ede9e3fb51157f92b.

Causes IOMMU errors on GK20A.