Lines Matching refs:gpdev
68 struct pci_dev *gpdev; in pnv_pci_get_gpu_dev() local
81 gpdev = get_pci_dev(dn); in pnv_pci_get_gpu_dev()
84 return gpdev; in pnv_pci_get_gpu_dev()
89 struct pci_dev *pnv_pci_get_npu_dev(struct pci_dev *gpdev, int index) in pnv_pci_get_npu_dev() argument
94 if (WARN_ON(!gpdev)) in pnv_pci_get_npu_dev()
98 if (!gpdev->dev.of_node) in pnv_pci_get_npu_dev()
102 dn = of_parse_phandle(gpdev->dev.of_node, "ibm,npu", index); in pnv_pci_get_npu_dev()
175 struct pci_dev **gpdev) in get_gpu_pci_dev_and_pe() argument
195 if (gpdev) in get_gpu_pci_dev_and_pe()
196 *gpdev = pdev; in get_gpu_pci_dev_and_pe()
263 struct pci_dev *gpdev; in pnv_npu_dma_set_32() local
274 gpe = get_gpu_pci_dev_and_pe(npe, &gpdev); in pnv_npu_dma_set_32()
321 void pnv_npu_try_dma_set_bypass(struct pci_dev *gpdev, bool bypass) in pnv_npu_try_dma_set_bypass() argument
330 npdev = pnv_pci_get_npu_dev(gpdev, i); in pnv_npu_try_dma_set_bypass()
387 struct pci_dev *npdev, *gpdev = NULL, *gptmp; in pnv_pci_npu_setup_iommu() local
388 struct pnv_ioda_pe *gpe = get_gpu_pci_dev_and_pe(npe, &gpdev); in pnv_pci_npu_setup_iommu()
390 if (!gpe || !gpdev) in pnv_pci_npu_setup_iommu()
396 if (gptmp != gpdev) in pnv_pci_npu_setup_iommu()
726 struct npu_context *pnv_npu2_init_context(struct pci_dev *gpdev, in pnv_npu2_init_context() argument
743 struct pci_dev *npdev = pnv_pci_get_npu_dev(gpdev, 0); in pnv_npu2_init_context()
776 PCI_DEVID(gpdev->bus->number, gpdev->devfn)); in pnv_npu2_init_context()
791 PCI_DEVID(gpdev->bus->number, in pnv_npu2_init_context()
792 gpdev->devfn)); in pnv_npu2_init_context()
819 PCI_DEVID(gpdev->bus->number, in pnv_npu2_init_context()
820 gpdev->devfn)); in pnv_npu2_init_context()
870 struct pci_dev *gpdev) in pnv_npu2_destroy_context() argument
875 struct pci_dev *npdev = pnv_pci_get_npu_dev(gpdev, 0); in pnv_npu2_destroy_context()
893 PCI_DEVID(gpdev->bus->number, gpdev->devfn)); in pnv_npu2_destroy_context()
961 struct pci_dev *gpdev; in pnv_npu2_init() local
973 gpdev = pnv_pci_get_gpu_dev(get_pci_dev(dn)); in pnv_npu2_init()
974 if (gpdev) { in pnv_npu2_init()
976 PCI_DEVID(gpdev->bus->number, gpdev->devfn), in pnv_npu2_init()
979 dev_err(&gpdev->dev, in pnv_npu2_init()