anv: remove private pci fields
authorJianxun Zhang <jianxun.zhang@linux.intel.com>
Thu, 6 Jan 2022 18:43:13 +0000 (10:43 -0800)
committerMarge Bot <emma+marge@anholt.net>
Thu, 13 Jan 2022 03:09:36 +0000 (03:09 +0000)
These fields are in the base device struct 'intel_device_info' now.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5489

Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13936>

src/intel/vulkan/anv_device.c
src/intel/vulkan/anv_private.h

index 2ff5667..5ca284e 100644 (file)
@@ -802,11 +802,6 @@ anv_physical_device_try_create(struct anv_instance *instance,
    device->info = devinfo;
    device->is_alpha = is_alpha;
 
-   device->pci_info.domain = drm_device->businfo.pci->domain;
-   device->pci_info.bus = drm_device->businfo.pci->bus;
-   device->pci_info.device = drm_device->businfo.pci->dev;
-   device->pci_info.function = drm_device->businfo.pci->func;
-
    device->cmd_parser_version = -1;
    if (device->info.ver == 7) {
       device->cmd_parser_version =
@@ -2320,10 +2315,10 @@ void anv_GetPhysicalDeviceProperties2(
       case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PCI_BUS_INFO_PROPERTIES_EXT: {
          VkPhysicalDevicePCIBusInfoPropertiesEXT *properties =
             (VkPhysicalDevicePCIBusInfoPropertiesEXT *)ext;
-         properties->pciDomain = pdevice->pci_info.domain;
-         properties->pciBus = pdevice->pci_info.bus;
-         properties->pciDevice = pdevice->pci_info.device;
-         properties->pciFunction = pdevice->pci_info.function;
+         properties->pciDomain = pdevice->info.pci_domain;
+         properties->pciBus = pdevice->info.pci_bus;
+         properties->pciDevice = pdevice->info.pci_dev;
+         properties->pciFunction = pdevice->info.pci_func;
          break;
       }
 
index 359c8af..1e0e2d8 100644 (file)
@@ -890,12 +890,6 @@ struct anv_physical_device {
 
     struct anv_instance *                       instance;
     char                                        path[20];
-    struct {
-       uint16_t                                 domain;
-       uint8_t                                  bus;
-       uint8_t                                  device;
-       uint8_t                                  function;
-    }                                           pci_info;
     struct intel_device_info                      info;
     /** Amount of "GPU memory" we want to advertise
      *