aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2017-02-17drm/nouveau/bios/power_budget: Add basic power budget parsingKarol Herbst3-0/+153
v2: Set entry to 0xff if not found Add cap entry for ver 0x30 tables Rework to fix memory leak v3: More error checks Simplify check for invalid entries v4: disable for ver 0x10 for now move assignments after the second last return Signed-off-by: Karol Herbst <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2017-02-17drm/nouveau/fifo/gk104-: preempt recoveryBen Skeggs1-0/+1
Signed-off-by: Ben Skeggs <[email protected]>
2017-02-17drm/nouveau/fifo/gk104-: trigger mmu fault before attempting engine recoveryBen Skeggs1-0/+41
Greatly improves the chances of recovering the GPU from a CTXSW_TIMEOUT. Tested with piglit's arb_shader_image_load_store-atomicity, which causes GR to hang in such a way that recovery failed (CTXSW_TIMEOUT continually re-triggers). Signed-off-by: Ben Skeggs <[email protected]>
2017-02-17drm/nouveau/fifo/gk104-: ACK SCHED_ERROR before attempting CTXSW_TIMEOUT ↵Ben Skeggs1-0/+8
recovery Signed-off-by: Ben Skeggs <[email protected]>
2017-02-17drm/nouveau/fifo/gk104-: directly use new recovery code for ctxsw timeoutBen Skeggs1-24/+6
Signed-off-by: Ben Skeggs <[email protected]>
2017-02-17drm/nouveau/fifo/gk104-: directly use new recovery code for mmu faultsBen Skeggs3-8/+37
Signed-off-by: Ben Skeggs <[email protected]>
2017-02-17drm/nouveau/fifo/gk104-: reset all engines a killed channel is still active onBen Skeggs1-0/+13
Signed-off-by: Ben Skeggs <[email protected]>
2017-02-17drm/nouveau/fifo/gk104-: refactor recovery codeBen Skeggs1-14/+81
This will serve as a basis for implementing some improvements to how we recover the GPU from channel errors. Signed-off-by: Ben Skeggs <[email protected]>
2017-02-17drm/nouveau/fifo/gk104-: better detection of chid when parsing engine statusBen Skeggs1-1/+19
The previous commit simply changes the interface, but should result in the same behaviour as previously. This commit has been split out from it as it can result in a different channel being selected. Signed-off-by: Ben Skeggs <[email protected]>
2017-02-17drm/nouveau/fifo/gk104-: separate out engine status parsingBen Skeggs1-13/+46
We'll be wanting to reuse this logic in more places. Signed-off-by: Ben Skeggs <[email protected]>
2017-02-17drm/nouveau/fifo: add an api for initiating channel recoveryBen Skeggs2-0/+13
This will be used by callers outside of fifo interrupt handlers. Signed-off-by: Ben Skeggs <[email protected]>
2017-02-17drm/nouveau/top: add function to translate subdev index to mmu fault idBen Skeggs2-0/+15
Signed-off-by: Ben Skeggs <[email protected]>
2017-02-17drm/nouveau/gr/gf100-: implement chsw_load() methodBen Skeggs1-0/+17
Signed-off-by: Ben Skeggs <[email protected]>
2017-02-17drm/nouveau/gr: implement chsw_load() methodBen Skeggs2-0/+11
Signed-off-by: Ben Skeggs <[email protected]>
2017-02-17drm/nouveau/core: add engine method to assist in determining chsw directionBen Skeggs2-0/+10
FIFO gives us load/save/switch status, and we need to be able to determine which direction a "switch" is failing during channel recovery. In order to do this, we apparently need to query the engine itself. Signed-off-by: Ben Skeggs <[email protected]>
2017-02-17drm/nouveau: check for dead channel before trying to idleBen Skeggs1-1/+1
This prevents *very* long waits while attempting to destroy channels after a fault has occurred. Signed-off-by: Ben Skeggs <[email protected]>
2017-02-17drm/nouveau: request notifications for channels that have been killedBen Skeggs2-1/+30
These will be used to improve error recovery behaviour. Signed-off-by: Ben Skeggs <[email protected]>
2017-02-17drm/nouveau/fifo/gf100-: provide notification to user if channel is killedBen Skeggs11-5/+58
There are instances (such as non-recoverable GPU page faults) where NVKM decides that a channel's context is no longer viable, and will be removed from the runlist. This commit notifies the owner of the channel when this happens, so it has the opportunity to take some kind of recovery action instead of hanging. Signed-off-by: Ben Skeggs <[email protected]>
2017-02-17drm/nouveau/fifo/g84-: rename non-stall interrupt eventBen Skeggs6-6/+6
Signed-off-by: Ben Skeggs <[email protected]>
2017-02-17drm/nouveau/fifo: tidy up channel creation event codeBen Skeggs3-6/+13
Signed-off-by: Ben Skeggs <[email protected]>
2017-02-17drm/nouveau/core: increase maximum number of notifies that a client can requestBen Skeggs1-1/+1
Signed-off-by: Ben Skeggs <[email protected]>
2017-02-17drm/nouveau/drm/nouveau/led: prevent a possible use-after-freeMartin Peres1-0/+1
If the led class registration fails, we free drm->led but do not reset it to NULL, which means that the suspend/resume/fini function will act as if everything went well in init() and will likely crash the kernel. This patch adds the missing drm->led = NULL. Reported-by: Emmanuel Pescosta <[email protected]> Signed-off-by: Martin Peres <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2017-02-17drm/nouveau/pci/g92: Enable changing pcie link speedsKarol Herbst1-1/+1
Tested on a G92, seems to work. Confirmed by 8 mmiotraces. Signed-off-by: Karol Herbst <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2017-02-17drm/nouveau/pci: Rename g94 to g92Karol Herbst7-20/+20
Signed-off-by: Karol Herbst <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2017-02-17drm/nouveau/devinit/nv50: return error code if pll calculation failsBen Skeggs1-1/+1
Reported-by: Dan Carpenter <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2017-02-17drm/nouveau: fix bug id typo in commentIlia Mirkin1-1/+1
The issue was recorded in fd.o bug 27501, not 25701. Signed-off-by: Ilia Mirkin <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2017-02-17drm/nouveau: size is u64 everywhereBen Skeggs4-19/+21
Signed-off-by: Ben Skeggs <[email protected]>
2017-02-17drm/nouveau: s/mem/reg/ for struct ttm_mem_reg variablesBen Skeggs5-169/+169
Signed-off-by: Ben Skeggs <[email protected]>
2017-02-17drm/nouveau: allocate device object for every clientBen Skeggs32-305/+310
Signed-off-by: Ben Skeggs <[email protected]>
2017-02-17drm/nouveau: create userspace clients as subclientsBen Skeggs1-22/+11
This will allow the DRM to share memory objects between clients later down the track. For the moment, the only immediate benefit is less logic required to handle suspend/resume. Signed-off-by: Ben Skeggs <[email protected]>
2017-02-17drm/nouveau: tidy up the client init/fini interfacesBen Skeggs2-39/+52
These were a little insane. Signed-off-by: Ben Skeggs <[email protected]>
2017-02-17drm/nouveau: pass nvif_client to nouveau_gem_new() instead of drm_deviceBen Skeggs5-10/+12
Signed-off-by: Ben Skeggs <[email protected]>
2017-02-17drm/nouveau: pass nvif_client to nouveau_bo_new() instead of drm_deviceBen Skeggs10-15/+20
Signed-off-by: Ben Skeggs <[email protected]>
2017-02-17drm/nouveau/core/memory: distinguish between coherent/non-coherent targetsBen Skeggs5-13/+27
Signed-off-by: Ben Skeggs <[email protected]>
2017-02-17drm/nouveau/core/mm: replace region list with next pointerBen Skeggs8-37/+34
We never have any need for a double-linked list here, and as there's generally a large number of these objects, replace it with a single- linked list in order to save some memory. Signed-off-by: Ben Skeggs <[email protected]>
2017-02-17drm/nouveau/core/client: allow creation of subclientsBen Skeggs9-35/+140
We want a supervisor client of NVKM (such as the DRM) to be able to allow sharing of resources (such as memory objects) between clients. To allow this, the supervisor creates all its clients as children of itself, and will use an upcoming ioctl to permit sharing. Currently it's not possible for indirect clients to use subclients. Supporting this will require an additional field in the main ioctl. This isn't important currently, but will need to be fixed for virt. Signed-off-by: Ben Skeggs <[email protected]>
2017-02-17drm/nouveau/core/client: pass notification callback to nvkm_client_newBen Skeggs3-12/+9
Preparation for supporting subclients. Signed-off-by: Ben Skeggs <[email protected]>
2017-02-17drm/nouveau/core/client: destroy client objects over nvifBen Skeggs3-19/+10
Preparation for supporting subclients, and also good for consistency. Signed-off-by: Ben Skeggs <[email protected]>
2017-02-17drm/nouveau/core/client: use standard object dtor/init/fini pathsBen Skeggs3-34/+26
Preparation for supporting subclients, and also good for consistency. Signed-off-by: Ben Skeggs <[email protected]>
2017-02-17drm/nouveau/core/client: modify prefix on nvif structures, for consistencyBen Skeggs4-16/+27
Preparation for supporting subclients. Signed-off-by: Ben Skeggs <[email protected]>
2017-02-17drm/nouveau/core/object: pass more args in oclassBen Skeggs2-4/+6
The fields were already in struct nvkm_oclass for some reason (probably as an accidental left-over). Preparation for supporting subclients. Signed-off-by: Ben Skeggs <[email protected]>
2017-02-17drm/nouveau/core/object: pass client directly to ioctl handlersBen Skeggs1-19/+28
nvkm_object::client refers to the client that created the object, which, is currently always the same as the ioctl caller. Upcoming patches introduce the concept of subclients, where a parent is able to access the object trees of its children, making the above no longer true. Signed-off-by: Ben Skeggs <[email protected]>
2017-02-17drm/nouveau/dma: lookup objects with nvkm_object_search()Ben Skeggs7-60/+22
Custom code is no longer needed here. Signed-off-by: Ben Skeggs <[email protected]>
2017-02-17drm/nouveau/core/client: lookup client objects with nvkm_object_search()Ben Skeggs3-60/+4
Custom code is no longer needed here. Signed-off-by: Ben Skeggs <[email protected]>
2017-02-17drm/nouveau/core/object: support lookup of specific object typesBen Skeggs2-1/+65
It turns out we have a nice and convenient way of looking up a specific object type already, by using the func pointer as a key. This will be used to remove the separate object trees for each type we need to be able to search for. Signed-off-by: Ben Skeggs <[email protected]>
2017-02-17drm/nouveau/dma: use rb_entry()Geliang Tang1-2/+2
To make the code clearer, use rb_entry() instead of container_of() to deal with rbtree. Signed-off-by: Geliang Tang <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2017-02-17replace BUG_ON(1) with BUG()Ben Skeggs4-5/+5
Signed-off-by: Ben Skeggs <[email protected]>
2017-02-17drm/nouveau/gr/nv50-mcp89: add defines for gr classesBen Skeggs7-32/+56
Signed-off-by: Ben Skeggs <[email protected]>
2017-02-17drm/nouveau/gr/gf100-: fix ccache error loggingBen Skeggs1-1/+1
Signed-off-by: Ben Skeggs <[email protected]>
2017-02-17drm/nouveau/disp/g94: remove unused sor implementationBen Skeggs1-7/+0
Signed-off-by: Ben Skeggs <[email protected]>