Commit Graph

22652 Commits

Author SHA1 Message Date
Ben Skeggs 3a8c3400f3 drm/nouveau/subdev: rename some functions to avoid upcoming conflicts
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:33 +10:00
Ben Skeggs aa35888ff0 drm/nouveau/object: rename some functions to avoid upcoming conflicts
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:33 +10:00
Ben Skeggs d61f4c178c drm/nouveau/nvif: device time mthd
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:33 +10:00
Ben Skeggs 159045cdc4 drm/nouveau/nvif: replace pushbuf with vm in fermi/kepler gpfifo class args
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:33 +10:00
Ben Skeggs 22827fa42b drm/nouveau/nvif: return chipset/board names from device info method
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:33 +10:00
Ben Skeggs d56241794c drm/nouveau/nvif: add supported engines query to kepler gpfifo class
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:33 +10:00
Ben Skeggs 41a634064d drm/nouveau/nvif: return min/max versions for supported object classes
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:32 +10:00
Ben Skeggs f58ddf9581 drm/nouveau/nvif: assign internal class identifiers to sw classes
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:32 +10:00
Ben Skeggs 315a8b2edf drm/nouveau/nvif: use negative oclass identifier for internal classes
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:32 +10:00
Ben Skeggs 5c15bf709e drm/nouveau/nvif: return success from sclass even for objects without children
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:32 +10:00
Ben Skeggs 99d4d36ad6 drm/nouveau/nvif: extend nop ioctl to return nvif version identifier
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:32 +10:00
Ben Skeggs bf81df9be2 drm/nouveau/nvif: replace path-based object identification
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:32 +10:00
Ben Skeggs a01ca78c8f drm/nouveau/nvif: simplify and tidy library interfaces
A variety of tweaks to the NVIF library interfaces, mostly ripping out
things that turned out to be not so useful.

- Removed refcounting from nvif_object, callers are expected to not be
  stupid instead.
- nvif_client is directly reachable from anything derived from nvif_object,
  removing the need for heuristics to locate it
- _new() versions of interfaces, that allocate memory for the object
  they construct, have been removed.  The vast majority of callers used
  the embedded _init() interfaces.
- No longer storing constructor arguments (and the data returned from
  nvkm) inside nvif_object, it's more or less unused and just wastes
  memory.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:32 +10:00
Ben Skeggs 4e7e62d607 drm/nouveau/client: store default device by handle, not reference
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:31 +10:00
Ben Skeggs 102b49da15 drm/nouveau/parent: remove some (now) unnecessary special-case handling
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:31 +10:00
Ben Skeggs 493f189dc0 drm/nouveau/object: store object type data outside of handle
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:31 +10:00
Ben Skeggs a1e8873622 drm/nouveau/device: decouple from engine machinery
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:31 +10:00
Ben Skeggs a1bfb29a33 drm/nouveau/device: split user device implementation out on its own
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:31 +10:00
Ben Skeggs 0ac9d210a1 drm/nouveau/device: simplify subdev construction
Replaces the piece-by-piece (in response to NV_DEVICE ctor args) device
contruction with a once-off all-or-nothing approach, eliminating some
tricky refcounting issues.  The partial device init capability was only
required by some tools, and has been moved to probe time instead.

Temporarily removes a workaround for some boards where we need to fiddle
with AGP registers before executing the DEVINIT scripts.  A later commit
in this series reinstates it.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:31 +10:00
Ben Skeggs e781dc8f6c drm/nouveau/device: tidy ctor/dtor interfaces
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:30 +10:00
Ben Skeggs 76ecea5b4b drm/nouveau/client: tidy ctor/dtor interfaces
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:30 +10:00
Ben Skeggs 47b2505efb drm/nouveau/platform: remove subclassing of nvkm_device
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:30 +10:00
Ben Skeggs f2c906fc0c drm/nouveau/disp: transition outp/conn away from being based on nvkm_object
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:30 +10:00
Ben Skeggs 2aa5eac516 drm/nouveau/i2c: transition pad/ports away from being based on nvkm_object
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:29 +10:00
Ben Skeggs d36a99d2da drm/nouveau/fb: transition nvkm_ram away from being based on nvkm_object
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:29 +10:00
Ben Skeggs a8dae9fe0e drm/nouveau/vga: require nvkm_device pointer in accessor functions
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:29 +10:00
Ben Skeggs 95cf469cc3 drm/nouveau/imem: use object accessor function for suspend/resume
Very much not ideal, but this will be improved later.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:29 +10:00
Ben Skeggs cfdc4c44b4 drm/nouveau/core: wrap direct use of object accessor functions
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:29 +10:00
Ben Skeggs 572fb13db2 drm/nouveau/mpeg: switch to gpuobj accessor macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:28 +10:00
Ben Skeggs 142ea05f49 drm/nouveau/gr: switch to gpuobj accessor macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:28 +10:00
Ben Skeggs 5444e770e3 drm/nouveau/fifo: switch to gpuobj accessor macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:28 +10:00
Ben Skeggs 3f532ef1e2 drm/nouveau/dma: switch to gpuobj accessor macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:28 +10:00
Ben Skeggs 6d06fd68cb drm/nouveau/cipher: switch to gpuobj accessor macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:28 +10:00
Ben Skeggs edb1dc51de drm/nouveau/xtensa: switch to gpuobj accessor macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:28 +10:00
Ben Skeggs 9cc264a3aa drm/nouveau/falcon: switch to gpuobj accessor macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:28 +10:00
Ben Skeggs cd821077aa drm/nouveau/mmu: switch to gpuobj accessor macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:27 +10:00
Ben Skeggs 1918707556 drm/nouveau/bar: switch to gpuobj accessor macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:27 +10:00
Ben Skeggs 45ea503161 drm/nouveau/core: switch to gpuobj accessor macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:27 +10:00
Ben Skeggs 384af9acea drm/nouveau/gpuobj: type-safe accessor macros
These require an explicit struct nvkm_gpuobj pointer, unlike the previous
macros which take a void *, and work with any nvkm_object.

New semantics require acquiring/releasing a gpuobj before accessing them,
which will be made use of in later patches to greatly reduce the overhead
of accesses, particularly when a direct mmio mapping of the object is not
available (suspend/resume, out of ioremap() space, and on GK20A).

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:27 +10:00
Ben Skeggs 9ccdc76006 drm/nouveau/xtensa: remove object accessor functions
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:27 +10:00
Ben Skeggs 63902181a7 drm/nouveau/falcon: remove object accessor functions
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:27 +10:00
Ben Skeggs a47474261e drm/nouveau/imem: remove object accessor functions
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:26 +10:00
Ben Skeggs 7e24c1145a drm/nouveau/fuse: remove object accessor functions
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:26 +10:00
Ben Skeggs 7f5f518fd7 drm/nouveau/bios: remove object accessor functions
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:26 +10:00
Ben Skeggs 5300394106 drm/nouveau/core: remove last printks
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:26 +10:00
Ben Skeggs 9ad97ede4b drm/nouveau: use dev_* for logging
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:26 +10:00
Ben Skeggs 9e3911e5b2 drm/nouveau/sec: switch to subdev printk macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:26 +10:00
Ben Skeggs 476901ff6c drm/nouveau/pm: switch to subdev printk macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:25 +10:00
Ben Skeggs b835c09bc6 drm/nouveau/mpeg: switch to subdev printk macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:25 +10:00
Ben Skeggs 109c2f2f1c drm/nouveau/gr: switch to subdev printk macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:25 +10:00
Ben Skeggs e5c5e4f5d3 drm/nouveau/fifo: switch to subdev printk macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:25 +10:00
Ben Skeggs 84407824e9 drm/nouveau/disp: switch to subdev printk macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:25 +10:00
Ben Skeggs e37f543370 drm/nouveau/device: switch to dev_printk macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:25 +10:00
Ben Skeggs 65850a3b40 drm/nouveau/cipher: switch to subdev printk macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:25 +10:00
Ben Skeggs 1eed206fa2 drm/nouveau/ce: switch to subdev printk macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:24 +10:00
Ben Skeggs 7108bfe408 drm/nouveau/xtensa: switch to subdev printk macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:24 +10:00
Ben Skeggs 64b5ce1fe9 drm/nouveau/falcon: switch to subdev printk macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:24 +10:00
Ben Skeggs 185eda3339 drm/nouveau/volt: switch to subdev printk macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:24 +10:00
Ben Skeggs 9d7b9d9f11 drm/nouveau/tmr: switch to subdev printk macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:24 +10:00
Ben Skeggs b3c418bb48 drm/nouveau/therm: switch to subdev printk macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:24 +10:00
Ben Skeggs c19e329d66 drm/nouveau/pmu: switch to subdev printk macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:23 +10:00
Ben Skeggs 27cc60a175 drm/nouveau/mxm: switch to subdev printk macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:23 +10:00
Ben Skeggs 85ae830f5a drm/nouveau/mmu: switch to subdev printk macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:23 +10:00
Ben Skeggs c47a48a544 drm/nouveau/mc: switch to subdev printk macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:23 +10:00
Ben Skeggs 59e1a2f1a6 drm/nouveau/ltc: switch to subdev printk macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:23 +10:00
Ben Skeggs 00c5550710 drm/nouveau/imem: switch to subdev printk macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:23 +10:00
Ben Skeggs 18019e95de drm/nouveau/ibus: switch to subdev printk macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:23 +10:00
Ben Skeggs 1cb57d25b6 drm/nouveau/i2c: switch to subdev printk macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:22 +10:00
Ben Skeggs 3ecd329b64 drm/nouveau/fb: switch to subdev printk macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:22 +10:00
Ben Skeggs aa860e4bbe drm/nouveau/devinit: switch to subdev printk macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:22 +10:00
Ben Skeggs b907649e7b drm/nouveau/clk: switch to subdev printk macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:22 +10:00
Ben Skeggs a699a85add drm/nouveau/bus: switch to subdev printk macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:22 +10:00
Ben Skeggs 60b29d2071 drm/nouveau/bios: switch to subdev printk macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:22 +10:00
Ben Skeggs 0df18e6d52 drm/nouveau/bar: switch to subdev printk macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:22 +10:00
Ben Skeggs 6594363b9f drm/nouveau/core: type-safe printk macros
These require an explicit pointers to nvkm_object/nvkm_subdev/nvkm_device,
depending on which macros are used.  This is unlike the previous macros
which take a void *, and work for anything derived from nvkm_object (by
way of some awful heuristics).

The output will be a bit confused until everything has been transitioned,
as the logging format used is a more standard style that previously.

In addition, usage of pr_cont(), which doesn't work correctly with the
dev_*() printk functions (and was potentially racy to begin with), will
be replaced.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:21 +10:00
Ben Skeggs 5444204036 drm/nouveau: switch to new-style timer macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:21 +10:00
Ben Skeggs 37eabb030c drm/nouveau/mpeg: switch to new-style timer macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:21 +10:00
Ben Skeggs c4584adc37 drm/nouveau/gr: switch to new-style timer macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:21 +10:00
Ben Skeggs af3082b3c6 drm/nouveau/fifo: switch to new-style timer macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:21 +10:00
Ben Skeggs 3a020b4dfc drm/nouveau/disp: switch to new-style timer macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:21 +10:00
Ben Skeggs 6ed5c16824 drm/nouveau/falcon: switch to new-style timer macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:20 +10:00
Ben Skeggs dd4bb3eccc drm/nouveau/pmu: switch to new-style timer macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:20 +10:00
Ben Skeggs 909604d444 drm/nouveau/mmu: switch to new-style timer macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:20 +10:00
Ben Skeggs 1302bcbb82 drm/nouveau/ltc: switch to new-style timer macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:20 +10:00
Ben Skeggs 63bb5c390b drm/nouveau/ibus: switch to new-style timer macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:20 +10:00
Ben Skeggs cf07d861ce drm/nouveau/fb: switch to new-style timer macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:20 +10:00
Ben Skeggs 6979c6303a drm/nouveau/clk: switch to new-style timer macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:20 +10:00
Ben Skeggs 4f31c84eba drm/nouveau/bus: switch to new-style timer macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:19 +10:00
Ben Skeggs 4dd308f446 drm/nouveau/bar: switch to new-style timer macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:19 +10:00
Ben Skeggs 56f67dc196 drm/nouveau/tmr: type-safe PTIMER-based delay/wait macros
These require an explicit struct nvkm_device pointer, unlike the previous
macros which take a void *, and work for (almost) anything derived from
nvkm_object by using some heuristics.

These macros are more general than the previous ones, and can be used to
handle PTIMER-based busy-waits (will be used in later devinit fixes) as
well as more complicated wait conditions.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:19 +10:00
Ben Skeggs 2ebfa1bc6f drm/nouveau/kms/nv04: fix incorrect use of register accessors
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:19 +10:00
Ben Skeggs 01d64afc2e drm/nouveau/sw: switch to device pri macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:19 +10:00
Ben Skeggs b8ad561e55 drm/nouveau/sec: switch to device pri macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:19 +10:00
Ben Skeggs 846e831d95 drm/nouveau/pm: switch to device pri macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:19 +10:00
Ben Skeggs f2d85ad1a6 drm/nouveau/msvld: switch to device pri macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:18 +10:00
Ben Skeggs 320ca25131 drm/nouveau/msppp: switch to device pri macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:18 +10:00
Ben Skeggs 54118c74fb drm/nouveau/mspdec: switch to device pri macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:18 +10:00
Ben Skeggs 636e37aa97 drm/nouveau/mpeg: switch to device pri macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:18 +10:00
Ben Skeggs 276836d46e drm/nouveau/gr: switch to device pri macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:17 +10:00
Ben Skeggs 8774440390 drm/nouveau/fifo: switch to device pri macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:17 +10:00
Ben Skeggs 2fde1f1c34 drm/nouveau/disp: switch to device pri macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:17 +10:00
Ben Skeggs f9793bb7ed drm/nouveau/device: switch to device pri macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:17 +10:00
Ben Skeggs b958bf916d drm/nouveau/cipher: switch to device pri macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:17 +10:00
Ben Skeggs 29e9f51094 drm/nouveau/ce: switch to device pri macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:17 +10:00
Ben Skeggs 2ef770f743 drm/nouveau/xtensa: switch to device pri macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:16 +10:00
Ben Skeggs 96975248ee drm/nouveau/falcon: switch to device pri macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:16 +10:00
Ben Skeggs c44c049f28 drm/nouveau/tmr: switch to device pri macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:16 +10:00
Ben Skeggs 5718ea3257 drm/nouveau/therm: switch to device pri macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:16 +10:00
Ben Skeggs bef002e87f drm/nouveau/pmu: switch to device pri macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:16 +10:00
Ben Skeggs 83f56106ea drm/nouveau/mmu: switch to device pri macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:16 +10:00
Ben Skeggs 25e3a463fc drm/nouveau/mc: switch to device pri macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:15 +10:00
Ben Skeggs 99336ed363 drm/nouveau/ltc: switch to device pri macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:15 +10:00
Ben Skeggs d5c5bcf693 drm/nouveau/imem: switch to device pri macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:15 +10:00
Ben Skeggs fef5cc0f25 drm/nouveau/ibus: switch to device pri macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:15 +10:00
Ben Skeggs 6f22749910 drm/nouveau/i2c: switch to device pri macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:15 +10:00
Ben Skeggs 4de93a086e drm/nouveau/gpio: switch to device pri macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:15 +10:00
Ben Skeggs 2bdb4995fd drm/nouveau/fuse: switch to device pri macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:14 +10:00
Ben Skeggs 6758745b28 drm/nouveau/fb: switch to device pri macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:14 +10:00
Ben Skeggs 8ac3f64f75 drm/nouveau/devinit: switch to device pri macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:14 +10:00
Ben Skeggs 822ad79fa4 drm/nouveau/clk: switch to device pri macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:14 +10:00
Ben Skeggs 14caba447c drm/nouveau/bus: switch to device pri macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:14 +10:00
Ben Skeggs d8f266a353 drm/nouveau/bios: switch to device pri macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:14 +10:00
Ben Skeggs 9155c16214 drm/nouveau/bar: switch to device pri macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:14 +10:00
Ben Skeggs 94bab10223 drm/nouveau/core: switch to device pri macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:13 +10:00
Ben Skeggs dd64694208 drm/nouveau/device: type-safe register accessor macros
These require an explit struct nvkm_device pointer, unlike the previous
macros which take a void *, and assume it's any old nvkm_subdev.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:13 +10:00
Ben Skeggs 8699745a2b drm/nouveau/vp: cosmetic changes
This is purely preparation for upcoming commits, there should be no
code changes here.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:13 +10:00
Ben Skeggs 226dcefe70 drm/nouveau/sw: cosmetic changes
This is purely preparation for upcoming commits, there should be no
code changes here.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:13 +10:00
Ben Skeggs c0e297dc61 drm/nouveau/sec: cosmetic changes
This is purely preparation for upcoming commits, there should be no
code changes here.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:13 +10:00
Ben Skeggs 8c1aeaa139 drm/nouveau/pm: cosmetic changes
This is purely preparation for upcoming commits, there should be no
code changes here.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:12 +10:00
Ben Skeggs 74137ffcd1 drm/nouveau/msvld: cosmetic changes
This is purely preparation for upcoming commits, there should be no
code changes here.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:12 +10:00
Ben Skeggs fd507a53ab drm/nouveau/msppp: cosmetic changes
This is purely preparation for upcoming commits, there should be no
code changes here.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:12 +10:00
Ben Skeggs 11271f9f8f drm/nouveau/mspdec: cosmetic changes
This is purely preparation for upcoming commits, there should be no
code changes here.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:12 +10:00
Ben Skeggs b19de4f3d7 drm/nouveau/mpeg: cosmetic changes
This is purely preparation for upcoming commits, there should be no
code changes here.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:12 +10:00
Ben Skeggs bfee3f3d97 drm/nouveau/gr: cosmetic changes
This is purely preparation for upcoming commits, there should be no
code changes here.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:11 +10:00
Ben Skeggs 6189f1b093 drm/nouveau/fifo: cosmetic changes
This is purely preparation for upcoming commits, there should be no
code changes here.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:11 +10:00
Ben Skeggs a317aa21be drm/nouveau/dma: cosmetic changes
This is purely preparation for upcoming commits, there should be no
code changes here.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:11 +10:00
Ben Skeggs fd166a1832 drm/nouveau/disp: cosmetic changes
This is purely preparation for upcoming commits, there should be no
code changes here.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:11 +10:00
Ben Skeggs e2f1cf253e drm/nouveau/cipher: cosmetic changes
This is purely preparation for upcoming commits, there should be no
code changes here.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:11 +10:00
Ben Skeggs d9261a6837 drm/nouveau/ce: cosmetic changes
This is purely preparation for upcoming commits, there should be no
code changes here.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:11 +10:00
Ben Skeggs d8c304b504 drm/nouveau/bsp: cosmetic changes
This is purely preparation for upcoming commits, there should be no
code changes here.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:10 +10:00
Ben Skeggs f0961867b8 drm/nouveau/xtensa: cosmetic changes
This is purely preparation for upcoming commits, there should be no
code changes here.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:10 +10:00
Ben Skeggs b26ada6fed drm/nouveau/falcon: cosmetic changes
This is purely preparation for upcoming commits, there should be no
code changes here.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:10 +10:00
Ben Skeggs 6052dc5775 drm/nouveau/volt: cosmetic changes
This is purely preparation for upcoming commits, there should be no
code changes here.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:10 +10:00
Ben Skeggs cb8bb9cedb drm/nouveau/tmr: cosmetic changes
This is purely preparation for upcoming commits, there should be no
code changes here.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:09 +10:00
Ben Skeggs da06b46b72 drm/nouveau/therm: cosmetic changes
This is purely preparation for upcoming commits, there should be no
code changes here.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:09 +10:00
Ben Skeggs 5a7d1e22fe drm/nouveau/pmu: cosmetic changes
This is purely preparation for upcoming commits, there should be no
code changes here.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:09 +10:00
Ben Skeggs 2d9d5889e8 drm/nouveau/mxm: cosmetic changes
This is purely preparation for upcoming commits, there should be no
code changes here.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:09 +10:00
Ben Skeggs 1f5bffca22 drm/nouveau/mmu: cosmetic changes
This is purely preparation for upcoming commits, there should be no
code changes here.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:09 +10:00
Ben Skeggs 2ca0ddbc03 drm/nouveau/mc: cosmetic changes
This is purely preparation for upcoming commits, there should be no
code changes here.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:09 +10:00
Ben Skeggs c7750cfbc1 drm/nouveau/ltc: cosmetic changes
This is purely preparation for upcoming commits, there should be no
code changes here.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:09 +10:00
Ben Skeggs c44c06aeeb drm/nouveau/imem: cosmetic changes
This is purely preparation for upcoming commits, there should be no
code changes here.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:08 +10:00
Ben Skeggs ac51596f27 drm/nouveau/ibus: cosmetic changes
This is purely preparation for upcoming commits, there should be no
code changes here.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:08 +10:00
Ben Skeggs 5b920d9264 drm/nouveau/i2c: cosmetic changes
This is purely preparation for upcoming commits, there should be no
code changes here.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:08 +10:00
Ben Skeggs e7d6518104 drm/nouveau/gpio: cosmetic changes
This is purely preparation for upcoming commits, there should be no
code changes here.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:08 +10:00
Ben Skeggs ce7b4f60a8 drm/nouveau/fuse: cosmetic changes
This is purely preparation for upcoming commits, there should be no
code changes here.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:08 +10:00
Ben Skeggs b1e4553cb1 drm/nouveau/fb: cosmetic changes
This is purely preparation for upcoming commits, there should be no
code changes here.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:08 +10:00
Ben Skeggs 266f8b5ee6 drm/nouveau/devinit: cosmetic changes
This is purely preparation for upcoming commits, there should be no
code changes here.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:07 +10:00
Ben Skeggs 3eca809b3c drm/nouveau/clk: cosmetic changes
This is purely preparation for upcoming commits, there should be no
code changes here.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:07 +10:00
Ben Skeggs 01d6b95605 drm/nouveau/bus: cosmetic changes
This is purely preparation for upcoming commits, there should be no
code changes here.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:07 +10:00
Ben Skeggs a00014e396 drm/nouveau/bios: cosmetic changes
This is purely preparation for upcoming commits, there should be no
code changes here.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:07 +10:00
Ben Skeggs 5b0c189fcb drm/nouveau/bar: cosmetic changes
This is purely preparation for upcoming commits, there should be no
code changes here.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:07 +10:00
Ben Skeggs 9ace404b10 drm/nouveau/device: include core/device.h automatically for subdevs/engines
Pretty much every subdev/engine is going to need access to nvkm_device
shortly to touch registers and/or output messages.

The odd placement of the includes is necessary to work around some
inter-dependencies that currently exist.  This will be fixed later.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:07 +10:00
Ben Skeggs 6d0d40e7a5 drm/nouveau/device: add direct pointer to struct device
A future commit will hide the platform/pci specifics from nvkm_device,
but it's still very useful in a lot of places to have access to the
Linux device struct.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:06 +10:00
Ben Skeggs 741d778ea0 drm/nouveau/device: add direct pointers to subdevs from nvkm_device
Will be used in upcoming commits to remove the need for lookup/runtime
type-checking functions when accessing foreign subdevs.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:06 +10:00
Ben Skeggs d351b8569e drm/nouveau/subdev: add direct pointer to nvkm_device
Will be utilised in upcoming commits to remove the need for heuristics
to lookup the device a subdev belongs to.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:06 +10:00
Ben Skeggs 0d5dd3f301 drm/nouveau/lib: various tweaks
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:05 +10:00
Ben Skeggs 205877f915 drm/nouveau/pmu/gk104: implement a hackish workaround for a hw bug
Only a handful of machines have this enabled by default, where it's been
proven to work.  The workaround can be explicitly enabled with a module
option also.

Still waiting on feedback from NVIDIA for a proper idea of exactly what
this fix is doing, and how to implement it properly.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:05 +10:00
Ben Skeggs 2a89359415 drm/nouveau/disp/dp: gm1xx appears to have same dp lane ordering as gm2xx
Fixes 2-lane DP on Quadro K620.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:05 +10:00
Ben Skeggs fe0f5d0880 drm/nouveau/disp/dp: fix some tx_pu mishandling
We only need to mask 0x0f on GM2xx, and want to keep the higher bits on
earlier cards.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:05 +10:00
Ben Skeggs f10956d445 drm/nouveau/bios/dp: use alternate set of drvctl values where necessary
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:05 +10:00
Ben Skeggs 7c11c99b3c drm/nouveau/bios/dcb: accept "maxwell" lane count values for dcb 4.0
We previously assumed that the values "2" and "4" were new in DCB 4.1,
however, there's at least one GM107 DCB 4.0 board (Quadro K620) that
uses the newer values.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:04 +10:00
Ilia Mirkin 895fb8e6f7 drm/nouveau/fb/sddr3: add WR/CWL values seen on a GK208
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:04 +10:00
Hans de Goede 0a363e85cd drm/nouveau/nv46: Change mc subdev oclass from nv44 to nv4c
MSI interrupts appear to not work for nv46 based cards. Change the mc
subdev oclass for these cards from nv44 to nv4c, the nv4c mc code is
identical to the nv44 mc code except that it does not use msi
(it does not define a msi_rearm callback).

BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=90435
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:04 +10:00
Samuel Pitoiset 2df0bf57f8 drm/nouveau/pm/gf100: only use PBFB_BROADCAST.PM_UNK100 for PBFB signals
High level hardware events related to PBFB will monitor all partitions.
While we are at it, fix bitfield for this mux.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:04 +10:00
Samuel Pitoiset 8feece04db drm/nouveau/pm/gf100: remove multiple definitions of GPC_DOM signal 0x0e
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:04 +10:00
Samuel Pitoiset 9b4dc66d47 drm/nouveau/pm/gf100: remove undefined TEX.PM_UNKC8 mux
This mux only exists on GF108+ (except for GF110 one), but since it is
not used by the userspace we can drop it for now.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:04 +10:00
Samuel Pitoiset 7fe882eb90 drm/nouveau/pm: allow zeroed signals to enable sources
Hardware signals index 0x00 are defined for some domains and they have
to be allowed to enable sources like the others.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:03 +10:00
Samuel Pitoiset 5a23936129 drm/nouveau/pm/nv50: TPC[0x3] must be used for PGRAPH muxs on G80
I thought that using TPC[0x0] like for G84:GT215 was sufficient on G80,
but it's actually not the case. According to NVIDIA PerfKit on Windows,
we have to configure PGRAPH related muxs on TPC[0x3] for this chipset.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:03 +10:00
Samuel Pitoiset a4650ed9bd drm/nouveau/pm/nv50: fix wrong addr for ZCULL source on G80:GT215
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:03 +10:00
Ilia Mirkin bacbad17fb drm/nouveau/bios: add opcodes 0x73 and 0x77
No known VBIOSes use these, but they are present in the actual VBIOS
table parsing logic. No harm in adding these too.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:03 +10:00
Alexandre Courbot 970fee29d0 drm/nouveau/platform: recognize GM20B
Allow the platform driver to recognize GM20B.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:02 +10:00
Alexandre Courbot d10ae27130 drm/nouveau/device: recognize GM20B
Recognize GM20B and assign the right engines and subdevs.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:02 +10:00
Alexandre Courbot a032fb9da6 drm/nouveau/gr: add GM20B support
Add support for GM20B's graphics engine, based on GK20A. Note that this
code alone will not allow the engine to initialize on released devices
which require PMU-assisted secure boot.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:02 +10:00
Alexandre Courbot 3326060a17 drm/nouveau/fifo: add GM20B fifo
GM20B has a 512-channels FIFO similar to GK104.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:02 +10:00
Alexandre Courbot c4d0f8f6f8 drm/nouveau/gr/gk20a: use same initialization sequence as nvgpu
GK20A's initialization was based on GK104, but differences exist in the
way the initial context is built and the initialization process itself.

This patch follows the same initialization sequence as nvgpu performs
to avoid bad surprises. Since the register bundles initialization also
differ considerably from GK104, the register packs are now loaded from
firmware files, again similarly to what is done with nvgpu.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:02 +10:00
Alexandre Courbot 8539b37ace drm/nouveau/gr: use NVIDIA-provided external firmwares
NVIDIA will officially start providing GR firmwares through
linux-firmware for GPUs that require it. Change the GR firmware lookup
function to use these files.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:02 +10:00
Samuel Pitoiset 13cffadced drm/nouveau/pm/gk104: add compute signals/sources
These signals and sources have been reverse engineered from CUPTI
(Linux). Graphics signals exposed by PerfKit (Windows only) will be
added later. I need to reverse engineer them and it's a bit painful.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:01 +10:00
Samuel Pitoiset 1914f673ec drm/nouveau/pm/gk104: re-use gf100_pm_ctor()
gk104_pm_ctor() is equal to gf100_pm_ctor().

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:01 +10:00
Samuel Pitoiset 261d678d10 drm/nouveau/pm/nv40: rename pcounter domains to 'pc' instead of 'pm'
This trivial patch makes thing more consistent since hardware signals
names are prefixed by 'pcXX'.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:01 +10:00
Samuel Pitoiset df0b37ee1a drm/nouveau/pm: expose name of domains
This is going to be very useful for GF100+ because each GPC can
have its own domain of counters.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:01 +10:00
Wei Ni 85fa319d8a drm/nouveau/drm/nouveau/clk: fix tstate to pstate calculation
According to the tstate calculation in nvkm_clk_tstate(),
the range of tstate is from -(clk->state_nr - 1) to 0,
it mean the tstate is negative value. But in nvkm_pstate_work(),
it use (clk->state_nr - 1 - clk->tstate) to limit pstate,
it's not correct.
This patch fix it to use (clk->state_nr - 1 + clk->tstate) to
limit pstate.

Signed-off-by: Wei Ni <wni@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:01 +10:00
Samuel Pitoiset d4a312dc90 drm/nouveau/pm: some fixes related to sources
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:01 +10:00
Samuel Pitoiset eb94345a93 drm/nouveau/pm: fix signals/sources for GT200+
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:00 +10:00
Samuel Pitoiset 94a2ef69aa drm/nouveau/pm/gf100: add compute signals/sources
These signals and sources have been reverse engineered from CUPTI
(Linux). Graphics signals exposed by PerfKit (Windows only) will be
added later. I need to reverse engineer them and it's a bit painful.

This commit also adds a new class for GF108 and GF117.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:00 +10:00
Samuel Pitoiset 060f50e3b1 drm/nouveau/pm/gf100: allow to share GPC, HUB and PART domains
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:00 +10:00
Ben Skeggs f21950ea35 drm/nouveau/pm: stack perfdom class under perfmon
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:00 +10:00
Ben Skeggs 2d4b94b95f drm/nouveau/pm: swap perfmon/perfdom code to avoid forward decl in next commit
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:00 +10:00
Samuel Pitoiset 06b7972dc9 drm/nouveau/pm/nv50: add compute and graphics signals/sources
These signals and sources have been reverse engineered from NVIDIA
PerfKit (Windows) and CUPTI (Linux), they will be used to build complex
hardware events from the userspace.

This commit also adds a new class for GT200.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:00 +10:00
Samuel Pitoiset 6137b5a7c2 drm/nouveau/pm: allow the userspace to configure sources
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:00 +10:00
Samuel Pitoiset 0f3804360d drm/nouveau/pm: allow to configure domains instead of simple counters
Configuring counters from the userspace require the kernel to handle some
logic related to performance counters. Basically, it has to find a free
slot to assign a counter, to handle extra counting modes like B4/B6 and it
must return and error when it can't configure a counter.

In my opinion, the kernel should not handle all of that logic but it
should only write the configuration sent by the userspace without
checking anything. In other words, it should overwrite the configuration
even if it's already counting and do not return any errors.

This patch allows the userspace to configure a domain instead of
separate counters. This has the advantage to move all of the logic to
the userspace.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:39:59 +10:00
Samuel Pitoiset 3bfdde178a drm/nouveau/pm: allow the userspace to schedule hardware counters
This adds a new method NVIF_PERFCTR_V0_INIT which starts a batch of
hardware counters for sampling. This will allow the userspace to start
a monitoring session using the INIT method and to stop it with SAMPLE,
for example before and after a frame is rendered.

This commit temporarily breaks nv_perfmon but this is going to be fixed
with the upcoming patch.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:39:59 +10:00
Samuel Pitoiset 6f99c84873 drm/nouveau/pm: implement NVIF_PERFMON_V0_QUERY_SOURCE method
This allows to query the ID, the mask and the user-readable name of
sources for each signal.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:39:59 +10:00
Samuel Pitoiset 50d138d752 drm/nouveau/pm: allow to query the number of sources for a signal
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:39:59 +10:00
Samuel Pitoiset e82661e23c drm/nouveau/pm: add concept of sources
A source (or multiplexer) is a tuple addr+mask+shift which allows to
control a block of signals. The maximum number of sources that a signal
can define is arbitrary limited to 8 and this should be large enough.
This patch allows to define multi-level of sources for a signal.

Each different sources are stored to a global list and will be exposed
to the userspace through the nvif interface in order to avoid conflicts.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:39:59 +10:00
Samuel Pitoiset 40a3b22c92 drm/nouveau/pm: allow to monitor hardware signal index 0x00
This signal index must be always allowed even if it's not clearly
defined in a domain in order to monitor a counter like 0x03020100
because it's the default value of signals.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:39:59 +10:00
Samuel Pitoiset 10a4d2b248 drm/nouveau/pm: use hardware signals indexes instead of user-readable names
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:39:58 +10:00
Samuel Pitoiset e4047599ae drm/nouveau/pm: change signal iter to u16
16 bits is large enough to store the maximum number of signals available
for one domain (i.e. 256).

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:39:58 +10:00
Samuel Pitoiset 3e1b33571a drm/nouveau/pm: allow to query signals by domain
This will allow to configure performance counters with hardware signal
indexes instead of user-readable names in an upcoming patch.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:39:58 +10:00
Samuel Pitoiset 45f0f94db2 drm/nouveau/pm: implement NVIF_PERFMON_V0_QUERY_DOMAIN method
This allows to query the number of available domains, including the
number of hardware counter and the number of signals per domain.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:39:58 +10:00
Samuel Pitoiset 44d9de58ea drm/nouveau/pm: prevent creating a perfctr object when signals are not found
Since a new class has been introduced to query signals, we can now
return an error when the userspace wants to monitor unknown signals.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:39:58 +10:00
Samuel Pitoiset 5a0bc4b5ae drm/nouveau/pm: reorganize the nvif interface
This commit introduces the NVIF_IOCTL_NEW_V0_PERFMON class which will be
used in order to query domains, signals and sources. This separates the
querying and the counting interface.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:39:57 +10:00
Samuel Pitoiset a78ce96f96 drm/nouveau/pm: remove unused nvkm_perfsig_wrap() function
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Martin Peres <martin.peres@free.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:39:57 +10:00
Samuel Pitoiset 0b7515c035 drm/nouveau/pm: remove pmu signals
PDAEMON signals don't have to be exposed by the perfmon engine.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Martin Peres <martin.peres@free.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:39:57 +10:00
Roy Spliet 087cd0db87 drm/nouveau/clk/nv50: Enable user reclocking for NVA0
Tested on a few cards. Probably works quite well for most, given they should
all be GDDR3.

Signed-off-by: Roy Spliet <rspliet@eclipso.eu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:39:57 +10:00
Roy Spliet 852c619b6e drm/nouveau/fb/gddr3: Add a few CL and WR entries observed on GTX260
Signed-off-by: Roy Spliet <rspliet@eclipso.eu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:39:57 +10:00
Roy Spliet 82a74fd293 drm/nouveau/fb/ramnv50: GDDR3 script for NVA0
This looks surprisingly similar to scripts on earlier cards as well
but they don't seem to work just yet. That... and I don't have any, which
makes it a tough job to reverse engineer.

Signed-off-by: Roy Spliet <rspliet@eclipso.eu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:39:56 +10:00
Roy Spliet c25bf7b615 drm/nouveau/bios/ramcfg: Separate out RON pull value
Signed-off-by: Roy Spliet <rspliet@eclipso.eu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:39:56 +10:00
Roy Spliet 2813e19f13 drm/nouveau/bios/rammap: Parse perf mode as if it's a rammap entry
Some of the bits in there are similar to the bits in the gt215 rammap.

Signed-off-by: Roy Spliet <rspliet@eclipso.eu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:39:56 +10:00
Roy Spliet 35fe024acf drm/nouveau/fb/ramnv50: Ressurect timing code, use proper timing/rammap handlers
Might need some generalisation to < GT200. For those: use at your own risk!

Signed-off-by: Roy Spliet <rspliet@eclipso.eu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:39:56 +10:00
Roy Spliet 3b582bed90 drm/nouveau/fb/ramgt215: No need to cuss like that
Signed-off-by: Roy Spliet <rspliet@eclipso.eu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:39:56 +10:00
Roy Spliet d4cc5f0c2a drm/nouveau/fb/ramnv50: Make 0x100da0 per-partition
Like on GT215

Signed-off-by: Roy Spliet <rspliet@eclipso.eu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:39:56 +10:00
Roy Spliet 7164f4c5b2 drm/nouveau/bios/rammap: Pull DLLoff bit out of version 0x10 struct
In preparation of NV50 reclocking, where there is no version

Signed-off-by: Roy Spliet <rspliet@eclipso.eu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:39:55 +10:00
Ben Skeggs 4a68ccc8e4 remove unnecessary include
This was merged with core/device.h in an earlier commit, but somehow
never got removed.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:39:55 +10:00
Dave Airlie d7b273685f Merge branch 'drm-dwhdmi-devel' of git://ftp.arm.linux.org.uk/~rmk/linux-arm into drm-next
Here are some development updates for the Synopsis Designware HDMI driver,
which clean up some of the code, and start preparing to add audio support
to the driver.  This series of patches are based on a couple of dependent
commits from the ALSA tree.

Briefly, the updates are:
- move comments which should have moved with the phy values to the IMX
  part of the driver.
- clean up the phy configuration: to all lookups before starting to
  program the phy.
- clean up the HDMI clock regenerator code
- use the drm_hdmi_avi_infoframe_from_display_mode() helper which allows
  the code to be subsequently simplified
- remove the unused 'regmap' pointer in struct dw_hdmi
- use the bridge drm device rather than the connector (we're the bridge
  code)
- remove private hsync/vsync/interlaced flags, getting them from the
  DRM mode structure instead.
- implement interface functions to support audio - setting the audio
  sample rate, and enabling the audio clocks.
- removal of broken pixel repetition support
- cleanup DVI vs HDMI sink handling
- enable audio only if connected device supports audio
- avoid double-enabling bridge in the sink path (once in mode_set, and
  again in commit)
- rename mis-named dw_hdmi_phy_enable_power()
- fix bridge enable/disable handing, so a plug-in event doesn't
  reconfigure the bridge if DRM has disabled the output
- fix from Vladimir Zapolskiy for the I2CM_ADDRESS macro name

These are primerily preparitory patches for the AHB audio driver and
the I2S audio driver (from Rockchip) for this IP.

* 'drm-dwhdmi-devel' of git://ftp.arm.linux.org.uk/~rmk/linux-arm:
  drm: bridge/dw_hdmi: fix register I2CM_ADDRESS register name
  drm: bridge/dw_hdmi: fix phy enable/disable handling
  drm: bridge/dw_hdmi: rename dw_hdmi_phy_enable_power()
  drm: bridge/dw_hdmi: avoid enabling interface in mode_set
  drm: bridge/dw_hdmi: enable audio only if sink supports audio
  drm: bridge/dw_hdmi: clean up HDMI vs DVI mode handling
  drm: bridge/dw_hdmi: don't support any pixel doubled modes
  drm: bridge/dw_hdmi: remove pixel repetition setting for all VICs
  drm: bridge/dw_hdmi: introduce interfaces to enable and disable audio
  drm: bridge/dw_hdmi: introduce interface to setting sample rate
  drm: bridge/dw_hdmi: remove mhsyncpolarity/mvsyncpolarity/minterlaced
  drm: bridge/dw_hdmi: use our own drm_device
  drm: bridge/dw_hdmi: remove unused 'regmap' struct member
  drm: bridge/dw_hdmi: simplify hdmi_config_AVI() a little
  drm: bridge/dw_hdmi: use drm_hdmi_avi_infoframe_from_display_mode()
  drm: bridge/dw_hdmi: clean up hdmi_set_clk_regenerator()
  drm: bridge/dw_hdmi: clean up phy configuration
  drm: imx/dw_hdmi: move phy comments
  drm/edid: add function to help find SADs
2015-08-27 13:01:57 +10:00
Dave Airlie 31607793ee Merge tag 'vmwgfx-next-15-08-21' of git://people.freedesktop.org/~thomash/linux into drm-next
Pull request of 15-08-21

The third pull request for 4.3. Contains two fixes for regressions introduced
with previous pull requests.

* tag 'vmwgfx-next-15-08-21' of git://people.freedesktop.org/~thomash/linux:
  drm/vmwgfx: Remove duplicate ttm_bo_device_release
  drm/vmwgfx: Fix a circular locking dependency in the fbdev code
2015-08-27 13:01:23 +10:00
Dave Airlie 40b2dffbcc Merge branch 'drm-next-4.3' of git://people.freedesktop.org/~agd5f/linux into drm-next
- DP fixes for radeon and amdgpu
- IH ring fix for tonga and fiji
- Lots of GPU scheduler fixes
- Misc additional fixes

* 'drm-next-4.3' of git://people.freedesktop.org/~agd5f/linux: (42 commits)
  drm/amdgpu: fix wait queue handling in the scheduler
  drm/amdgpu: remove extra parameters from scheduler callbacks
  drm/amdgpu: wake up scheduler only when neccessary
  drm/amdgpu: remove entity idle timeout v2
  drm/amdgpu: fix postclose order
  drm/amdgpu: use IB for copy buffer of eviction
  drm/amdgpu: adjust the judgement of removing fence callback
  drm/amdgpu: fix no sync_wait in copy_buffer
  drm/amdgpu: fix last_vm_update fence is not effetive for sched fence
  drm/amdgpu: add priv data to sched
  drm/amdgpu: add owner for sched fence
  drm/amdgpu: remove entity reference from sched fence
  drm/amdgpu: fix and cleanup amd_sched_entity_push_job
  drm/amdgpu: remove amdgpu_bo_list_clone
  drm/amdgpu: remove the context from amdgpu_job
  drm/amdgpu: remove unused parameters to amd_sched_create
  drm/amdgpu: remove sched_lock
  drm/amdgpu: remove prepare_job callback
  drm/amdgpu: cleanup a scheduler function name
  drm/amdgpu: reorder scheduler functions
  ...
2015-08-27 13:00:28 +10:00
Christian König c2b6bd7e91 drm/amdgpu: fix wait queue handling in the scheduler
Freeing up a queue after signalling it isn't race free.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
2015-08-26 17:55:07 -04:00
Christian König bd755d0870 drm/amdgpu: remove extra parameters from scheduler callbacks
Signed-off-by: Christian König <christian.koenig@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
2015-08-26 17:54:10 -04:00
Christian König 88079006dc drm/amdgpu: wake up scheduler only when neccessary
Signed-off-by: Christian König <christian.koenig@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
2015-08-26 17:53:23 -04:00
Christian König 062c7fb3eb drm/amdgpu: remove entity idle timeout v2
Removing the entity from scheduling can deadlock the whole system.
Wait forever till the remaining IBs are scheduled.

v2: fix comment as well

Signed-off-by: Christian König <christian.koenig@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com> (v1)
2015-08-26 17:52:18 -04:00
Christian König 02537d6362 drm/amdgpu: fix postclose order
The context needs to finish before everything else.

Signed-off-by: Christian König <christian.koenig@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
2015-08-26 17:51:37 -04:00
Chunming Zhou c7ae72c01b drm/amdgpu: use IB for copy buffer of eviction
This aids handling buffers moves with the scheduler.

Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Christian K?nig <christian.koenig@amd.com>
2015-08-26 17:50:42 -04:00
Junwei Zhang 113cd9dacb drm/amdgpu: adjust the judgement of removing fence callback
The fence in the array may be skipped if wait_all is false,
thus the related callback is not initialized with list head.
So removing this kind callback will cause NULL pointer reference.

Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com>
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
2015-08-26 17:50:04 -04:00
Xiong Zhang 26951caf55 drm/i915/skl: enable DDI-E hotplug
v2: fix one error found by checkpath.pl
v3: Add one ignored break for switch-case. DDI-E hotplug
    function doesn't work after updating drm-intel tree,
    I checked the code and found this missing which isn't
    the root cause for broke DDI-E hp.  The broken
    DDI-E hp function is fixed by "Adding DDI_E power
    well domain".

Signed-off-by: Xiong Zhang <xiong.y.zhang@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Tested-by: Timo Aaltonen <timo.aaltonen@canonical.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2015-08-26 10:24:25 +03:00
Thierry Reding 8e9d597a37 drm/i915: Fix build warning on 32-bit
The gtt.stolen_size field is of type size_t, and so should be printed
using %zu to avoid build warnings on either 32-bit and 64-bit builds.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2015-08-26 10:15:36 +03:00
Rodrigo Vivi 5f8b253147 drm/i915/skl: Update DDI buffer translation programming.
SKL-Y can now use the same programming for all VccIO values after an
adjustment to I_boost.  SKL-U DP table adjustments.

1. Remove SKL Y 0.95V from "SKL H and S" columns in all tables. The
   other SKL Y column removes the "0.85V VccIO" so it now applies to all
   voltages.

2. DP table changes SKL U 400mV+0db dword 0 value from 2016h to 201Bh.

3. DP table changes SKL U 600mv+0db dword 0 value from 2016h to 201Bh.

4. DP table increases I_boost to level 3 for SKL Y 400mv+9.5db.

v2: Fix compilation warnings as pointed by Paulo.

Reference: Graphics Spec Change r97962
Cc: Arthur Runyan <arthur.j.runyan@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
[Jani: reformatted commit message for shorter lines.]
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2015-08-26 09:55:48 +03:00
Mark Yao 4c156c21c7 drm/rockchip: vop: support plane scale
Win_full support 1/8 to 8 scale down/up engine, support
all format scale.

Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2015-08-26 14:16:26 +08:00
Mark Yao 77faa1619a drm/rockchip: vop: restore vop registers when resume
The registers will be reset to default values when whole
power domain off, so restore registers from regsbak.

Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2015-08-26 14:16:26 +08:00
Mark Yao c1998f0858 drm/rockchip: vop: Default enable win2/3 area0 bit
Win2/3 support multiple area function, but we haven't found
a suitable way to use it yet, so let's just use them as other windows
with only area 0 enabled.

Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2015-08-26 14:16:26 +08:00
Mark Yao 84c7f8ca43 drm/rockchip: vop: Add yuv plane support
vop support yuv with NV12, NV16 and NV24, only 2 plane yuv.

Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2015-08-26 14:16:26 +08:00
Mark Yao acf8c3e0a9 drm/rockchip: vop: Fix window dest start point
Dest start point use crtc_x/y is wrong, crtc_x/y is not equal
to dest.x1/y1 at plane scale.

Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2015-08-26 14:16:26 +08:00
Mark Yao f1c79abef5 drm/rockchip: vop: Fix virtual stride calculation
vir_stride need number words of the virtual width, and fb->pitches
save bytes_per_pixel, so just div 4 switch to stride.

Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2015-08-26 14:16:25 +08:00
Chunming Zhou 9066b0c318 drm/amdgpu: fix no sync_wait in copy_buffer
when eviction is happening, if don't handle
dependency, then the fence could be dead off.

Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
Reviewed-by: Christian K?nig <christian.koenig@amd.com>
2015-08-25 10:53:48 -04:00
Chunming Zhou 3c62338c26 drm/amdgpu: fix last_vm_update fence is not effetive for sched fence
Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Christian K?nig <christian.koenig@amd.com>
2015-08-25 10:53:05 -04:00
Chunming Zhou f38fdfddfa drm/amdgpu: add priv data to sched
Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Christian K?nig <christian.koenig@amd.com>
2015-08-25 10:52:18 -04:00
Chunming Zhou 84f76ea6b0 drm/amdgpu: add owner for sched fence
Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Christian K?nig <christian.koenig@amd.com>
2015-08-25 10:51:32 -04:00
Christian König c14692f0a7 drm/amdgpu: remove entity reference from sched fence
Entity don't live as long as scheduler fences.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
2015-08-25 10:50:42 -04:00
Christian König 6c859274f3 drm/amdgpu: fix and cleanup amd_sched_entity_push_job
Calling schedule() is probably the worse things we can do.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
2015-08-25 10:49:57 -04:00
Christian König 87e0a87dab drm/amdgpu: remove amdgpu_bo_list_clone
Not used any more.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
2015-08-25 10:49:12 -04:00
Christian König 3a185a33a2 drm/amdgpu: remove the context from amdgpu_job
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
2015-08-25 10:48:27 -04:00