mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
gpu: nvgpu: store bus addr of gpu regs
Usermode submit needs to access the usermode region of registers from userspace. Store the start address of register resource in struct nvgpu_os_linux to be used in remap to userspace. Bug 200145225 Change-Id: I3796b6bf67942af0cc16c86accb82a013032bfc8 Signed-off-by: Konsta Holtta <kholtta@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1811838 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
757f028320
commit
38c11db264
@@ -537,6 +537,13 @@ static int nvgpu_pci_init_support(struct pci_dev *pdev)
|
||||
goto fail;
|
||||
}
|
||||
|
||||
l->regs_bus_addr = pci_resource_start(pdev, 0);
|
||||
if (!l->regs_bus_addr) {
|
||||
nvgpu_err(g, "failed to read register bus offset");
|
||||
err = -ENODEV;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
l->bar1 = nvgpu_devm_ioremap(dev, pci_resource_start(pdev, 1),
|
||||
pci_resource_len(pdev, 1));
|
||||
if (IS_ERR(l->bar1)) {
|
||||
|
||||
Reference in New Issue
Block a user