From 7303dd33ef69f0a533ebce31caf658e9c35a7091 Mon Sep 17 00:00:00 2001 From: Sami Kiminki Date: Mon, 5 Sep 2016 19:11:41 +0300 Subject: gpu: nvgpu: Expose PCI device id info Expose PCI device id info for PCI devices. Bug 1643487 Change-Id: Ib0e3295b33c2343d99553a5c48e3f67d419d207b Signed-off-by: Sami Kiminki Reviewed-on: http://git-master/r/1214946 (cherry picked from commit a6e23a315a094f1df1f7db8e4307a10d06f28411) Reviewed-on: http://git-master/r/1216336 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/pci.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'drivers/gpu/nvgpu/pci.c') diff --git a/drivers/gpu/nvgpu/pci.c b/drivers/gpu/nvgpu/pci.c index a67bbd54..7641c7be 100644 --- a/drivers/gpu/nvgpu/pci.c +++ b/drivers/gpu/nvgpu/pci.c @@ -201,6 +201,13 @@ static int nvgpu_pci_probe(struct pci_dev *pdev, return err; pci_set_master(pdev); + g->pci_vendor_id = pdev->vendor; + g->pci_device_id = pdev->device; + g->pci_subsystem_vendor_id = pdev->subsystem_vendor; + g->pci_subsystem_device_id = pdev->subsystem_device; + g->pci_class = (pdev->class >> 8) & 0xFFFFU; // we only want base/sub + g->pci_revision = pdev->revision; + g->irq_stall = pdev->irq; g->irq_nonstall = pdev->irq; if (g->irq_stall < 0) -- cgit v1.2.2