summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* drm/nouveau: no need to create ctxdma for push buffers on fermi and upBen Skeggs2018-05-181-2/+5
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: remove fence wait code from deferred client work handlerBen Skeggs2018-05-181-16/+14
| | | | | | | | | | | | 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>
* drm/nouveau/gem: tie deferred unmapping of buffers to VMA fence completionBen Skeggs2018-05-181-15/+2
| | | | | | | | | 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>
* drm/nouveau/gem: attach fences to VMAs to track GPU usageBen Skeggs2018-05-183-1/+16
| | | | | | | 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>
* drm/nouveau/gem: lookup VMAs for buffers referenced by pushbuf ioctlBen Skeggs2018-05-183-15/+19
| | | | | | | 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>
* drm/nouveau/gr/gp102-: setup stencil zbcBen Skeggs2018-05-1814-16/+162
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/gr/gp100-: use correct registers for zbc colour/depth setupBen Skeggs2018-05-1820-15/+88
| | | | | | | 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>
* drm/nouveau/gr/gp100-: fix attrib cb setupBen Skeggs2018-05-187-17/+32
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/gr/gp100-: fix pagepool setupBen Skeggs2018-05-181-1/+1
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/gr/gf100-gm10x: update register listsBen Skeggs2018-05-1819-36/+96
| | | | | | | | | 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>
* drm/nouveau/gr/gf100-: swap bundle and pagepoolBen Skeggs2018-05-181-1/+1
| | | | | | Makes it easier to diff against RM traces. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/gr/gf100-: calculate and use sm mapping tableBen Skeggs2018-05-1823-56/+79
| | | | | | | | | | 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>
* drm/nouveau/gr/gf100-: port zcull tile mapping calculations from NVGPUBen Skeggs2018-05-182-34/+34
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/gr/gf100-: port tile mapping calculations from NVGPUBen Skeggs2018-05-1822-77/+153
| | | | | | | 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>
* drm/nouveau/gr/gf100-: virtualise trap_mpBen Skeggs2018-05-1820-2/+23
| | | | | | Required to support Volta. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/gr/gf100-: add missing reset sequence before golden context initBen Skeggs2018-05-181-0/+20
| | | | | | RM and NVGPU both have a variant of this, we probably should too. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/gr/gf100-: delete duplicated grctx init codeBen Skeggs2018-05-1812-152/+11
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/gr/gf100-: update r408840 where requiredBen Skeggs2018-05-188-2/+127
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/gr/gf100-: update 419a3c where requiredBen Skeggs2018-05-186-0/+15
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/gr/gf100-: virtualise r418e94Ben Skeggs2018-05-183-2/+13
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/gr/gf100-: virtualise r419e00Ben Skeggs2018-05-183-4/+15
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/gr/gf100-: update 419eb0 where requiredBen Skeggs2018-05-184-0/+14
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/gr/gf100-: note missing 418800 modificationsBen Skeggs2018-05-186-2/+24
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/gr/gf100-gf119: update 419cb8 where requiredBen Skeggs2018-05-187-0/+19
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/gr/gf100-: support firmware-provided bundle/method everywhereBen Skeggs2018-05-181-2/+10
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/gr/gf100-: virtualise tpc_mask + apply fixes from tracesBen Skeggs2018-05-1813-30/+47
| | | | | | We weren't placing higher TPC IDs in the right place on some configurations. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/gr/gf100-: virtualise r419f78 + apply fixes from tracesBen Skeggs2018-05-183-2/+11
| | | | | | Removed from GK110[B]/GK208 as RM traces show it not being touched. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/gr/gf100-: virtualise gpc_tpc_nrBen Skeggs2018-05-1811-7/+20
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/gr/gf100-: virtualise r406500Ben Skeggs2018-05-187-6/+21
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/gr/gf100-: virtualise dist_skip_table + improve algorithmBen Skeggs2018-05-1814-16/+51
| | | | | | | | | | 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>
* drm/nouveau/gr/gf100-gf119: modify max_ways_evict where requiredBen Skeggs2018-05-187-0/+19
| | | | | | | 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>
* drm/nouveau/gr/gf100-: virtualise alpha_beta_tables + improve algorithmsBen Skeggs2018-05-1815-35/+201
| | | | | | | | | | | | | | 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>
* drm/nouveau/gr/gf100-: virtualise rop_mappingBen Skeggs2018-05-1818-70/+82
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/gr/gf100-: virtualise r4060a8 + apply fixes from tracesBen Skeggs2018-05-187-5/+15
| | | | | | Also fixes some GPUs where we write too many registers. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/gr/gf100-: virtualise tpc_per_gpcBen Skeggs2018-05-189-37/+10
| | | | | | | GM20B now also shares the same code, as NVGPU shows it doesn't need special treatment. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/gr/gf100-: virtualise sm_id/tpc_nrBen Skeggs2018-05-1820-67/+85
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/gr/gf100-: virtualise patch_ltc, noting missing initBen Skeggs2018-05-186-0/+20
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/gr/gf100-: support firmware-provided sw_ctx everywhereBen Skeggs2018-05-181-5/+9
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/gr/gf100-: delete duplicated init codeBen Skeggs2018-05-1811-312/+10
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/gr/gf100-: virtualise init_400054Ben Skeggs2018-05-1813-4/+32
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/gr/gf100-: apply be exception fixes from tracesBen Skeggs2018-05-182-4/+4
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/gr/gf100-: virtualise init_shader_exceptionsBen Skeggs2018-05-1817-11/+50
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/gr/gf100-: virtualise init_504430Ben Skeggs2018-05-188-3/+21
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/gr/gf100-: virtualise init_tex_hww_esrBen Skeggs2018-05-1817-5/+31
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/gr/gf100-: virtualise init_ppc_exceptionsBen Skeggs2018-05-181-0/+3
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/gr/gf100-: virtualise init_419c9c + apply fixes from tracesBen Skeggs2018-05-183-3/+14
| | | | | | Deliberately removed from non-GP100, as RM doesn't touch it. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/gr/gf100-: virtualise init_419eb4 + apply fixes from tracesBen Skeggs2018-05-1810-3/+37
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/gr/gf100-: virtualise init_419cc0 + apply fixes from tracesBen Skeggs2018-05-1817-10/+40
| | | | | | Pulled some init out of main per-GPC/TPC loops to match RM. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/gr/gf100-: virtualise init_sked_hww_esrBen Skeggs2018-05-1812-4/+26
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/gr/gf100-: virtualise init_40601cBen Skeggs2018-05-187-1/+18
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>