fifo/g84-: ack non-stall interrupt before handling it

Closes a very unlikely race that can occur if another NonStallInterrupt
method passes between checking fences and acking the previous interrupt.

With this change, the interrupt will re-fire under such conditions.

Tested-by: Tobias Klausmann <tobias.johannes.klausmann@mni.thm.de>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drm: prevent stale fence->channel pointers, and protect with rcu

Tested-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
gf116: remove copy1 engine

Indications are that no GF116's actually have a copy engine there, but
actually have the decompression engine. This engine can be made to do
copies, but that should be done separately.

Unclear why this didn't turn up on all GF116's, but perhaps the
non-mobile ones came with enough VRAM to not trigger ttm migrations in
test scenarios.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=85465
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=59168
Cc: stable@vger.kernel.org
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drm-next 5a0e9d72136d90f5456bcc465d318f49d3f45838
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>