mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
gpu: nvgpu: add is_pci_gpu
Add a flag is_pci_gpu into platform data and gk20a, to support igpu as pcie device. JIRA NVGPU-9348 Change-Id: Iff1439ebb834b1673cb75ea26ca1e7626e1af0d5 Signed-off-by: Ramalingam C <ramalingamc@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2835340 Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
4bbc766454
commit
d6be1bdcfe
@@ -936,6 +936,8 @@ struct gk20a {
|
|||||||
#ifdef CONFIG_NVGPU_ENABLE_MISC_EC
|
#ifdef CONFIG_NVGPU_ENABLE_MISC_EC
|
||||||
bool enable_polling;
|
bool enable_polling;
|
||||||
#endif
|
#endif
|
||||||
|
/** Check if igpu is available as pci device. */
|
||||||
|
bool is_pci_igpu;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -115,6 +115,7 @@ static struct gk20a_platform nvgpu_pci_device[] = {
|
|||||||
.dma_mask = DMA_BIT_MASK(40),
|
.dma_mask = DMA_BIT_MASK(40),
|
||||||
.hardcode_sw_threshold = false,
|
.hardcode_sw_threshold = false,
|
||||||
.unified_memory = false,
|
.unified_memory = false,
|
||||||
|
.is_pci_igpu = false,
|
||||||
},
|
},
|
||||||
|
|
||||||
/* 0x1eba, 0x1efa, 0x1ebb, 0x1efb */
|
/* 0x1eba, 0x1efa, 0x1ebb, 0x1efb */
|
||||||
@@ -156,6 +157,7 @@ static struct gk20a_platform nvgpu_pci_device[] = {
|
|||||||
#ifdef CONFIG_TEGRA_GK20A_NVHOST
|
#ifdef CONFIG_TEGRA_GK20A_NVHOST
|
||||||
.has_syncpoints = true,
|
.has_syncpoints = true,
|
||||||
#endif
|
#endif
|
||||||
|
.is_pci_igpu = false,
|
||||||
},
|
},
|
||||||
|
|
||||||
/* 0x1eb0 (RTX 5000 : TU104 based) */
|
/* 0x1eb0 (RTX 5000 : TU104 based) */
|
||||||
@@ -195,6 +197,7 @@ static struct gk20a_platform nvgpu_pci_device[] = {
|
|||||||
#ifdef CONFIG_TEGRA_GK20A_NVHOST
|
#ifdef CONFIG_TEGRA_GK20A_NVHOST
|
||||||
.has_syncpoints = true,
|
.has_syncpoints = true,
|
||||||
#endif
|
#endif
|
||||||
|
.is_pci_igpu = false,
|
||||||
},
|
},
|
||||||
/* PG209 */
|
/* PG209 */
|
||||||
{
|
{
|
||||||
@@ -234,6 +237,7 @@ static struct gk20a_platform nvgpu_pci_device[] = {
|
|||||||
#ifdef CONFIG_TEGRA_GK20A_NVHOST
|
#ifdef CONFIG_TEGRA_GK20A_NVHOST
|
||||||
.has_syncpoints = true,
|
.has_syncpoints = true,
|
||||||
#endif
|
#endif
|
||||||
|
.is_pci_igpu = false,
|
||||||
},
|
},
|
||||||
|
|
||||||
};
|
};
|
||||||
@@ -544,6 +548,9 @@ static int nvgpu_pci_probe(struct pci_dev *pdev,
|
|||||||
(u8 *)&nvgpu_pci_device[device_index],
|
(u8 *)&nvgpu_pci_device[device_index],
|
||||||
sizeof(struct gk20a_platform));
|
sizeof(struct gk20a_platform));
|
||||||
|
|
||||||
|
|
||||||
|
g->is_pci_igpu = platform->is_pci_igpu;
|
||||||
|
nvgpu_info(g, "is_pci_igpu: %s", g->is_pci_igpu ? "true" : "false");
|
||||||
pci_set_drvdata(pdev, platform);
|
pci_set_drvdata(pdev, platform);
|
||||||
|
|
||||||
err = nvgpu_init_errata_flags(g);
|
err = nvgpu_init_errata_flags(g);
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* GK20A Platform (SoC) Interface
|
* GK20A Platform (SoC) Interface
|
||||||
*
|
*
|
||||||
* Copyright (c) 2014-2022, NVIDIA CORPORATION. All rights reserved.
|
* Copyright (c) 2014-2023, NVIDIA CORPORATION. All rights reserved.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify it
|
* This program is free software; you can redistribute it and/or modify it
|
||||||
* under the terms and conditions of the GNU General Public License,
|
* under the terms and conditions of the GNU General Public License,
|
||||||
@@ -355,6 +355,9 @@ struct gk20a_platform {
|
|||||||
|
|
||||||
/* synchronized access to platform->clks */
|
/* synchronized access to platform->clks */
|
||||||
struct nvgpu_mutex clks_lock;
|
struct nvgpu_mutex clks_lock;
|
||||||
|
|
||||||
|
/* Check if igpu is available as pci device. */
|
||||||
|
bool is_pci_igpu;
|
||||||
};
|
};
|
||||||
|
|
||||||
static inline struct gk20a_platform *gk20a_get_platform(
|
static inline struct gk20a_platform *gk20a_get_platform(
|
||||||
|
|||||||
Reference in New Issue
Block a user