diff options
author | Sami Kiminki <skiminki@nvidia.com> | 2016-09-05 12:11:41 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2016-09-21 14:07:23 -0400 |
commit | 7303dd33ef69f0a533ebce31caf658e9c35a7091 (patch) | |
tree | c5105b8dfdcaf59a61f4d58ee370139a9ed5696c /drivers/gpu/nvgpu/pci.c | |
parent | f5224bde147537f55cc0d6e90761471ab802cf19 (diff) |
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 <skiminki@nvidia.com>
Reviewed-on: http://git-master/r/1214946
(cherry picked from commit a6e23a315a094f1df1f7db8e4307a10d06f28411)
Reviewed-on: http://git-master/r/1216336
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/pci.c')
-rw-r--r-- | drivers/gpu/nvgpu/pci.c | 7 |
1 files changed, 7 insertions, 0 deletions
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, | |||
201 | return err; | 201 | return err; |
202 | pci_set_master(pdev); | 202 | pci_set_master(pdev); |
203 | 203 | ||
204 | g->pci_vendor_id = pdev->vendor; | ||
205 | g->pci_device_id = pdev->device; | ||
206 | g->pci_subsystem_vendor_id = pdev->subsystem_vendor; | ||
207 | g->pci_subsystem_device_id = pdev->subsystem_device; | ||
208 | g->pci_class = (pdev->class >> 8) & 0xFFFFU; // we only want base/sub | ||
209 | g->pci_revision = pdev->revision; | ||
210 | |||
204 | g->irq_stall = pdev->irq; | 211 | g->irq_stall = pdev->irq; |
205 | g->irq_nonstall = pdev->irq; | 212 | g->irq_nonstall = pdev->irq; |
206 | if (g->irq_stall < 0) | 213 | if (g->irq_stall < 0) |