summaryrefslogtreecommitdiffstats
path: root/drivers/gpu
Commit message (Collapse)AuthorAgeFilesLines
* drm/nouveau/fifo/gk104-: better detection of chid when parsing engine statusBen Skeggs2017-02-171-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 <bskeggs@redhat.com>
* drm/nouveau/fifo/gk104-: separate out engine status parsingBen Skeggs2017-02-171-13/+46
| | | | | | We'll be wanting to reuse this logic in more places. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/fifo: add an api for initiating channel recoveryBen Skeggs2017-02-172-0/+13
| | | | | | This will be used by callers outside of fifo interrupt handlers. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/top: add function to translate subdev index to mmu fault idBen Skeggs2017-02-172-0/+15
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/gr/gf100-: implement chsw_load() methodBen Skeggs2017-02-171-0/+17
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/gr: implement chsw_load() methodBen Skeggs2017-02-172-0/+11
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/core: add engine method to assist in determining chsw directionBen Skeggs2017-02-172-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 <bskeggs@redhat.com>
* drm/nouveau: check for dead channel before trying to idleBen Skeggs2017-02-171-1/+1
| | | | | | | This prevents *very* long waits while attempting to destroy channels after a fault has occurred. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: request notifications for channels that have been killedBen Skeggs2017-02-172-1/+30
| | | | | | These will be used to improve error recovery behaviour. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/fifo/gf100-: provide notification to user if channel is killedBen Skeggs2017-02-1711-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 <bskeggs@redhat.com>
* drm/nouveau/fifo/g84-: rename non-stall interrupt eventBen Skeggs2017-02-176-6/+6
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/fifo: tidy up channel creation event codeBen Skeggs2017-02-173-6/+13
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/core: increase maximum number of notifies that a client can requestBen Skeggs2017-02-171-1/+1
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/drm/nouveau/led: prevent a possible use-after-freeMartin Peres2017-02-171-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 <emmanuelpescosta099@gmail.com> Signed-off-by: Martin Peres <martin.peres@free.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/pci/g92: Enable changing pcie link speedsKarol Herbst2017-02-171-1/+1
| | | | | | | Tested on a G92, seems to work. Confirmed by 8 mmiotraces. Signed-off-by: Karol Herbst <karolherbst@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/pci: Rename g94 to g92Karol Herbst2017-02-177-20/+20
| | | | | Signed-off-by: Karol Herbst <karolherbst@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/devinit/nv50: return error code if pll calculation failsBen Skeggs2017-02-171-1/+1
| | | | | Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: fix bug id typo in commentIlia Mirkin2017-02-171-1/+1
| | | | | | | The issue was recorded in fd.o bug 27501, not 25701. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: size is u64 everywhereBen Skeggs2017-02-174-19/+21
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: s/mem/reg/ for struct ttm_mem_reg variablesBen Skeggs2017-02-175-169/+169
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: allocate device object for every clientBen Skeggs2017-02-1732-305/+310
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: create userspace clients as subclientsBen Skeggs2017-02-171-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 <bskeggs@redhat.com>
* drm/nouveau: tidy up the client init/fini interfacesBen Skeggs2017-02-172-39/+52
| | | | | | These were a little insane. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: pass nvif_client to nouveau_gem_new() instead of drm_deviceBen Skeggs2017-02-175-10/+12
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: pass nvif_client to nouveau_bo_new() instead of drm_deviceBen Skeggs2017-02-1710-15/+20
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/core/memory: distinguish between coherent/non-coherent targetsBen Skeggs2017-02-175-13/+27
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/core/mm: replace region list with next pointerBen Skeggs2017-02-178-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 <bskeggs@redhat.com>
* drm/nouveau/core/client: allow creation of subclientsBen Skeggs2017-02-179-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 <bskeggs@redhat.com>
* drm/nouveau/core/client: pass notification callback to nvkm_client_newBen Skeggs2017-02-173-12/+9
| | | | | | Preparation for supporting subclients. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/core/client: destroy client objects over nvifBen Skeggs2017-02-173-19/+10
| | | | | | Preparation for supporting subclients, and also good for consistency. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/core/client: use standard object dtor/init/fini pathsBen Skeggs2017-02-173-34/+26
| | | | | | Preparation for supporting subclients, and also good for consistency. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/core/client: modify prefix on nvif structures, for consistencyBen Skeggs2017-02-174-16/+27
| | | | | | Preparation for supporting subclients. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/core/object: pass more args in oclassBen Skeggs2017-02-172-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 <bskeggs@redhat.com>
* drm/nouveau/core/object: pass client directly to ioctl handlersBen Skeggs2017-02-171-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 <bskeggs@redhat.com>
* drm/nouveau/dma: lookup objects with nvkm_object_search()Ben Skeggs2017-02-177-60/+22
| | | | | | Custom code is no longer needed here. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/core/client: lookup client objects with nvkm_object_search()Ben Skeggs2017-02-173-60/+4
| | | | | | Custom code is no longer needed here. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/core/object: support lookup of specific object typesBen Skeggs2017-02-172-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 <bskeggs@redhat.com>
* drm/nouveau/dma: use rb_entry()Geliang Tang2017-02-171-2/+2
| | | | | | | | To make the code clearer, use rb_entry() instead of container_of() to deal with rbtree. Signed-off-by: Geliang Tang <geliangtang@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* replace BUG_ON(1) with BUG()Ben Skeggs2017-02-174-5/+5
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/gr/nv50-mcp89: add defines for gr classesBen Skeggs2017-02-177-32/+56
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/gr/gf100-: fix ccache error loggingBen Skeggs2017-02-171-1/+1
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/disp/g94: remove unused sor implementationBen Skeggs2017-02-171-7/+0
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/fb/ram/gk104: remove unused best_clk variableBen Skeggs2017-02-171-3/+1
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/secboot: clear halt interrupt after ACR is runAlexandre Courbot2017-02-171-0/+2
| | | | | | | | The halt interrupt must be cleared after ACR is run, otherwise the LS PMU firmware will not be able to run. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/secboot: add lazy-bootstrap flagAlexandre Courbot2017-02-172-0/+7
| | | | | | | | | When the PMU firmware is present, the falcons it manages need to have the lazy-bootstrap flag of their WPR header set so the ACR does not boot them. Add support for this. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/secboot: fix WPR descriptor generationAlexandre Courbot2017-02-171-9/+12
| | | | | | | | Generate the WPR descriptor closer to what RM does. In particular, set the expected masks, and only set the ucode members on Tegra. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/secboot: set default error value in error registerAlexandre Courbot2017-02-171-0/+3
| | | | | | | | | Set a default error value in the mailbox 0 register so we can catch cases where the secure boot binary fails early without being able to report anything. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/secboot: add missing fields to BL structureAlexandre Courbot2017-02-171-0/+4
| | | | | | | | Since DMEM was initialized to zero, these fields went unnoticed. Add them for safety. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/secboot: safer zeroing of BL descriptorsAlexandre Courbot2017-02-172-4/+2
| | | | | | | | Perform the zeroing of BL descriptors in the caller function instead of trusting each generator will do it. This could avoid a few pulled hairs. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/secboot: abstract LS firmware loading functionsAlexandre Courbot2017-02-177-167/+215
| | | | | | | | | The WPR and LSB headers, used to generate the LS blob, may have a different layout and sizes depending on the driver version they come from. Abstract them and confine their use to driver-specific code. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
OpenPOWER on IntegriCloud