diff options
Diffstat (limited to 'drivers/gpu/nvgpu')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.c | 7 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.h | 6 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/pci.c | 7 |
3 files changed, 20 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c index 47ce220f..ebe2dca4 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a.c | |||
@@ -2014,6 +2014,13 @@ int gk20a_init_gpu_characteristics(struct gk20a *g) | |||
2014 | 2014 | ||
2015 | gpu->local_video_memory_size = g->mm.vidmem.size; | 2015 | gpu->local_video_memory_size = g->mm.vidmem.size; |
2016 | 2016 | ||
2017 | gpu->pci_vendor_id = g->pci_vendor_id; | ||
2018 | gpu->pci_device_id = g->pci_device_id; | ||
2019 | gpu->pci_subsystem_vendor_id = g->pci_subsystem_vendor_id; | ||
2020 | gpu->pci_subsystem_device_id = g->pci_subsystem_device_id; | ||
2021 | gpu->pci_class = g->pci_class; | ||
2022 | gpu->pci_revision = g->pci_revision; | ||
2023 | |||
2017 | return 0; | 2024 | return 0; |
2018 | } | 2025 | } |
2019 | 2026 | ||
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h index 72170362..b534389e 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gk20a.h | |||
@@ -908,6 +908,12 @@ struct gk20a { | |||
908 | struct debugfs_blob_wrapper bios_blob; | 908 | struct debugfs_blob_wrapper bios_blob; |
909 | 909 | ||
910 | struct gk20a_ce_app ce_app; | 910 | struct gk20a_ce_app ce_app; |
911 | |||
912 | /* PCI device identifier */ | ||
913 | u16 pci_vendor_id, pci_device_id; | ||
914 | u16 pci_subsystem_vendor_id, pci_subsystem_device_id; | ||
915 | u16 pci_class; | ||
916 | u8 pci_revision; | ||
911 | }; | 917 | }; |
912 | 918 | ||
913 | static inline unsigned long gk20a_get_gr_idle_timeout(struct gk20a *g) | 919 | static inline unsigned long gk20a_get_gr_idle_timeout(struct gk20a *g) |
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) |