Ben Skeggs
56d06fa29e
drm/nouveau/core: remove pmc_enable argument from subdev ctor
...
These are now specified directly in the MC subdev.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-05-20 14:43:04 +10:00
Ben Skeggs
6defde5ab3
drm/nouveau/mc: add helper function to handle device reset
...
This will be later extended to handle PTOP-specified reset masks as well
as the hardcoded ones.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-05-20 14:43:04 +10:00
Ben Skeggs
eaebfcc34e
drm/nouveau/core: add top plumbing
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-05-20 14:43:04 +10:00
Ben Skeggs
3545b42532
drm/nouveau/core: add nvdec plumbing
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-03-14 10:13:44 +10:00
Ben Skeggs
294af04b16
drm/nouveau/core: add nvenc plumbing
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-03-14 10:13:44 +10:00
Ilia Mirkin
78a121d82d
drm/nouveau/core: use vzalloc for allocating ramht
...
Most calls to nvkm_ramht_new use 0x8000 as the size. This results in a
fairly sizeable chunk of memory to be allocated, which may not be
available with kzalloc. Since this is done fairly rarely (once per
channel), use vzalloc instead.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-03-14 10:13:34 +10:00
Martin Peres
dc06e366fe
drm/nouveau/subdev/iccsense: add new subdev for power sensors
...
Signed-off-by: Karol Herbst <nouveau@karolherbst.de>
Reviewed-by: Martin Peres <martin.peres@free.fr>
2016-03-14 10:13:24 +10:00
Alexandre Courbot
7d12388a1f
drm/nouveau/core: add support for secure boot
...
On GM200 and later GPUs, firmware for some essential falcons (notably
GR ones) must be authenticated by a NVIDIA-produced signature and
loaded by a high-secure falcon in order to be able to access privileged
registers, in a process known as Secure Boot.
Secure Boot requires building a binary blob containing the firmwares
and signatures of the falcons to be loaded. This blob is then given to
a high-secure falcon running a signed loader firmware that copies the
blob into a write-protected region, checks that the signatures are
valid, and finally loads the verified firmware into the managed falcons
and switches them to privileged mode.
This patch adds infrastructure code to support this process on chips
that require it.
v2:
- The IRQ mask of the PMU falcon was left - replace it with the proper
irq_mask variable.
- The falcon reset procedure expecting a falcon in an initialized state,
which was accidentally provided by the PMU subdev. Make sure that
secboot can manage the falcon on its own.
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-03-14 10:13:22 +10:00
Alexandre Courbot
5d2083d2f9
drm/nouveau/core: add gpuobj memcpy helper functions
...
Add memcpy functions to copy a buffer to a gpuobj and vice-versa. This
will be used by the secure boot code.
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-03-14 10:13:19 +10:00
Alexandre Courbot
046fdb2a59
drm/nouveau/core: add firmware handling functions
...
Add two functions nvkm_firmware_get() and nvkm_firmware_put() to load a
firmware file and free its resources, respectively. Since firmware files
are becoming a necessity for new GPUs, and their location has been
standardized to nvidia/chip/, this will prevent duplicate and
error-prone name-generation code.
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-03-14 10:11:06 +10:00
Ben Skeggs
f01c4e682c
drm/nouveau/nvif: modify nvif_unvers/nvif_unpack macros to be more obvious
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-01-11 11:17:40 +10:00
Ben Skeggs
13db6d6ea7
drm/nouveau/nvif: split out client interface definitions
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-01-11 11:17:40 +10:00
Ben Skeggs
340b0e7c50
drm/nouveau/pci: merge agp handling from nouveau drm
...
This commit reinstates the pre-DEVINIT AGP fiddling that was broken in
an earlier commit.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:49 +10:00
Ben Skeggs
0a34fb3149
drm/nouveau/pci: new subdev
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:48 +10:00
Ben Skeggs
fbd58ebda9
drm/nouveau/object: merge with handle
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:47 +10:00
Ben Skeggs
68f3f702b6
drm/nouveau/core: remove the remainder of the previous style
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:47 +10:00
Ben Skeggs
c85ee6ca79
drm/nouveau/gr: convert to new-style nvkm_engine
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:47 +10:00
Ben Skeggs
13de7f4629
drm/nouveau/fifo: convert to new-style nvkm_engine
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:46 +10:00
Ben Skeggs
b7a2bc1886
drm/nouveau/imem: convert to new-style nvkm_subdev
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:44 +10:00
Ben Skeggs
ef8bc5760b
drm/nouveau/core: kill some (now) dead code
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:42 +10:00
Ben Skeggs
27f3d6cf80
drm/nouveau/gr: convert user classes to new-style nvkm_object
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:41 +10:00
Ben Skeggs
8f0649b5c6
drm/nouveau/fifo: convert user classes to new-style nvkm_object
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:40 +10:00
Ben Skeggs
0ce41e3c66
drm/nouveau/disp: convert user classes to new-style nvkm_object
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:40 +10:00
Ben Skeggs
0710cc3148
drm/nouveau/dma: convert user classes to new-style nvkm_object
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28 12:40:40 +10:00
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
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
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
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
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
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
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
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
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
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
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