Commit b5bd7cf7 authored by Ben Skeggs's avatar Ben Skeggs Committed by Danilo Krummrich

drm/nouveau/nvkm: remove detect/mmio/subdev_mask from device args

All callers now pass "detect=true, mmio=true, subdev_mask=~0ULL",
so remove the function arguments, and associated code.
Signed-off-by: default avatarBen Skeggs <bskeggs@nvidia.com>
Signed-off-by: default avatarDanilo Krummrich <dakr@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240726043828.58966-12-bskeggs@nvidia.com
parent 8bc1ab4f
...@@ -10,6 +10,5 @@ struct nvkm_device_pci { ...@@ -10,6 +10,5 @@ struct nvkm_device_pci {
}; };
int nvkm_device_pci_new(struct pci_dev *, const char *cfg, const char *dbg, int nvkm_device_pci_new(struct pci_dev *, const char *cfg, const char *dbg,
bool detect, bool mmio, u64 subdev_mask,
struct nvkm_device **); struct nvkm_device **);
#endif #endif
...@@ -51,6 +51,5 @@ struct nvkm_device_tegra_func { ...@@ -51,6 +51,5 @@ struct nvkm_device_tegra_func {
int nvkm_device_tegra_new(const struct nvkm_device_tegra_func *, int nvkm_device_tegra_new(const struct nvkm_device_tegra_func *,
struct platform_device *, struct platform_device *,
const char *cfg, const char *dbg, const char *cfg, const char *dbg,
bool detect, bool mmio, u64 subdev_mask,
struct nvkm_device **); struct nvkm_device **);
#endif #endif
...@@ -840,8 +840,7 @@ static int nouveau_drm_probe(struct pci_dev *pdev, ...@@ -840,8 +840,7 @@ static int nouveau_drm_probe(struct pci_dev *pdev,
/* We need to check that the chipset is supported before booting /* We need to check that the chipset is supported before booting
* fbdev off the hardware, as there's no way to put it back. * fbdev off the hardware, as there's no way to put it back.
*/ */
ret = nvkm_device_pci_new(pdev, nouveau_config, nouveau_debug, ret = nvkm_device_pci_new(pdev, nouveau_config, nouveau_debug, &device);
true, true, ~0ULL, &device);
if (ret) if (ret)
return ret; return ret;
...@@ -1387,8 +1386,7 @@ nouveau_platform_device_create(const struct nvkm_device_tegra_func *func, ...@@ -1387,8 +1386,7 @@ nouveau_platform_device_create(const struct nvkm_device_tegra_func *func,
struct nouveau_drm *drm; struct nouveau_drm *drm;
int err; int err;
err = nvkm_device_tegra_new(func, pdev, nouveau_config, nouveau_debug, err = nvkm_device_tegra_new(func, pdev, nouveau_config, nouveau_debug, pdevice);
true, true, ~0ULL, pdevice);
if (err) if (err)
goto err_free; goto err_free;
......
...@@ -1626,7 +1626,6 @@ nvkm_device_pci_func = { ...@@ -1626,7 +1626,6 @@ nvkm_device_pci_func = {
int int
nvkm_device_pci_new(struct pci_dev *pci_dev, const char *cfg, const char *dbg, nvkm_device_pci_new(struct pci_dev *pci_dev, const char *cfg, const char *dbg,
bool detect, bool mmio, u64 subdev_mask,
struct nvkm_device **pdevice) struct nvkm_device **pdevice)
{ {
const struct nvkm_device_quirk *quirk = NULL; const struct nvkm_device_quirk *quirk = NULL;
...@@ -1680,8 +1679,7 @@ nvkm_device_pci_new(struct pci_dev *pci_dev, const char *cfg, const char *dbg, ...@@ -1680,8 +1679,7 @@ nvkm_device_pci_new(struct pci_dev *pci_dev, const char *cfg, const char *dbg,
pci_dev->bus->number << 16 | pci_dev->bus->number << 16 |
PCI_SLOT(pci_dev->devfn) << 8 | PCI_SLOT(pci_dev->devfn) << 8 |
PCI_FUNC(pci_dev->devfn), name, PCI_FUNC(pci_dev->devfn), name,
cfg, dbg, detect, mmio, subdev_mask, cfg, dbg, &pdev->device);
&pdev->device);
if (ret) if (ret)
return ret; return ret;
......
...@@ -56,7 +56,6 @@ int nvkm_device_ctor(const struct nvkm_device_func *, ...@@ -56,7 +56,6 @@ int nvkm_device_ctor(const struct nvkm_device_func *,
const struct nvkm_device_quirk *, const struct nvkm_device_quirk *,
struct device *, enum nvkm_device_type, u64 handle, struct device *, enum nvkm_device_type, u64 handle,
const char *name, const char *cfg, const char *dbg, const char *name, const char *cfg, const char *dbg,
bool detect, bool mmio, u64 subdev_mask,
struct nvkm_device *); struct nvkm_device *);
int nvkm_device_init(struct nvkm_device *); int nvkm_device_init(struct nvkm_device *);
int nvkm_device_fini(struct nvkm_device *, bool suspend); int nvkm_device_fini(struct nvkm_device *, bool suspend);
......
...@@ -237,7 +237,6 @@ int ...@@ -237,7 +237,6 @@ int
nvkm_device_tegra_new(const struct nvkm_device_tegra_func *func, nvkm_device_tegra_new(const struct nvkm_device_tegra_func *func,
struct platform_device *pdev, struct platform_device *pdev,
const char *cfg, const char *dbg, const char *cfg, const char *dbg,
bool detect, bool mmio, u64 subdev_mask,
struct nvkm_device **pdevice) struct nvkm_device **pdevice)
{ {
struct nvkm_device_tegra *tdev; struct nvkm_device_tegra *tdev;
...@@ -311,8 +310,7 @@ nvkm_device_tegra_new(const struct nvkm_device_tegra_func *func, ...@@ -311,8 +310,7 @@ nvkm_device_tegra_new(const struct nvkm_device_tegra_func *func,
tdev->gpu_speedo_id = tegra_sku_info.gpu_speedo_id; tdev->gpu_speedo_id = tegra_sku_info.gpu_speedo_id;
ret = nvkm_device_ctor(&nvkm_device_tegra_func, NULL, &pdev->dev, ret = nvkm_device_ctor(&nvkm_device_tegra_func, NULL, &pdev->dev,
NVKM_DEVICE_TEGRA, pdev->id, NULL, NVKM_DEVICE_TEGRA, pdev->id, NULL,
cfg, dbg, detect, mmio, subdev_mask, cfg, dbg, &tdev->device);
&tdev->device);
if (ret) if (ret)
goto powerdown; goto powerdown;
...@@ -333,7 +331,6 @@ int ...@@ -333,7 +331,6 @@ int
nvkm_device_tegra_new(const struct nvkm_device_tegra_func *func, nvkm_device_tegra_new(const struct nvkm_device_tegra_func *func,
struct platform_device *pdev, struct platform_device *pdev,
const char *cfg, const char *dbg, const char *cfg, const char *dbg,
bool detect, bool mmio, u64 subdev_mask,
struct nvkm_device **pdevice) struct nvkm_device **pdevice)
{ {
return -ENOSYS; return -ENOSYS;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment