summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nvkm
Commit message (Collapse)AuthorAgeFilesLines
* drm/nouveau/fb/gp102-: allow module to load even when scrubber binary is missingBen Skeggs2020-01-292-12/+32
| | | | | | | | Without relaxing this requirement, TU10x boards will fail to load without an updated linux-firmware, and TU11x will completely fail to load because FW isn't available yet. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/acr: return error when registering LSF if ACR not supportedBen Skeggs2020-01-291-1/+5
| | | | | | | This fixes an oops on TU11x GPUs where SEC2 attempts to register its falcon, and triggers a NULL-pointer deref because ACR isn't yet supported. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/disp/gv100-: not all channel types support reporting error codesBen Skeggs2020-01-291-6/+17
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/disp/nv50-: prevent oops when no channel method map providedBen Skeggs2020-01-291-0/+2
| | | | | | | | | | | | | The implementations for most channel types contains a map of methods to priv registers in order to provide debugging info when a disp exception has been raised. This info is missing from the implementation of PIO channels as they're rather simplistic already, however, if an exception is raised by one of them, we'd end up triggering a NULL-pointer deref. Not ideal... Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=206299 Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/mmu: fix comptag memory leakBen Skeggs2020-01-231-1/+1
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/gr/gp10b: Use gp100_grctx and gp100_gr_zbcThierry Reding2020-01-233-3/+4
| | | | | | | | | gp10b doesn't have all the registers that gp102_gr_zbc wants to access, which causes IBUS MMIO faults to occur. Avoid this by using the gp100 variants of grctx and gr_zbc. Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/pmu/gm20b,gp10b: Fix Falcon bootstrappingThierry Reding2020-01-232-4/+14
| | | | | | | | | | | | | | The low-level Falcon bootstrapping callbacks are expected to return 0 on success or a negative error code on failure. However, the implementation on Tegra returns the ID or mask of the Falcons that were bootstrapped on success, thus breaking the calling code, which treats this as failure. Fix this by making sure we only return 0 or a negative error code, just like the code for discrete GPUs does. Fixes: 86ce2a71539c ("drm/nouveau/flcn/cmdq: move command generation to subdevs") Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/gr/tu10x: initial supportBen Skeggs2020-01-1510-11/+309
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/acr/tu10x: initial supportBen Skeggs2020-01-155-0/+228
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/core: remove previous versioned fw loaderBen Skeggs2020-01-153-28/+15
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/secboot: removeBen Skeggs2020-01-1531-4158/+1
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/acr: implement new subdev to replace "secure boot"Ben Skeggs2020-01-1527-46/+1926
| | | | | | | | | | | | | | | | | | | | | | | ACR is responsible for managing the firmware for LS (Low Secure) falcons, this was previously handled in the driver by SECBOOT. This rewrite started from some test code that attempted to replicate the procedure RM uses in order to debug early Turing ACR firmwares that were provided by NVIDIA for development. Compared with SECBOOT, the code is structured into more individual steps, with the aim of making the process easier to follow/debug, whilst making it possible to support newer firmware versions that may have a different binary format or API interface. The HS (High Secure) binary(s) are now booted earlier in device init, to match the behaviour of RM, whereas SECBOOT would delay this until we try to boot the first LS falcon. There's also additional debugging features available, with the intention of making it easier to solve issues during FW/HW bring-up in the future. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/fb/gp102-: unlock VPR as part of FB initBen Skeggs2020-01-158-121/+193
| | | | | | | | | | We perform memory allocations long before we hit the code in SECBOOT that would unlock the VPR, which could potentially result in memory allocation within the locked region. Run the scrubber binary right after VRAM init to ensure we don't. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/secboot: move code to boot LS falcons to subdevsBen Skeggs2020-01-1518-505/+48
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/flcn/msgq: rename msgq-related nvkm_msgqueue_queue to ↵Ben Skeggs2020-01-153-74/+71
| | | | | | nvkm_falcon_msgq Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/flcn/msgq: pass explicit message queue pointer to recv()Ben Skeggs2020-01-157-48/+3
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/flcn/msgq: move handling of init message to subdevsBen Skeggs2020-01-1513-264/+145
| | | | | | | | | | When the PMU/SEC2 LS FWs have booted, they'll send a message to the host with various information, including the configuration of message/command queues that are available. Move the handling for this to the relevant subdevs. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/flcn/msgq: drop nvkm_msgqueue argument to functionsBen Skeggs2020-01-151-26/+19
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/flcn/msgq: switch to falcon queue printk macrosBen Skeggs2020-01-151-8/+6
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/flcn/msgq: simplify msg_queue_pop() error handlingBen Skeggs2020-01-151-18/+7
| | | | | | | We always want at least requested size, make anything less a more direct error condition. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/flcn/msgq: remove error handling for msg_queue_open(), it can't failBen Skeggs2020-01-151-7/+2
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/flcn/cmdq: move command generation to subdevsBen Skeggs2020-01-1512-272/+201
| | | | | | | This moves the code to generate commands for the ACR unit of the PMU/SEC2 LS firmwares to those subdevs. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/flcn/cmdq: rename cmdq-related nvkm_msqqueue_queue to ↵Ben Skeggs2020-01-151-41/+37
| | | | | | nvkm_falcon_cmdq Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/flcn/cmdq: implement a more explicit send() interfaceBen Skeggs2020-01-154-79/+35
| | | | | | | Takes the command queue pointer directly instead of requiring a function to lookup based on an queue type, as well as an explicit timeout value. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/flcn/cmdq: drop nvkm_msgqueue argument to functionsBen Skeggs2020-01-151-22/+18
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/flcn/cmdq: switch to falcon queue printk macrosBen Skeggs2020-01-151-5/+5
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/flcn/cmdq: cmd_queue_close always commits, simplify itBen Skeggs2020-01-151-9/+3
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/flcn/cmdq: cmd_queue_push can't fail, remove error handling for itBen Skeggs2020-01-151-15/+3
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/flcn/cmdq: split the condition for queue readiness vs pmu acr ↵Ben Skeggs2020-01-156-15/+29
| | | | | | | | | readiness This is to allow for proper separation of the LS interface code from the queue handling code. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/flcn/qmgr: rename remaining nvkm_msgqueue bits to nvkm_falcon_qmgrBen Skeggs2020-01-154-30/+32
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/flcn/qmgr: support syncronous command submission from common codeBen Skeggs2020-01-156-34/+31
| | | | | | | Functions implementing FW commands had to implement this themselves, let's move that to common code and plumb the return code from callbacks through. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/flcn/qmgr: allow arbtrary priv + return code for callbacksBen Skeggs2020-01-156-38/+47
| | | | | | | | | | | | Code to interface with LS firmwares is being moved to the subdevs where it belongs, rather than living in the common falcon code. Arbitrary private data passed to callbacks is to allow for something other than struct nvkm_msgqueue to be passed into the callback (like the pointer to the subdev itself, for example), and the return code will be used where we'd like to detect failure from synchronous messages. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/flcn/qmgr: move sequence tracking from nvkm_msgqueue to ↵Ben Skeggs2020-01-156-53/+55
| | | | | | nvkm_falcon_qmgr Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/flcn/msgq: explicitly create message queue from subdevsBen Skeggs2020-01-155-56/+54
| | | | | | | | | Code to interface with LS firmwares is being moved to the subdevs where it belongs, rather than living in the common falcon code. This is an incremental step towards that goal. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/flcn/cmdq: explicitly create command queue(s) from subdevsBen Skeggs2020-01-157-21/+82
| | | | | | | | | Code to interface with LS firmwares is being moved to the subdevs where it belongs, rather than living in the common falcon code. This is an incremental step towards that goal. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/flcn/qmgr: explicitly create queue manager from subdevsBen Skeggs2020-01-155-3/+45
| | | | | | | | | Code to interface with LS firmwares is being moved to the subdevs where it belongs, rather than living in the common falcon code. This is an incremental step towards that goal. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/flcn: split msgqueue into multiple piecesBen Skeggs2020-01-156-410/+474
| | | | | | | | | To make things clearer while modifying the interfaces, split msgqueue into Queue Manager, Command Queue, and Message Queue. There should be no code changes here, these will be done incrementally. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/flcn: reset sec2/gsp falcons harderBen Skeggs2020-01-152-2/+11
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/flcn: specify queue register offsets from subdevBen Skeggs2020-01-156-26/+23
| | | | | | Also fixes the values for Turing, even though we don't use it yet. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/flcn: specify debug/production register offset from subdevBen Skeggs2020-01-155-26/+7
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/flcn: specify EMEM address from subdevBen Skeggs2020-01-154-7/+8
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/flcn: move bind_context WAR out of common codeBen Skeggs2020-01-154-39/+43
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/flcn: specify FBIF offset from subdevBen Skeggs2020-01-158-15/+8
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/nvenc: add a stub implementation for the GPUs where it should be ↵Ben Skeggs2020-01-155-4/+173
| | | | | | | | supported Mostly so we don't lose info hidden in falcon. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/nvdec/gm107-: add missing engine instancesBen Skeggs2020-01-151-0/+8
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/nvdec/gm107: rename from gp102 implementationBen Skeggs2020-01-153-20/+20
| | | | | | | NVDEC is available from GM107, and we currently only have a stub implementation anyway, let's make it explicit. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/nvdec: initialise SW state for falcon from constructorBen Skeggs2020-01-154-22/+21
| | | | | | | This will allow us to register the falcon with ACR, and further customise its behaviour by providing the nvkm_falcon_func structure directly. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/nvdec: select implementation based on available fwBen Skeggs2020-01-153-7/+45
| | | | | | | This will allow for further customisation of the subdev depending on what firmware is available. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/sec2: move interrupt handler to hw-specific moduleBen Skeggs2020-01-154-21/+31
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/sec2: use falcon funcsBen Skeggs2020-01-151-8/+6
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>