qxl: split monitors_config object creation out.

This splits the creation of the monitors config object out so we can
re-use it across suspend/resume later.

Signed-off-by: Dave Airlie <airlied@redhat.com>
qxl: prepare memslot code for suspend/resume

this splits out initing the hw memslots from the guest info, and
creates an entrypoint for s/r to use.

Signed-off-by: Dave Airlie <airlied@redhat.com>
qxl: add ring prep code for s/r

This prepare the ring code for s/r additions, the release ring will need
reinitialising.

Signed-off-by: Dave Airlie <airlied@redhat.com>
qxl: add fb and ttm entry points for use by suspend/resume.

This just ports some APIs like radeon uses to provide hooks for s/r to
call.

Signed-off-by: Dave Airlie <airlied@redhat.com>
qxl: add suspend/resume/hibernate support.

This adds suspend/resume and hibernate support for the KMS driver. it evicts
all the objects, turns off the outputs, and waits for the hw to go idle,

On resume, it resets the memslots, rings, monitors object and forces modeset.

Signed-off-by: Dave Airlie <airlied@redhat.com>
qxl: use drm helper hotplug support

This uses the helper to deal with hotplug so fbdev gets included.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Merge branch 'qxl-next' of git://people.freedesktop.org/~airlied/linux into drm-next

Adds 3 features that UMS had to the KMS driver.
dynamic resizing - resizing remote-viewer makes guest resize
multiple crtcs - remote-viewer can access > 1 crtc.
suspend/resume/hibernate: guests can do suspend/resume/hibernate now.

* 'qxl-next' of git://people.freedesktop.org/~airlied/linux:
  qxl: use drm helper hotplug support
  qxl: add suspend/resume/hibernate support.
  qxl: add fb and ttm entry points for use by suspend/resume.
  qxl: add ring prep code for s/r
  qxl: prepare memslot code for suspend/resume
  qxl: split monitors_config object creation out.
  drm/qxl: set time on drawables from userspace
  drm/qxl: add support for > 1 output
  drm/qxl: make dynamic resizing work properly.
drm/nvc0-/gr: make register lists from initvals functions

Generated context verified to be the same for all supported chipsets.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drm/nvc0-/gr: pull out a group of separately context-switched gpc regs

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drm/nve0-/gr: some new gpc registers can have multiple copies

GK110 exposes more than one, and needs to be dealt with in the ctxsw
ucode just like the TPC sets are.

Broadcast is at +0xe00.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drm/nvc0-/gr: tpc regs a subset of gpc, add separate list for gpc/unk regs

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drm/nvc0-/gr: generate cs register lists from grctx data

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drm/nvd7/gr: initial support

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drm/nvf0/fifo: enable support

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drm/nvf0/ce: enable support

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drm/nvf0/gr: magic sequence that makes PGRAPH come out of hiding

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drm/nvf0/gr: enable support, if external cs ucode is available

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drm/nvc0/devinit: minor typo

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drm/nvf0/gr: fix ddx shaders locking up on me

This can be generalised and used on GK104 (probably even GF117), but lets
just make it work for now.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drm/nvc0-/gr: extend one of the magic calculations for >4 GPCs

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