Ben Skeggs
9d6c2fe191
drm/nouveau/kms/nv50-: allow specification of valid heads for a window
...
This will be required to support Volta, where window ID != head.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2018-05-18 15:01:28 +10:00
Ben Skeggs
ccd27db8c7
drm/nouveau/kms/nv50-: split base implementation by hardware class
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2018-05-18 15:01:28 +10:00
Ben Skeggs
09e1b78aab
drm/nouveau/kms/nv50-: split core implementation by hardware class
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2018-05-18 15:01:28 +10:00
Ben Skeggs
1590700d94
drm/nouveau/kms/nv50-: split each resource type into their own source files
...
There should be no code changes here, just shuffling stuff around.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2018-05-18 15:01:28 +10:00
Ben Skeggs
0a3687716b
drm/nouveau/kms/nv50: abstract OR interfaces so the code can be split
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2018-05-18 15:01:28 +10:00
Ben Skeggs
2ca7fb5c1c
drm/nouveau/kms/nv50: handle SetControlOutputResource from head
...
Removes duplicated code from OR-specific functions.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2018-05-18 15:01:28 +10:00
Ben Skeggs
10ffe0fad5
drm/nouveau/kms/nv50-: abstract head interfaces so the code can be split
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2018-05-18 15:01:28 +10:00
Ben Skeggs
9ca6f1ebba
drm/nouveau/kms/nv50: modify core allocation so the code can be split
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2018-05-18 15:01:28 +10:00
Ben Skeggs
d7c6e97a32
drm/nouveau/kms/nv50-: modify base allocation so the code can be split
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2018-05-18 15:01:28 +10:00
Ben Skeggs
b97ace4072
drm/nouveau/kms/nv50-: modify cursor allocation so the code can be split
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2018-05-18 15:01:27 +10:00
Ben Skeggs
a97c530eb9
drm/nouveau/kms/nv50-: modify overlay allocation so the code can be split
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2018-05-18 15:01:27 +10:00
Ben Skeggs
5bca1621c0
drm/nouveau/kms/nv50-: move fb ctxdma tracking into windows
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2018-05-18 15:01:27 +10:00
Ben Skeggs
62b290fc7b
drm/nouveau/kms/nv50-: fix i2c-over-aux on anx9805
...
We don't support address-only transactions there.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2018-05-18 15:01:27 +10:00
Ben Skeggs
30ed49b55b
drm/nouveau/kms/nv50-: move code underneath dispnv50/
...
The code is about to be split up, and this matches dispnv04.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2018-05-18 15:01:26 +10:00
Ben Skeggs
0d4a2c5767
drm/nouveau/kms: move display class instantiation to library
...
This function is useful outside of DRM code.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2018-05-18 15:01:26 +10:00
Ben Skeggs
512fa0b8a3
drm/nouveau/drm/nv50-: remove allocation of sw class
...
Hasn't been required for a long time.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2018-05-18 15:01:26 +10:00
Ben Skeggs
92b4eaaf9a
drm/nouveau: no need to create ctxdma for push buffers on fermi and up
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2018-05-18 15:01:26 +10:00
Ben Skeggs
11e451e740
drm/nouveau: remove fence wait code from deferred client work handler
...
Fences attached to deferred client work items now originate from channels
belonging to the client, meaning we can be certain they've been signalled
before we destroy a client.
This closes a race that could happen if the dma_fence_wait_timeout() call
didn't succeed. When the fence was later signalled, a use-after-free was
possible.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2018-05-18 15:01:26 +10:00
Ben Skeggs
470db8b781
drm/nouveau/gem: tie deferred unmapping of buffers to VMA fence completion
...
As VMAs are per-client, unlike buffers, this allows us to avoid referencing
foreign fences (those that belong to another client/driver) from the client
deferred work handler, and prevent some not-fun race conditions that can be
triggered when a fence stalls.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2018-05-18 15:01:26 +10:00
Ben Skeggs
0db912af8f
drm/nouveau/gem: attach fences to VMAs to track GPU usage
...
An upcoming patch will use these to fix issues related to the deferred
unmapping of GEM objects.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2018-05-18 15:01:26 +10:00
Ben Skeggs
19ca10d82e
drm/nouveau/gem: lookup VMAs for buffers referenced by pushbuf ioctl
...
We previously only did this for push buffers, but an upcoming patch will
need to attach fences to all VMAs to resolve another issue.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2018-05-18 15:01:26 +10:00
Ben Skeggs
4b2c71edf0
drm/nouveau/gr/gp102-: setup stencil zbc
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2018-05-18 15:01:26 +10:00
Ben Skeggs
e9d03335f6
drm/nouveau/gr/gp100-: use correct registers for zbc colour/depth setup
...
These were missed the first time around due to the driver version I traced
using the older registers still.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2018-05-18 15:01:26 +10:00
Ben Skeggs
7a058a900c
drm/nouveau/gr/gp100-: fix attrib cb setup
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2018-05-18 15:01:26 +10:00
Ben Skeggs
17f2d4df32
drm/nouveau/gr/gp100-: fix pagepool setup
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2018-05-18 15:01:26 +10:00
Ben Skeggs
191e323278
drm/nouveau/gr/gf100-gm10x: update register lists
...
There are differences on GM200 and newer too, but we can't fix them there
as they come from firmware packages.
A request has been made to NVIDIA to release updated firmware.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2018-05-18 15:01:26 +10:00
Ben Skeggs
6f0233329b
drm/nouveau/gr/gf100-: swap bundle and pagepool
...
Makes it easier to diff against RM traces.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2018-05-18 15:01:26 +10:00
Ben Skeggs
068cae743c
drm/nouveau/gr/gf100-: calculate and use sm mapping table
...
There's a number of places that require this data, so let's separate out
the calculations to ensure they remain consistent.
This is incorrect for GM200 and newer, but will produce the same results
as we did before.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2018-05-18 15:01:26 +10:00
Ben Skeggs
d00ffc0c40
drm/nouveau/gr/gf100-: port zcull tile mapping calculations from NVGPU
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2018-05-18 15:01:26 +10:00
Ben Skeggs
5f6474a4e6
drm/nouveau/gr/gf100-: port tile mapping calculations from NVGPU
...
There's also a couple of hardcoded tables for a couple of very specific
configurations that NVGPU's algorithm didn't work for.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2018-05-18 15:01:26 +10:00
Ben Skeggs
5c05a58985
drm/nouveau/gr/gf100-: virtualise trap_mp
...
Required to support Volta.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2018-05-18 15:01:25 +10:00
Ben Skeggs
74b6068bd6
drm/nouveau/gr/gf100-: add missing reset sequence before golden context init
...
RM and NVGPU both have a variant of this, we probably should too.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2018-05-18 15:01:25 +10:00
Ben Skeggs
201ed6f651
drm/nouveau/gr/gf100-: delete duplicated grctx init code
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2018-05-18 15:01:25 +10:00
Ben Skeggs
a5537f980e
drm/nouveau/gr/gf100-: update r408840 where required
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2018-05-18 15:01:25 +10:00
Ben Skeggs
8d56fc48d3
drm/nouveau/gr/gf100-: update 419a3c where required
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2018-05-18 15:01:25 +10:00
Ben Skeggs
c2592adea7
drm/nouveau/gr/gf100-: virtualise r418e94
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2018-05-18 15:01:25 +10:00
Ben Skeggs
18d17221dd
drm/nouveau/gr/gf100-: virtualise r419e00
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2018-05-18 15:01:25 +10:00
Ben Skeggs
ad45a92b9a
drm/nouveau/gr/gf100-: update 419eb0 where required
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2018-05-18 15:01:24 +10:00
Ben Skeggs
5b54b5b925
drm/nouveau/gr/gf100-: note missing 418800 modifications
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2018-05-18 15:01:24 +10:00
Ben Skeggs
99a3c67e84
drm/nouveau/gr/gf100-gf119: update 419cb8 where required
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2018-05-18 15:01:24 +10:00
Ben Skeggs
0e5a5e86f3
drm/nouveau/gr/gf100-: support firmware-provided bundle/method everywhere
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2018-05-18 15:01:24 +10:00
Ben Skeggs
fc36076441
drm/nouveau/gr/gf100-: virtualise tpc_mask + apply fixes from traces
...
We weren't placing higher TPC IDs in the right place on some configurations.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2018-05-18 15:01:24 +10:00
Ben Skeggs
aa5e38dc9f
drm/nouveau/gr/gf100-: virtualise r419f78 + apply fixes from traces
...
Removed from GK110[B]/GK208 as RM traces show it not being touched.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2018-05-18 15:01:24 +10:00
Ben Skeggs
60c0264a66
drm/nouveau/gr/gf100-: virtualise gpc_tpc_nr
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2018-05-18 15:01:24 +10:00
Ben Skeggs
e7163b1922
drm/nouveau/gr/gf100-: virtualise r406500
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2018-05-18 15:01:24 +10:00
Ben Skeggs
60770fa28b
drm/nouveau/gr/gf100-: virtualise dist_skip_table + improve algorithm
...
The algorithm for GM200 and newer matches RM for all the boards I have, but
I don't have enough data to try and figure something out for earlier boards,
so these will still write zeroes to the table as we did before.
The code in NVGPU isn't helpful here, it appears to handle specific cases.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2018-05-18 15:01:24 +10:00
Ben Skeggs
c4a2b6385d
drm/nouveau/gr/gf100-gf119: modify max_ways_evict where required
...
I don't think this is done after Fermi, NVGPU used to do it but removed
the code, and I've not seen RM traces touching it either.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2018-05-18 15:01:24 +10:00
Ben Skeggs
43952c6f43
drm/nouveau/gr/gf100-: virtualise alpha_beta_tables + improve algorithms
...
I haven't yet been able to find a fully programatic way of calculating the
same mapping as NVIDIA for GF100-GF119, so the algorithm partially depends
on data tables for specific configurations.
I couldn't find traces for every possibility, so the algorithm will switch
to a mapping similar to what GK104-GM10x use if it encounters one. We did
the wrong thing before anyway, so shouldn't matter too much.
The algorithm used in the GK104 implementation was ported from NVGPU.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2018-05-18 15:01:24 +10:00
Ben Skeggs
ff209c235d
drm/nouveau/gr/gf100-: virtualise rop_mapping
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2018-05-18 15:01:24 +10:00
Ben Skeggs
9d8a80df73
drm/nouveau/gr/gf100-: virtualise r4060a8 + apply fixes from traces
...
Also fixes some GPUs where we write too many registers.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2018-05-18 15:01:24 +10:00