Commit Graph

22630 Commits

Author SHA1 Message Date
Ben Skeggs 2a9f847f5d drm/nouveau/device: convert user class to new-style nvkm_object
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:39 +10:00
Ben Skeggs 24bd0930be drm/nouveau/client: convert to new-style nvkm_object
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:39 +10:00
Ben Skeggs 6157091177 drm/nouveau/sw: remove dependence on namedb/engctx lookup
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:39 +10:00
Ben Skeggs 590801c1a3 drm/nouveau/mpeg: remove dependence on namedb/engctx lookup
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:39 +10:00
Ben Skeggs a65955e19e drm/nouveau/gr: remove dependence on namedb/engctx lookup
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:38 +10:00
Ben Skeggs 6ca307b0c9 drm/nouveau/fifo: remove dependence on namedb/engctx lookup
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:38 +10:00
Ben Skeggs 35acf3d72c drm/nouveau/cipher: remove dependence on namedb/engctx lookup
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:38 +10:00
Ben Skeggs a83d8872fc drm/nouveau/falcon: remove dependence on namedb/engctx lookup
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:38 +10:00
Ben Skeggs 344c2d429d drm/nouveau/fb: remove dependence on namedb/engctx lookup
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:38 +10:00
Ben Skeggs 898a2b3213 drm/nouveau/sw: turn flip completion into an event
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:38 +10:00
Ben Skeggs cd459e7776 drm/nouveau/sw/nv04: replace direct context access with GetRef method
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:37 +10:00
Ben Skeggs 1d2a1e5386 drm/nouveau/ramht: remove dependence on namedb
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:37 +10:00
Ben Skeggs f027f49166 drm/nouveau/gpuobj: separate allocation from nvkm_object
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:37 +10:00
Ben Skeggs 227c95d90a drm/nouveau/gr: directly use instmem where currently possible
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:37 +10:00
Ben Skeggs 358ce601ae drm/nouveau/fifo: directly use instmem for runlists and polling areas
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:37 +10:00
Ben Skeggs faf468981e drm/nouveau/xtensa: directly use instmem for ucode image
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:37 +10:00
Ben Skeggs 406ca8c714 drm/nouveau/falcon: directly use instmem for ucode image
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:36 +10:00
Ben Skeggs 5b1ab0c2c7 drm/nouveau/imem/nv04-nv40: directly use instmem for vbios/ramfc/ramro
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:36 +10:00
Ben Skeggs adb53d2773 drm/nouveau/bar/gf100: directly use instmem for channel descriptors
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:36 +10:00
Ben Skeggs d0659d3277 drm/nouveau/mmu: directly use instmem for page tables
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:36 +10:00
Ben Skeggs d8e83994aa drm/nouveau/imem: improve management of instance memory
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:36 +10:00
Ben Skeggs 1de68568d6 drm/nouveau/mmu: protect each vm with its own mutex
An upcoming commit requires being able to modify the PRAMIN BAR page
tables while already holding the MMU subdev mutex.

To solve this issue, each VM has been given its own mutex.  As a nice
side-effect, this also allows separate VMs to be updated concurrently.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:35 +10:00
Ben Skeggs 524bdbf202 drm/nouveau/core: prepare for new-style objects
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:35 +10:00
Ben Skeggs 6cf813fb26 drm/nouveau/device: prepare for new-style subdevs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:35 +10:00
Ben Skeggs 7974dd1bdb drm/nouveau/device: separate construction of pci/tegra devices
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:34 +10:00
Ben Skeggs 168c2e213d drm/nouveau/engine: implement support for new-style nvkm_engine
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:34 +10:00
Ben Skeggs f0290215c4 drm/nouveau/subdev: implement support for new-style nvkm_subdev
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:34 +10:00
Ben Skeggs cbea21e2ab drm/nouveau/object: implement support for new-style nvkm_object
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:34 +10:00
Ben Skeggs 89c651e221 drm/nouveau/engine: rename some functions to avoid upcoming conflicts
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:34 +10:00
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