gpu: nvgpu: Add a flag CONFIG_NVGPU_PCI_IGPU

To support the pci probe for the integrated GPU, add a new config
flag called CONFIG_NVGPU_PCI_IGPU.

This will help us in compiling the pci related files for igpu safety
builds too

JIRA NVGPU-9348

Change-Id: I1824060db56b2cf555d4ad55bd870f3a20c95741
Signed-off-by: Ramalingam C <ramalingamc@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2835339
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Ramalingam C
2022-12-29 22:31:19 +00:00
committed by mobile promotions
parent 28cbdcde73
commit ebb60b7f5e
4 changed files with 21 additions and 3 deletions

View File

@@ -144,7 +144,15 @@ obj-$(CONFIG_GK20A) := nvgpu.o
ifeq ($(CONFIG_NVGPU_DGPU),y)
nvgpu-$(CONFIG_NVGPU_DGPU) += \
os/linux/pci.o \
os/linux/pci_power.o \
os/linux/pci_power.o
else ifeq ($(CONFIG_NVGPU_PCI_IGPU),y)
nvgpu-$(CONFIG_NVGPU_PCI_IGPU) += \
os/linux/pci.o \
os/linux/pci_power.o
endif
ifeq ($(CONFIG_NVGPU_DGPU),y)
nvgpu-$(CONFIG_NVGPU_DGPU) += \
os/linux/dmabuf_vidmem.o \
os/linux/dmabuf_nvs.o \
os/linux/os_ops_gv100.o \

View File

@@ -150,6 +150,8 @@ endif
# Enable support for GPUs on PCIe bus.
ifeq ($(CONFIG_PCI),y)
# Support for pci probe of IGPU
CONFIG_NVGPU_PCI_IGPU := y
# Support for NVGPU DGPU
CONFIG_NVGPU_DGPU := y
endif
@@ -292,6 +294,9 @@ endif
ifeq ($(CONFIG_NVGPU_DGPU),y)
ccflags-y += -DCONFIG_NVGPU_DGPU
endif
ifeq ($(CONFIG_NVGPU_PCI_IGPU),y)
ccflags-y += -DCONFIG_NVGPU_PCI_IGPU
endif
ifeq ($(CONFIG_GK20A_TRACE_PRINTK),y)
ccflags-y += -DCONFIG_GK20A_TRACE_PRINTK
endif

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2019-2022, NVIDIA CORPORATION. All rights reserved.
# Copyright (c) 2019-2023, NVIDIA CORPORATION. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
@@ -58,6 +58,11 @@ NVGPU_COMMON_CFLAGS += \
-DCONFIG_NVGPU_GR_VIRTUALIZATION \
-DCONFIG_NVS_ROUND_ROBIN_SCHEDULER_DISABLE
# Enable the PCI probe functionality for all builds
CONFIG_NVGPU_PCI_IGPU := 1
NVGPU_COMMON_CFLAGS += -DCONFIG_NVGPU_PCI_IGPU
ifeq ($(CONFIG_NVGPU_DGPU),1)
NVGPU_COMMON_CFLAGS += -DCONFIG_PCI_MSI
endif

View File

@@ -840,7 +840,7 @@ struct gk20a {
bool is_fusa_sku;
u16 pci_class;
#ifdef CONFIG_NVGPU_DGPU
#if defined(CONFIG_NVGPU_DGPU) || defined(CONFIG_NVGPU_PCI_IGPU)
/* PCI device identifier */
u16 pci_vendor_id, pci_device_id;
u16 pci_subsystem_vendor_id, pci_subsystem_device_id;