nouveau: deprecate the object back-pointer

Um, I'm not really sure what the point of this was.  Nothing used it,
but have to keep the struct member to avoid breaking ABI.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
nouveau: kill device_open_existing()

Any need to keep this around should be long-gone by now.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
nouveau: move header definitions around a bit

No code changes, making it more obvious how things relate.

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

Due to an unfortunate thinko a long time back (embedding nouveau_object
directly into nouveau_device) it's not possible to just tack the refcnt
onto the end of nouveau_object without breaking the libdrm<->client ABI.

The solution is to prepend (from the libdrm_nouveau struct private) all
struct nouveau_object with a struct nouveau_object_refs, and use a
container_of() macro to get at them.

As a result, this looks pretty ugly, but it's workable and doesn't need
an ABI break.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
nouveau: handle abi16 objects completely in abi16.c

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
nouveau: update headers from kernel

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
nouveau: split device into drm + device

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
nouveau: basic support for new kernel interfaces

Enough to allow method calls on objects (perfctrs, zbc, etc).

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