- Jul 26, 2024
-
-
Ben Skeggs authored
Signed-off-by:
Ben Skeggs <bskeggs@nvidia.com>
-
Ben Skeggs authored
The primary interfaces to NVKM are through NVIF, but there are a small number of functions which are called directly. Signed-off-by:
Ben Skeggs <bskeggs@nvidia.com>
-
Ben Skeggs authored
The move and renames were kept separate for cleaner diffs. Signed-off-by:
Ben Skeggs <bskeggs@nvidia.com>
-
Ben Skeggs authored
Previously, the DRM driver was the entry-point for the pci/platform bus probe() functions, and calls into NVKM to create an nvkm_device from pci/platform devices, then continues on with DRM init. Most of the code handling PCI/Tegra-specific functions has now been moved to NVKM (though prior to this commit, still *called* from DRM) and NVKM registers devices named "nvkm.device.<n>" on the auxiliary bus for each PCI or Tegra GPU in the system. The final step is to move pci/platform driver registration to NVKM, and have the DRM driver register as an auxiliary driver, from where it can gain access to the nvkm_device and proceed as it did before. Signed-off-by:
Ben Skeggs <bskeggs@nvidia.com>
-
Ben Skeggs authored
This wraps direct calls to pm_runtime functions to cleanup some common usage patterns, and keep the logic in one place. From the next commit, the pm_runtime calls will need to operate against the DRM driver's auxiliary device instead of directly on the underlying PCI device. This commit will help make that switch cleaner. Signed-off-by:
Ben Skeggs <bskeggs@nvidia.com>
-
Ben Skeggs authored
This commit registers a device on the aux bus after core NVKM init has finished, which will be used by a later commit to have the DRM driver probe() against an aux device instead of a PCI or platform device (in the case of Tegra). Signed-off-by:
Ben Skeggs <bskeggs@nvidia.com>
-
Ben Skeggs authored
Moves the PCI-specific portions of nouveau_pmops to NVKM, leaving the DRM pieces where they are. The NVKM functions are called through the the nvkm_device_pci_driver struct from DRM for now, but will be fully separated once the DRM driver is implemented on an auxiliary device. Signed-off-by:
Ben Skeggs <bskeggs@nvidia.com>
-
Ben Skeggs authored
Signed-off-by:
Ben Skeggs <bskeggs@nvidia.com>
-
Ben Skeggs authored
Signed-off-by:
Ben Skeggs <bskeggs@nvidia.com>
-
Ben Skeggs authored
Signed-off-by:
Ben Skeggs <bskeggs@nvidia.com>
-
Ben Skeggs authored
Signed-off-by:
Ben Skeggs <bskeggs@nvidia.com>
-
Ben Skeggs authored
Rename, and modify the signatures of nvkm_device_{pci,tegra}_new() to be consistent with pci/platform driver probe() functions. The DRM driver is still calling the functions as it did before, just via the new pci/platform driver structs in NVKM that will eventually be used for driver registration. Signed-off-by:
Ben Skeggs <bskeggs@nvidia.com>
-
Ben Skeggs authored
The DRM driver needs to do things in response to vga_switcheroo_client callbacks, so this move isn't a direct copy+paste. 3 new callbacks are added to nvif_driver_func, which are basically the same as the switcheroo callbacks, except NVKM handles all the PCI/ACPI parts, and calls into the DRM driver for the rest. Signed-off-by:
Ben Skeggs <bskeggs@nvidia.com>
-
Ben Skeggs authored
The DRM driver uses "nouveau_is_optimus() || nouveau_is_v1_dsm()", which have been moved to NVKM, to determine support for runtime pm. Replace with a feature flag returned when allocating an nvif_device. Signed-off-by:
Ben Skeggs <bskeggs@nvidia.com>
-
Ben Skeggs authored
Signed-off-by:
Ben Skeggs <bskeggs@nvidia.com>
-
Ben Skeggs authored
Signed-off-by:
Ben Skeggs <bskeggs@nvidia.com>
-
Ben Skeggs authored
These previously depended on the caller calling nvkm_device_del() to cleanup if nvkm_device_*_new() fails. That's a little odd for starters, but only the Tegra path cleaned up, and the PCI path would have leaked the memory, FWs etc that had been allocated as NVKM ran each subdev's ctor(). A later patch turns these into pci/platform driver probe() functions, so they need to learn how to clean up after themselves regardless. Signed-off-by:
Ben Skeggs <bskeggs@nvidia.com>
-
Ben Skeggs authored
Add stub init()/exit() functions that subsequent patches will use as they move the pci/platform-specific code out of the DRM driver. Signed-off-by:
Ben Skeggs <bskeggs@nvidia.com>
-
Ben Skeggs authored
A later patch in this series will move the code that binds to a PCI/ Tegra device into NVKM, and requires a couple of callbacks to handle switcheroo, etc. nvif_event is generally used for NVKM->DRM callbacks, but these will need to be registered before nvif_event is ready. This patch replaces the event() function pointer that was passed to nvkm_driver_ctor() during init with a nvif_driver_func struct, that contains the existing event() callback. Signed-off-by:
Ben Skeggs <bskeggs@nvidia.com>
-
Ben Skeggs authored
Return an enum rather than an int from nvif_event callbacks. Also moves the NVIF_EVENT_* definitions to driverif.h, with the rest of the DRM<->NVKM interfaces. Signed-off-by:
Ben Skeggs <bskeggs@nvidia.com>
-
Ben Skeggs authored
A later patch in this series moves the nvif_event callback function, but all the callers directly dereference object->client->event(). Add a helper function so this only has to be changed in one place. Signed-off-by:
Ben Skeggs <bskeggs@nvidia.com>
-
Ben Skeggs authored
A later patch in the series converts nvkm_device_{pci_tegra}_new into PCI/platform device probe functions, as a step towards moving all the PCI/Tegra-specific handling into NVKM. nouveau.ko has two module options (nouveau.config/nouveau.debug) that affect the behaviour of NVKM, however, and the probe() functions will not have access to these, which would break a user's configuration if they depend on any of the options to workaround a problem, etc. To avoid this, we delay calling constructors for each subdev (which could depend on module parameters) until allocation of the first nvif_device, which will allow the DRM driver a chance to override device.{cfg,dbg}opt before they're needed. v2: - move pci dma_set_mask() to oneinit, so mmu.dma_bits is initialised Signed-off-by:
Ben Skeggs <bskeggs@nvidia.com>
-
Ben Skeggs authored
The NVIF/NVKM comments were backwards. Signed-off-by:
Ben Skeggs <bskeggs@nvidia.com>
-
Ben Skeggs authored
- complete the switch to nouveau_drm.cli - renames drm._client to drm.client Signed-off-by:
Ben Skeggs <bskeggs@nvidia.com>
-
Ben Skeggs authored
- accesses to PRI are now via nvif_device.map Signed-off-by:
Ben Skeggs <bskeggs@nvidia.com>
-
Ben Skeggs authored
- complete the switch to nvif_device.impl Signed-off-by:
Ben Skeggs <bskeggs@nvidia.com>
-
Ben Skeggs authored
- this protected the drm.master object rb, which no longer exists Signed-off-by:
Ben Skeggs <bskeggs@nvidia.com>
-
Ben Skeggs authored
- nvkm_object_search() no longer exists to be called from irq context Signed-off-by:
Ben Skeggs <bskeggs@nvidia.com>
-
Ben Skeggs authored
- no more users Signed-off-by:
Ben Skeggs <bskeggs@nvidia.com>
-
Ben Skeggs authored
- transition from "ioctl" interface Signed-off-by:
Ben Skeggs <bskeggs@nvidia.com>
-
Ben Skeggs authored
- transition from "ioctl" interface Signed-off-by:
Ben Skeggs <bskeggs@nvidia.com>
-
Ben Skeggs authored
- no more users Signed-off-by:
Ben Skeggs <bskeggs@nvidia.com>
-
Ben Skeggs authored
- transition from "ioctl" interfaces Signed-off-by:
Ben Skeggs <bskeggs@nvidia.com>
-
Ben Skeggs authored
- transition from "ioctl" interface Signed-off-by:
Ben Skeggs <bskeggs@nvidia.com>
-
Ben Skeggs authored
- transition from "ioctl" interfaces Signed-off-by:
Ben Skeggs <bskeggs@nvidia.com>
-
Ben Skeggs authored
- transition from "ioctl" interfaces Signed-off-by:
Ben Skeggs <bskeggs@nvidia.com>
-
Ben Skeggs authored
- transition from "ioctl" interface Signed-off-by:
Ben Skeggs <bskeggs@nvidia.com>
-
Ben Skeggs authored
- no more users Signed-off-by:
Ben Skeggs <bskeggs@nvidia.com>
-
Ben Skeggs authored
- no more users Signed-off-by:
Ben Skeggs <bskeggs@nvidia.com>
-
Ben Skeggs authored
- no more users Signed-off-by:
Ben Skeggs <bskeggs@nvidia.com>
-