mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 01:50:07 +03:00
gpu: nvgpu: Store VBIOS version in g->bios
Store VBIOS version in g->bios instead of GPU characteristics. This removes a few Linux dependencies from common code, because GPU characteristics is defined in Linux IOCTL header. JIRA NVGPU-259 Change-Id: I9aab3d37b7ca000edd59c92b8601a96ee288e2bb Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1593684 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
ac5d3fcf04
commit
a51219e526
@@ -208,6 +208,9 @@ gk20a_ctrl_ioctl_gpu_characteristics(
|
|||||||
pgpu->impl = g->params.gpu_impl;
|
pgpu->impl = g->params.gpu_impl;
|
||||||
pgpu->rev = g->params.gpu_rev;
|
pgpu->rev = g->params.gpu_rev;
|
||||||
|
|
||||||
|
pgpu->vbios_version = g->bios.vbios_version;
|
||||||
|
pgpu->vbios_oem_version = g->bios.vbios_oem_version;
|
||||||
|
|
||||||
if (request->gpu_characteristics_buf_size > 0) {
|
if (request->gpu_characteristics_buf_size > 0) {
|
||||||
size_t write_size = sizeof(*pgpu);
|
size_t write_size = sizeof(*pgpu);
|
||||||
|
|
||||||
|
|||||||
@@ -350,8 +350,8 @@ static void nvgpu_bios_parse_biosdata(struct gk20a *g, int offset)
|
|||||||
biosdata.version,
|
biosdata.version,
|
||||||
biosdata.oem_version);
|
biosdata.oem_version);
|
||||||
|
|
||||||
g->gpu_characteristics.vbios_version = biosdata.version;
|
g->bios.vbios_version = biosdata.version;
|
||||||
g->gpu_characteristics.vbios_oem_version = biosdata.oem_version;
|
g->bios.vbios_oem_version = biosdata.oem_version;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void nvgpu_bios_parse_nvinit_ptrs(struct gk20a *g, int offset)
|
static void nvgpu_bios_parse_nvinit_ptrs(struct gk20a *g, int offset)
|
||||||
|
|||||||
@@ -1035,6 +1035,9 @@ struct nvgpu_bios_ucode {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct nvgpu_bios {
|
struct nvgpu_bios {
|
||||||
|
u32 vbios_version;
|
||||||
|
u8 vbios_oem_version;
|
||||||
|
|
||||||
u8 *data;
|
u8 *data;
|
||||||
size_t size;
|
size_t size;
|
||||||
|
|
||||||
|
|||||||
@@ -211,9 +211,9 @@ int gp106_bios_init(struct gk20a *g)
|
|||||||
if (err)
|
if (err)
|
||||||
goto free_firmware;
|
goto free_firmware;
|
||||||
|
|
||||||
if (g->gpu_characteristics.vbios_version < g->vbios_min_version) {
|
if (g->bios.vbios_version < g->vbios_min_version) {
|
||||||
nvgpu_err(g, "unsupported VBIOS version %08x",
|
nvgpu_err(g, "unsupported VBIOS version %08x",
|
||||||
g->gpu_characteristics.vbios_version);
|
g->bios.vbios_version);
|
||||||
err = -EINVAL;
|
err = -EINVAL;
|
||||||
goto free_firmware;
|
goto free_firmware;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3235,10 +3235,10 @@ int gp106_mclk_init(struct gk20a *g)
|
|||||||
g->mem_config_idx = GP106_MEM_CONFIG_GDDR5_PG418;
|
g->mem_config_idx = GP106_MEM_CONFIG_GDDR5_PG418;
|
||||||
if ((g->pci_vendor_id == PCI_VENDOR_ID_NVIDIA) &&
|
if ((g->pci_vendor_id == PCI_VENDOR_ID_NVIDIA) &&
|
||||||
(g->pci_device_id == 0x1c75) &&
|
(g->pci_device_id == 0x1c75) &&
|
||||||
(g->gpu_characteristics.vbios_version == 0x86065800)) {
|
(g->bios.vbios_version == 0x86065800)) {
|
||||||
|
|
||||||
g->mem_config_idx =
|
g->mem_config_idx =
|
||||||
(g->gpu_characteristics.vbios_oem_version == 0x12) ?
|
(g->bios.vbios_oem_version == 0x12) ?
|
||||||
GP106_MEM_CONFIG_GDDR5_PG419_8606580012 :
|
GP106_MEM_CONFIG_GDDR5_PG419_8606580012 :
|
||||||
GP106_MEM_CONFIG_GDDR5_PG419;
|
GP106_MEM_CONFIG_GDDR5_PG419;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user