fb/gk20a: fix setting of large page size bit

Commit "ltc/gf100-: fix cbc issues on certain boards" moved the setting
of the large page size bit from bar/nvc0 to fb/nvc0. GK20A uses its own
FB device and the change was thus not applied to it - fix this.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
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>
drm: a, somehow, missed hunk of "fix regression on agp boards"

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
bios: fix thinko when parsing extdev table

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
bios: split out shadow methods

We're about to need to be able to fetch additional chunks of data beyond
the primary bios image, which makes fetching a lot more complicated.

This splits out the verious shadowing routines to be nothing more than
very dumb "fetch this much data from this offset" routines, and leaves
the logic of what and how much to fetch in common code.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
bios: add pci data structure parsing

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
bios: use size/type from pci data structure

The field at +0x2 is technically processor specific, though I don't know
that it's ever mattered in practice (yet).

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
bios: fetch images beyond the first one in the rom

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
bios: add NPDE parsing

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
bios: use NPDE to locate images beyond those defined by PCIR

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
bios: recognise nv-specific rom/pcir signatures

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
bios: add parsing of pmu image tables

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
devinit: allow impl to select its own cold-boot method

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
devinit/gm204: initial implementation

Starting from GM204, certain registers are no longer accessible by the host
(or unsigned PMU firmware).

This commit implements devinit on PMU, using a signed microcode image, and
devinit data, from the VBIOS.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
bios: log if auxch accesses fail, also return 0x00 from rd when it does

Logging at trace level, rather than as en error, as it seems conceivable
that failure could be normal under certain circumstances (new bios,
older sink that doesn't support a particular DPCD address)

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
i2c/nv50-: kill some unused struct members

Left-over from before a rework a while back.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
bios: store aux addr independently of i2c

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
i2c: segregate aux channel adapter indices from bit-banged i2c

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
i2c/gm204: add pad driver

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
i2c/gm204: add aux channel driver

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>